通过adb命令连接特定的设备

来源:互联网 发布:ae软件安装包 编辑:程序博客网 时间:2024/05/04 14:45

当电脑上运行着多个模拟器,或者连接着多台设备时,我们使用adb命令安装或者卸载应用时,就会提示:

error: more than one device/emulator
- waiting for device -

那这个情况下如何连接到特定的设备呢?可以通过如下操作:

1. 使用命令 adb devices,列出所有已连接设备,如下:

List of devices attache
EAAZCY15U363    device
emulator-5554   device

2. adb 命令添加参数-s 设备名,指定特定的设备,例如: adb -s emulator-5554 install xxx.apk。这样就将apk安装到虚拟机emulator-5554上了

0 0