Unleashing the Power of Android 11 adb Wireless Debug: From Wired to Wireless, Explore a Freer Debugging Experience!
Introduction
In response to project needs, we are constantly looking for new ways to use ADB Debug,
and recently discovered a method introduced by Android.
Here, we share our research findings on adb wireless debug.

-
The connected computer or the self-built environment must have a platform tool SDK version greater than 30.0.0 (adb version can check the current SDK version)
-
Must be on the same local network
-
Enter the Wireless debugging submenu
-
Click pair device with code to view the IP, port, and pairing code.
-
On the terminal, enter the command adb pair
ipaddr
:port
to pair -
When Enter pairing code: appears, enter the pairing code seen in step 3.
-
It will automatically reconnect the next time you restart
-
Pairing can be done without a USB cable
-
Unlike the old version (below Android 10) adb connecting to wifi, the old version requires manual reconnection each time
- Brief description of the adb connection method below Android 10 **(Requires USB Cable)**
Switch tcpip port: <b style="color:red;">adb tcpip <port></b>
<b style="color:red;">adb connect <ip>:<port></b> Enter the IP and the port just used to connect
Other Notes
-
In Android 11 AOSP, check the WirelessDebuggingFragment in the developer options to see how the pairing code is generated
-> AOSP folder path:
/Android/11/packages/apps/Settings/com/android/settings/development/WirelessDebuggingFragment.java
Here, it looks like a special key is needed to generate it,
Not sure if the
application layer
can achieve thisThose interested in researching can check it out in AOSP
-
Some Android 11 devices do not support it, meaning manufacturers might lock this feature, such as LG phones
-> You won't see the wireless debugging option in the developer options,
So whether it is supported or not depends on whether the OTA provided by the manufacturer includes it
-
adb connect <ip>:<port> connection
-> Use this to test if you can connect to the IP:port displayed on the wireless debug pageIP:port
But this command is used to connect to the tcpip IP (requires a cable)
Another use is to restore a device that has been paired under wireless debugging
So it can only be used to manually restore the connection