Debug Android over WiFi (without root)

During penetration testing an android application it's convenient to be able to debug your phone without connecting USB cable avoiding the hassle of mistakenly disconnect the cable.

During penetration testing an android application it's convenient to be able to debug your phone without connecting USB cable avoiding the hassle of mistakenly disconnect the cable.

Enable Debugging Mode on Your Device

To enable debugging mode in your android

  1. Settings > About Phone > Build number > Tap it 7

  2. Settings > Developer Options > USB Debugging.

Step #1 Connect Your Device Via USB

It's the hardest step, connect the USB in both your phone and computer.

Step #2 Your Device to Listen on a Port

Make your phone's debugging daemon (adb) to list on a port desier, I'm using 9911 tcp port but usually people use 5555 port.

Step #3 Get Your Device's IP Address

Before disconnecting your phone, run the following to get your phone's IP address:

If you have disconnected your phone already, then

  • Go to the Settings -> About phone -> Status to view the IP address of your phone.

Step #4 Disconnect Your Device

Now just disconnect/remove the USB cable from your phone.

What a step, sigh!

Step #5 Connect adb via WiFi

Now you can check available devices again to see how the adb is connected to your device

Resources

Last updated