Android debugging over Wi-Fi
My MacBook USB-C hub cannot serve Huawei Nexus 6P USB cable connection well. What matters is not only it often been disconnected but affect other USB devices.
Fucking annoying.
I had to come up with a solution: connect device over Wi-Fi
- Connect Android device via cable
- Execute
adb tcpip 5555on your dev computer - Execute
adb kill-serveron your dev computer - Execute
adb connect {device_ip}:5555on your dev computer - Cable-free now
More:
adb usbif you wish to switch back to USB
adb command details:
tcpip 5555
restart adb server listening on TCP on 5555 PORT port 5555 opened across all involved firewalls and debug mode enabled
kill-server
kill the adb server if it is running
connect {device_ip}:5555
connect to a device via TCP/IP