Android App development can be really irritating when your phone keeps disconnecting because of cable issues etc. What if we told you there was a way to debug your apps on your phone over WiFi without rooting it. ?
Or you could just buy a new USB cable and problem solved. But who wants that? WiFi debugging mode is cool and who wants wires. irresistible.
How do we do this? It’s pretty simple:
Turn on USB debugging and check if your computer picks up your device.
Now connect your device to your computer (adjust the cable if necessary).
It will show up on your Android Studio as shown below:
Open a command prompt and type in the following:
adb tcpip 2020
Your device will now listen for connections on port 2020
Now we need the IP Address of your device. In the command prompt type the following:
adb shell netcfg
OR if that doesn’t work try:
adb shell ifconfig
Look up the IP Address of your device.
We can now disconnect the USB cable and Connect over WiFi. ?
Type the following in the command prompt to do this:
adb connect [replace with your device IP]:2020
If you have successfully followed everything you should see this in the command prompt.
Disconnecting and Reverting back to USB mode:
To disconnect type the following in the command prompt
To Revert back to USB debug type the following in the command prompt
Congratulations! you can now use debugging on your device over WiFi.
Please be careful while using this mode. Only do this over a trusted WiFi network. Someone might connect to your device if you are not careful. Remember to disconnect and revert back to USB debug when done.