Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use adb over WiFi? [duplicate]

I am debugging USB devices connected to my Android phone, this means I cannot use ADB over a USB connection. How can I connect to adb over WiFi?

Note: Similar question here refers to adb over tcp, however, I'm specifically asking about WiFi.

like image 676
donturner Avatar asked Feb 21 '17 10:02

donturner


People also ask

Can you use ADB over Wi-Fi?

ADB is normally used on Android via a USB cable. But you can also set up and use ADB wirelessly.


1 Answers

  • Connect Android phone and host machine to same WiFi network
  • Connect Android phone to host machine using USB cable (to start with)
  • Run adb tcpip 5555 from a command prompt
  • Run adb shell "ip addr show wlan0 | grep -e wlan0$ | cut -d\" \" -f 6 | cut -d/ -f 1" to obtain the phone's IP address
  • Disconnect USB cable and run adb connect <ip_address>:5555

You can now view logcat output by running adb logcat or by viewing the Android Monitor tab within Android Studio.

like image 128
donturner Avatar answered Oct 03 '22 17:10

donturner