android pair command not found ( Wireless Debugging )

29.7k Views Asked by At

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.

8

There are 8 best solutions below

4
On BEST ANSWER

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.

0
On

I encountered a similar issue where I had multiple installations of platform-tools. Specifically, I had one in /usr/lib/android-sdk/platform-tools/adb and another one in $HOME/Android/Sdk/platform-tools. The second installation was the updated version, and I had added it to my .bashrc file as follows:

export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools

Despite this configuration, the adb version command was still showing the older version:

$ adb version
Android Debug Bridge version 1.0.41
Version 28.0.2-debian
Installed as /usr/lib/android-sdk/platform-tools/adb

To resolve this, I removed the older version by running:

sudo rm -r /usr/lib/android-sdk/platform-tools/

After removing the old version, my system started using the latest one, and the adb command began functioning correctly.

1
On

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.

0
On

I see this when running adb version:

Android Debug Bridge version 1.0.41
Version 29.0.6-debian
Installed as /usr/lib/android-sdk/platform-tools/adb      

but still getting adb: unknown command pair when running adb pair

0
On

Check your adb version using adb --version

With Android Debug Bridge version 1.0.40 you get this error.
With Android Debug Bridge version 1.0.41, adb pair works!

Update adb via Android Studio
(https://developer.android.com/studio/intro/update)

0
On

There are two version for adb: the SDK platform tools version and the ADB version.

For my debian bullseye:

~ $ adb version
Android Debug Bridge version 1.0.41
Version 28.0.2-debian

The second one should be the sdk version.

In google's SDK release note, the wifi pairing feature is published in v30.0.0.

Debian's adb is in sdk version 28, so it does not support wireless pair.

platform tools binary from google

However, I do not know that what does the adb's own version meaning, but it seem to be stand alone with sdk version.

I download the google's platform tools binary, and it show a different sdk version but a same adb version:

~/Downloads/platform-tools $ ./adb version
Android Debug Bridge version 1.0.41
Version 34.0.1-9680074

Therefore, it need a newer sdk version to use the pair command.

0
On

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.

0
On

In my case (Linux Mint), apt remove and apt install again did not solve the issue.

Downloading platform-tools from the oficial source worked:

https://developer.android.com/tools/releases/platform-tools

Unzip, cd to the path, and execute adb there