12

On Pixel 2 I have android 11 beta version running. The wireless adb pairing works fine from a Ubuntu machine to my phone but it fails from a Windows machine with following message

error: unknown host service

General steps:

  • Dev Options > Wireless debugging (Enabled)
  • [Accept on a prompt to trust current WiFi]
  • Tap: Pair device with paring code
  • From computer (i.e. Windows OS), using adb from 'Platform-tools' run adb pair 192.168.1.45:40404 [IP address and port is visible in your phone in the dialog after tapping Pair device with paring code.] [Tried: .\adb pair ip:port, adb.exe pair ip:port same error]
  • [When successfully connected, the dialog box disappears on it's own (saw this behavior from Linux/Ubuntu however from windows I am not having any luck]

Platform tools Downloads

Windows | Mac | Linux


Connect to phone

  • [Once the device is paired]
  • adb connect ip:port
    • [NOT the ip:port visible in the dialog that comes on Pair device]
    • the ip:port that is visible in the main page of Wireless debugging

Question

How can I resolve the wireless adb paring from Windows OS?

Musa Biralo
  • 479
  • 1
  • 5
  • 16

3 Answers3

25

Kill the server and try to pair. It works for me

1. Kill server

./adb kill-server

2. pair devices

./adb pair ipaddr:port

This would work

Vivek K J
  • 386
  • 4
  • 9
  • 1
    ./adb kill-server worked for me (Linux & Nothing phone (1)). Maybe I had other server running, because (although I just `sudo apt remove --purge removed android-sdk-platform-tools-common adb fastboot` outdated packages from ubuntu repository) I just ran `adb version` (from $PATH) and `./adb version` (from $HOME/...) to see differences between repos and fresh true "latest" download from developer.android.com – useful Dec 26 '22 at 14:50
  • Yes. In Debian/Ubuntu repositories, android-platform-tools version is usually older than https://developer.android.com/studio/releases/platform-tools . Currently, in Ubuntu its version is 29.0.6 and actual newer version is 33.0.3 – Vivek K J Dec 27 '22 at 16:09
3

The issue might be the port is used by a device (maybe a program on your computer)

Check by running:

netstat -ano|findstr <port>

This will show what program is using it by showing the PID. If you found one using it, just kill the program.

Tipz Team
  • 78
  • 7
-1

Restart of OS helps. But exact reason is still unknown

Vaulter
  • 196
  • 2
  • 6