2011-05-23 48 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