- 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 5555from 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.