Wireless ADB Debugging over Android Hotspot
When developing on the go, you often use your Android phone as a mobile hotspot for your laptop. But Android disables native Wireless Debugging on the device acting as the hotspot host. Without a workaround, you either need a second phone or stay tethered by a short USB cable.
By running adb tcpip 5555 once over USB, you configure the phone to listen for ADB connections on its gateway IP address (usually 192.168.43.1). Once established, the wireless connection stays active for hours across development sessions. You only need a USB cable once every few days after a phone reboot.
Setup
- Connect your phone via USB and turn on its Hotspot.
- Enable TCP mode on port 5555:
- Unplug the USB cable and connect over the hotspot gateway IP:
Automation Script
To avoid running these commands manually, save this script as adb_hotspot_connect.sh:
Make it executable:
Whenever you start work, run ./adb_hotspot_connect.sh to ensure your phone appears in adb devices.