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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With