今天看有关Android USB的文档的时候发现一个灰常好的技能——通过无线调试Android Device!
这适合于解决Android Device 通过OTG连接上其他设备而无法连接电脑,导致logcat信息不好查看以及调试的问题。
- Connect the Android-powered device via USB to your computer.
- From your SDK
platform-tools/
directory, enteradb tcpip 5555
at the command prompt. - Enter
adb connect <device-ip-address>:5555
You should now be connected to the Android-powered device and can issue the usualadb
commands likeadb logcat
. - To set your device to listen on USB, enter
adb usb
.
原文相对地址:sdk/docs/guide/topics/connectivity/usb/index.html