Android 11 wifi adb error "Unable to start pairing client"
Asked Answered
P

16

40

I downloaded the latest platform-tools for windows, then I enabled developer mode on my phone and turned on adb over wifi. However after I enter the command adb pair ipaddr:port I get the error "Failed: Unable to start pairing client" (after entering the code).

adb is working fine over the cable, and wifi adb is working with my watch. Any ideas?

Phelips answered 3/11, 2020 at 20:38 Comment(5)
Did you figure this out? I'm seeing it, too.Saiz
Same problem hereEpps
I have the same problem too.Ortiz
Just wanted to point out for the few users that land here for the reason I did. This is also the behaviour if you accidentally enter the wrong IP or port and it can't find the device to connect to. The wording of the error is not entirely clear.Jounce
Just wanted to add here, that you should have connected to the same wifi and same gateway, on both the server and the client you want to connect to In my case, these two were different, and internally they use the same router, but it didn't work until I explicitly connected both the server and client to the same gatewayTartaglia
E
41

I tried all possible way. Then I click on forget wifi and then again connect to wifi then entered the pair and code again then it starts working

Eglanteen answered 6/1, 2021 at 11:1 Comment(5)
This is the only thing that worked for me, in my case I only had to turn computer wifi off and on.Decoct
Same. Forgetting the wifi and connecting to it again worked.Official
In my case I had to restart wifi router (unplug and plug)Starkey
I have to login and give you a vote up :vAlmsman
turning wireless debugging off and on, was it for me.Sikata
C
29

Had the same problem. Turns out the port used for adb pairing changes each time you ask for a pairing code. I didn't update mine, so it didn't work. When I realized that, and typed in the pairing code, everything worked as expected.

Cresida answered 28/11, 2020 at 17:17 Comment(2)
perfect answer :)Trigg
<3 fantastic and straight to the point!Speculation
A
16

Try pinging the device 2-3 times and then pair. Only this solution worked for me.

Amulet answered 12/6, 2021 at 11:37 Comment(7)
could you please add more details around how to ping the device?Mummery
in the command prompt (windows) or terminal (linux) type ping <device_ip> device ip can be found in settingsAmulet
This helped me identify that the ping was failing, so I hit forget network on both mobile and PC and after reconnecting everything worked fine.Pilatus
Oneliiner: ping -c 4 <ip> && adb pair <ip>:<port>Ortiz
Yup same for me @SanalS, I realized something was wrong and so I disconnected both devices from wifi, reconnected them and then enabled wireless debugging again.Radicand
@Mummery when you're in the 'wireless debugging' screen on your android device, you should see device IP under 'IP Address & port', the bit before ":". Ping that in your terminalRadicand
Also check if you're pinging or pairing to the correct ip and there is no mistyping of the ipMonge
P
15

In my case I was connected to a VPN on my workstation and that's why I got this message. Disconnecting from the VPN fixed it.

Protolanguage answered 2/10, 2021 at 3:37 Comment(0)
S
6

One solution that worked for me is to try and establish a tcp connection first to the pairing target.

nc -vz <ip_addr>:<pairing_port>

Once this is successful in establishing a connection, proceed with adb pair. I'm not sure why, but this is the only thing that worked for me. Rest all failed.

Sullyprudhomme answered 14/6, 2021 at 7:33 Comment(3)
For nc me it says forward host lookup failed: h_errno 11004: NO_DATA so it seems that the phone does not open the port. Any idea why the port is not opened correctly ?Stellate
In my case I had nc: missing port number when calling nc -vz 192.168.1.110:35699.Witha
@DmitriiDemenev replace the colon with a spaceFlense
B
4

For me, it worked after I restarted Android Studio (or the command line).

Betthezul answered 19/4, 2021 at 15:59 Comment(0)
S
4

In my device the IP address given in Wireless debugging screen is 10.1.10.1 which I know is not my local router's IP address. My router uses 192.168.0.xxx addresses. I found my device's IP address by going to advanced section of connected WiFi network and used that when connecting to adb keeping the port same.

so instead of

adb pair 10.1.10.1:<port>

I used

adb pair 192.168.0.xxx:<port>
Sampling answered 6/11, 2022 at 18:19 Comment(1)
And then after that, adb connect 192.168.0.xxx:<port> (not :5555)Supercharge
T
2

most android devices have an option to use Randomized MAC address enabled by default. switching it to use Phone MAC address fixed the issue for me.

https://source.android.com/docs/core/connect/wifi-mac-randomization-behavior

Tuinenga answered 1/2 at 8:49 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Fonseca
V
1

My issue was I had AFwall+ enabled, so some network connections where blocked which should not have been. I don't know which exactly, but disabling the firewall made it pair.

Varner answered 18/9, 2021 at 16:53 Comment(0)
C
1

In my case "User Isolation" was enabled on my modem router which prohibited direct communication between connected devices, after I disable it everything worked as expected.

Chlorinate answered 2/12, 2021 at 17:31 Comment(1)
Was connected to a VPN and had the same problem because of that xDMicronesia
Y
1

If you've recently enabled developer mode on your phone, try restarting it. I was receiving the error, "Failed: Unable to start pairing client", then I rebooted my phone and after that I was able to pair.

Yare answered 28/1, 2022 at 20:2 Comment(1)
This is because it causes a re-connection to wifi. If I had to guess, there is a bug in the developer options that fails to receive commands until restarting the wifi.Dissimilate
S
1

First make sure the computer isn't paired with the device already in Wireless debugging options under "Paired devices". If it is, forget the pairing. Next restart the device. Afterwards when the device boots back up again, re-enable "Wireless debugging". Sometimes (I think) the computer fingerprint expires on the device and adb pair starts failing. The device at this point may re-prompt you asking to allow the computer's fingerprint. After that adb pair should start working again. Finally once it pairs you may need to run adb connect again with the ip and port listed under "IP address & Port" in Wireless debugging options.

Shadwell answered 12/12, 2022 at 17:33 Comment(0)
M
1

Make sure you are not accidentally connected to a VPN / WireGuard service in the background without noticing.

Micronesia answered 21/8, 2023 at 14:38 Comment(1)
This was my problem, I was connected to NordVPN. Once the VPN was disabled, clicking on "Pair the device with a pairing code" gave me a 192.168.1.xxx ip instead of 10.5.0.xxx and using that in adb pair workedJointless
Q
0

I was on a guest wifi network that blocked inter device communication. Switching to my main network solved it.

Quit answered 14/7, 2021 at 12:26 Comment(1)
Good answer, but unforunally inter device communication is active in my network, so this is not the answer for me.Stellate
P
0

Both devices must be on same network. In my case I was connect to two different networks.

Pyatt answered 16/10, 2022 at 15:10 Comment(0)
U
0

If none of the aforementioned solutions prove effective, consider restarting the router, as this resolved the issue in my case.

Utmost answered 20/6 at 5:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.