Ever had times when you wanted to test an app and you didn’t have a USB cord handy? Well I was in that situation 2 weeks ago when my USB got destroyed by a car door.
I always test my Android apps using a device. My laptop has very low RAM and using the emulator has never been an option for me. So when I mentioned my predicament to a colleague at work he passively said something like “there’s something like wireless debugging…“, and I Googled it out. I got a solution and here it is.

Prerequisites

  1. Have a USB cord handy for initial set up.
  2. Connect your device and computer to the same Wi-Fi network.
  3. Note your device’s IP address. You can do this by going to Settings on your device, look for About Phone and open Status. There are several items displayed as status and IP address is among them.
  4. Optionally add the path to platform-tools to system path.

 

Steps

  1. Open a terminal window.
  2. Connect your android device to your computer via USB for initial setup.
  3. Execute the following commands:

a. List all connected devices

adb devices

You’ll see your USB connected device listed

b. Turn on Wi-Fi debug mode

adb tcpip 1111

c. Connect to device

adb connect 192.168.8.103:1111

If you’re disconnected just open a terminal window and type adb connect [ip-address:port] using the device’s new IP address (if it has changed).
Happy coding.

Leave a Comment