How to use (Android) adb over wifi connection

I presume you already know how to use Android Studio with USB Cable and you have at least one working Android device for the purpose. Just connect your device, open Terminal (the one inside Android Studio works fine) and type:

adb tcpip 5555

Turn the Wi-Fi On and check what’s the acquired IP Address of the device. I use static IP for my Android device, so I do not need to check it at all.

!!! Note that the Android device that you are using for the purpose should be in the same network as the machine with the ADB server.

Establish the connection with the following command:

adb connect

Disconnect the USB Cable and continue your work over the WiFi.

If you want to go back with the USB cable, use:

adb usb

** Troubleshooting: **

  • If your Android device is shown as ‘OFFLINE’ in Android Studio, follow these steps:
    • Turn Off the WIFI
    • Go to Settings
    • Developer options
    • Revoke USB debugging authorizations (clear the list of authorized PCs).
    • Write in the Terminal:
    • adb kill-server
    • adb start-server
    • adb connect
  • If you can’t connect at all, switch back ADB to USB and start over.