2011-05-23 50 views
2

我有多個android模擬器運行,連同設備連接到同一臺機器。運行多個android模擬器

我想知道如何從命令提示符連接到單個模擬器/設備。

例如:adb shell emulator-5554

但是,這並不工作。

回答

7

你應該使用-s開關:

adb -s emulator-5554 shell

5

用命令

adb devices 

你得到所有連接的設備的列表:

$ adb devices 
List of devices attached 
emulator-5554 device 
emulator-5556 device 
emulator-5558 device 

然後你可以運行所有命令都正常,但你必須附加-s選項

adb -s emulator-5556 install helloWorld.apk 

如果您想了解有關adb的更多信息,請查看tutorial