Android 11 - Wireless ADB Pairing - Windows machine

Viewed 8023

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?

3 Answers

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

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.

Restart of OS helps. But exact reason is still unknown

Related