Android: Use ADB wirelessly via Wi-Fi

In this post you will learn how to connect Android Debug Bridge (ADB) wirelessly via Wi-Fi instead of using a USB-cable.

Assumptions

  • Your Android-device has a Wi-Fi connection;
  • Your workstation has a TCP/IP connection which is routable to the Android-device;
  • Your Android-device is connected with your workstation using a USB-cable;
  • ADB is installed on your workstation;
  • You can connect via ADB with your Android device;
  • There is just one unique Android-device connected with the workstation (either via USB or WIFI).

Procedure

Steps to switch your Android-device from using USB to WIFI:

  1. Make sure your Android-device is connected via USB with your workstation and can be accessed via ADB
    The response should be something like this:
  2. Find the IP address of your Android device. Either by looking it up in the router/DHCP-leases or ask it the device directly via ADB.
    It will respond like this:

    Here the IP address is: 192.168.178.100
  3. Tell the ADBD daemon at the Android device to start listening for TCP/IP connections on port 5555. Execute this command from your workstation:
    It will respond with:
    .
  4. Tell the ADB server at the workstation to connect via TCP/IP to the Android device. Use in this command the IP-address you looked up before.
    Execute at your workstation:
    and it will respond with:

    Hint: Make sure your firewall accept these kind of connections.
  5. Check the possible connections with your Android-device. Ask ADB for the connected devices by issuing this command from your workstation:
    . The response should be:
    Now there are two ways to connect with the Android-device:

    1. The new method via WIFI and;
    2. The old one via the USB-connection

    When you don’t want to explicitly state every time you use ADB to which specific device (parameter: -s) the command is targeted, it is a good moment to disconnect the USB-cable now. This is directly a proof that command travel through the air from now on.

  6. Issue an ADB-command. For example ask information about the CPU:

    . Your device should respond with something like this:

Extra: When you would like to restart the ADBD daemon at the Android device in USB mode again, issue the command:

Warning, you will lose the ADB-WIFI connection immediately. Start with step 3 (adb tcpip 5555) to set up the ADB-WIFI connection again.

This tutorial was written using as workstation a computer running Ubuntu (16.10), using version 1.0.36 of ADB. The target device was a Lenovo Essential Tab7 running Android version: 5.0.1.

Read more