- Connect your device via USB and ensure debugging is working (e.g. make sure Android Monitor in Android Studio is displaying live logs).
- At a terminal / command prompt, type adb tcpip 5555
- Then type adb connect DEVICE_IP:5555 (you can get your device’s IP address from your Wifi connection properties – advanced settings)
- Disconnect the USB and proceed with wifi debugging.
- [Optional] To disconnect Wifi debugging when you’re done, type adb -s DEVICE_IP:5555 usb
If you experience adb hangs when executing these commands, try with another android device. if that works, try disabling / enabling wifi on the problematic device. You may also need to adb kill-server and adb start-server to reset things.