Wireless Debugging through ADB in Android using WiFi
In this article I am going to show you how you can debug your android app over WiFi.
Yes I know it is very hectic to debug your Android app with USB cable if your cable is broken or not functioning or you don’t have a cable and you have borrowed it from someone for few minutes.
It will require only few steps to get this done.
Step 1 : Connect your adb host computer and your android phone to same network
Make sure that your android phone and your host computer are connected on the same network then you will be able to debug your app.
STEP 2 : If you are connecting to a Wear OS device, turn off Bluetooth on the phone that’s paired with the device.
STEP 3: Connect the device to the host computer with a USB cable.
STEP 4: locate your SDK
In the SDK you will find platform-tools
Set this location as path on Command Prompt
On the platform-tools folder
press Shift+Right click
Select Open Command window here
STEP 5 : Check whether your device is properly connected
Step 6 : Set the target device to listen for a TCP/IP connection on port 5555.
adb tcpip 5555
STEP 7 : Find the IP address of the Android device.
you can find the IP address at Settings > Wi-Fi Settings > Advanced > IP address.
STEP 8 : Connect to the device by its IP address.
adb connect device_ip_address
STEP 9 : Remove the USB cable
Remove the USB cable and you should be connected to your device. If you don’t see it in
adb devices then just reconnect using the previous steps command
STEP 10 : Confirm that your host computer is connected to the target device
$ adb devices List of devices attached device_ip_address:5555 device
You’re now good to go! 🎉
If the adb connection is ever lost:
- Make sure that your host is still connected to the same Wi-Fi network your Android device is.
- Reconnect by executing the
adb connectstep again.
- Or if that doesn’t work, reset your adb host:
Then start over from the beginning.
Hope this helps you, if you have any query let me know in the comments section.