How to debug an Android application using adb over WiFi?
As we all know that we can connect our Android device to the system using USB Cable to Run, Debug and Install the Android Applications.
Similar Question – How to Run, Install or Debug the Android application over WiFi?
It is possible to connect the Android Device over WiFi connection to avoid some USB Cable related issue. It is also helpful when you are working with some serial device. Serial Device required a USB port to connect with the Android Device and required some additional hardware if you want to debug application along with the serial device.
Debug an Android application using adb(Android Debug Bridge) over Wifi is super easy. Not only debug, but you can also Run and Install an Android application over Wifi.
Required same WiFi network for the host computer and Android device.
No additional hardware required for this.
Now let’s check the steps
Connect an Android device with the host computer over USB (Make sure USB debugging is ON – Only required for the first time).
Make sure Android device and host computer connected over the same WiFi network.
After connecting an Android device with the host computer, your host computer will detect your device and adb will start running in the USB mode on the host computer. You can check List of devices attached to the computer using “adb devices”.
Open the command-line (CMD on windows os) or terminal and execute the command:
$ adb devices List of devices attached 0123456789ABCDEF devicce
Make sure that adb is running in the USB mode by executing “adb usb” command:
$ adb usb restarting in USB mode
During this process, you face some issue related to adb like “adb server version doesn’t match this client in Android”. Please read this post to solve the problem related to adb.
Now restart adb in tcpip mode to start listening for connections on port 5555.
$ adb tcpip 5555 restarting in TCP mode port: 5555
Check the Android device IP address. You can execute “adb shell netcfg” or “adb shell ifconfig” command. You can also check into Android Device.
Go to Setting -> About Phone -> Status -> IP address
If you have dynamic WiFi IP address then
Go to List of WiFi networks -> Select WiFi you are using -> Check IP Address
Connect to the server using “adb connect :5555” command
$ adb connect 192.168.20.255:5555 connected to 192.168.20.255:5555
Now, you can remove the USB cable and you should be connected to your device. You can check the list of the connected device using “adb devices” and check whether a device is attached or not.
$ adb devices List of devices attached 192.168.20.255:5555 device
Now you have a device over the network with which you can debug as usual.
You can run the same with Android Studio.
If you having any problem with adb, you can execute “adb kill-server” and go through all the steps again once more.
Note: Don’t forget to switch the server back to the USB mode, run
adb usb, which will put the server on your phone back to the USB mode.
Hope that helps! Enjoy your day! Please like and Share if you really like this post.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?