Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android pair command not found ( Wireless Debugging )

I am trying to connect to my phone wirelessly for USB Debugging using following :

adb pair 192.168.30.27:41424 .

But I am getting following error:

"Unknown command pair" error.

I have already updated Android SDK Platform tools to 31+ version, still this does not fix this issue.

like image 954
NeeK Avatar asked May 21 '21 13:05

NeeK


People also ask

How do I pair a device with QR code Wireless debugging?

Tap on Wireless debugging and pair your device: To pair your device with a QR code, select Pair device with QR code and scan the QR code obtained from above. To pair your device with a pairing code, select Pair device with pairing code from the Pair devices over Wi-Fi window above.

What is debug mode when Wi-Fi is connected?

Simply put, Wireless debugging will let you leave your USB cable behind and connect your phone to your computer via ADB completely over Wi-Fi. Of course, considering how many potentially bad things you can do to a phone once you have ADB access, it's not as simple as just connect and go.


3 Answers

Prior to Android 11, the command to connect ADB over WiFi was:

adb connect 192.168.30.27

Not pair.
Also, no code was needed.

Note, that you must first connect your device over USB and run:

adb tcpip 5555

To turn ADB over WiFi on.

Note, that to use the new pair command, your device must it self be running Android 11+, if it has an older OS, the SDK version on your PC will not matter.

like image 187
Lev M. Avatar answered Oct 21 '22 10:10

Lev M.


I had similar issues. Uninstalling and installing Android SDK Platform-Tools solved the problem. Please make sure that the "Android SDK Platform-Tools" version is at least 30 or above.

like image 31
Vikas Seth Avatar answered Oct 21 '22 09:10

Vikas Seth


If you updated recently then even though the update is on your system, you might have an older version of the adb server running. So try:

adb kill-server

and then adb pair again. Found this here: ADB pair unknown command using r32 platform tools

For me, adb pair still didn't work but the "pair devices over wifi" option in Android Studio did, after running that kill-server command.

like image 1
Tyler Avatar answered Oct 21 '22 09:10

Tyler