Android Debug Bridge (adb) Wireless Debugging Over Wi-Fi

We mostly connect our Android device to our computers with a USB cable for debugging purposes. It is possible to use adb over a wifi connection than a USB to save some wire-related hassles in our lives. The process is super simple, let’s go through it quickly.

Step 1

Make sure both your adb host computer and Android device are on the same Wifi network.

Step 2

Connect the Android device with the computer using your USB cable. As soon as you do that, your host computer will detect your device and adb will start running in the USB mode on the computer. You can check the attached devices with adb devices whereas ensure that adb is running in the USB mode by executing adb usb.

$ adb usb
restarting in USB mode
$ adb devices
List of devices attached
ZX1D63HX9R	device

Step 3

Restart adb in tcpip mode with this command:

$ adb tcpip 5556
restarting in TCP mode port: 5556

Step 4

Find out the IP address of the Android device. There are several ways to do that:

  • Go to Settings -> About phone/tablet -> Status -> IP address.
  • Go to the list of Wi-fi networks available. The one to which you’re connected, tap on that and get to know your IP.
  • Try $ adb shell netcfg.

Now that you know the IP address of your device, connect your adb host to it.

$ adb connect
already connected to
$ adb devices
List of devices attached
ZX1D63HX9R	device	device

Step 5

Remove the USB cable and you should be connected to your device. If you don’t see it in adb devices then just reconnect using the previous step’s command:

$ adb connect
connected to
$ adb devices
List of devices attached	device

Either you’re good to go now or you’ll need to kill your adb server by executing adb kill-server and go through all the steps again once more.

Hope that helps!

Reference –

Efficient Android Threading - I highly recommend this book if you want to learn how various components of the Android framework works. You'll learn a ton about Android internals and components like AsyncTask, Services, Broadcast Receivers, Executor Framework, Inter-Process Communication, etc. It also covers various OS internal topics like threads, processes, kernel and how all those components work to execute an Android app. Must read!

Author: Rishabh

Rishabh is a full stack web and mobile developer from India. Follow me on Twitter.

5 thoughts on “Android Debug Bridge (adb) Wireless Debugging Over Wi-Fi”

  1. Awesome.. It’s working for me… I tried adb connection with other web links.. But it save my time… Great appreciate. Wish future work…

  2. Cool, thanks for the post.
    Based on my experiment it’s not needed to connect real device to machine in advance via USB port. You just need to have its IP address.
    I had my Genymotion on and by doing above command Android studio couldn’t recognize it (while before running the command that was recognizable) so just restarted that and problem fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *