我想执行亚行命令。但我无法使用,adb -s <ANDROID_ID> *command*
因为所有设备都有相同的ANDROID_ID. 是否可以adb
在特定 USB 端口上执行命令。
输出lspci -nn | grep USB
:
*00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04)
00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04)*
现在我只想在 USB 端口上触发 adb 命令00:14.0
可以这样做吗?
答案1
该-s
开关用于序列号而不是设备 ID。正确的方法是使用adb devices
然后获取设备列表,然后从中选择要操作的序列号:
$ adb devices
List of devices attached
emulator-5554 device
emulator-5556 device
emulator-5558 device
$ adb -s emulator-5556 install helloWorld.apk
来源http://developer.android.com/tools/help/adb.html#commandsummary