Debug your Android App over Wi-Fi

Debug your Android App over Wi-Fi

If you are developing apps for Android applications you can use an emulator or device to debug and test your applications. Especially if you have a slow computer, you probably run your app on an Android device to get the best performance.

I want to be comfortable as a software developer. Debugging with a USB cable is hell it disconnects randomly. you need to close the computer etc...

Well, We have a solution for that. We can use Wi-Fi to run our app. Let's see what we need to do.

First of all, Enable USB debugging in the Android device. Then We need to connect the Android device to the computer. Please make sure the device and the computer are on the same wifi network.

If you type adb devices  you need to see your device like belove

To connect to Android Device we need to know the IP address. type the command below in the terminal.

adb shell ip addr show wlan0

you will get the device IP of the device. You can also go inside the Settings of the device to get the IP address in Settings->About -> Status.

Then in the terminal type this command adb connect ip-address-of-device:5555

Now you can disconnect the USB cable from the device and check with adb devices that the device is still detected.