
Easily debug mobile app on physical device wirelessly
In this tutorial, I'll show you how to enable & setup Android wireless debugging using command line for Android 11 or later (Android 10 and lower have a slightly different method).
Prerequisites
- adb (Android Debug Bridge)
- Host machine (Windows, Linux, macOS, etc.)
- Physical Android device
- Wifi network
You can download adb from Android Studio or as standalone installations. Make sure the path to the adb executables is added to PATH. For example, if you're on Windows, adb is located in the C:\Users\<User>\AppData\Local\Android\Sdk\platform-tools\adb.exe
.
You can check is adb is ready by running the command adb --version
.

Please enable the Developer Options first if you haven't done so. See this guide.
Both host machine and Android device need to be on the same Wifi network.
warning
Some public/university wifi networks have restrictions and can't be used for wireless debugging.
Pairing
On your Android device. Go to Settings > Developer Options. Scroll down and tap on Wireless Debugging section.

Tap on Pair Device with Pairing Code.

Open Terminal on the host machine. Enter the the following command (Replace IPADDRESS
& PORT
with the IP address & Port shown on the Android device):
adb pair IPADDRESS:PORT

After successful pairing, the host machine will appear in the list of paired devices.

Connect to the device
Whenever you want to connect to the device, you can use the following command (Replace IPADDRESS
& PORT
with the IP address & Port shown on the Android device):
adb connect IPADDRESS:PORT

tip
Check devices connected to ADB by running adb devices
.

That's it! Now you can debug your app on your Android device. Happy hacking!