运行多个android模拟器

Had*_*des 3 android android-emulator

我运行了多个Android模拟器,以及连接到同一台机器的设备.

我想知道如何从命令提示符连接到单个模拟器/设备.

例如: adb shell emulator-5554

但这不起作用.

ina*_*ruk 8

你应该使用-s开关:

adb -s emulator-5554 shell


Fra*_*nke 5

用命令

adb devices
Run Code Online (Sandbox Code Playgroud)

您将获得所有连接设备的列表,例如:

$ adb devices
List of devices attached 
emulator-5554  device
emulator-5556  device
emulator-5558  device
Run Code Online (Sandbox Code Playgroud)

然后你可以正常运行所有命令,但你必须附加-s选项,例如

adb -s emulator-5556 install helloWorld.apk
Run Code Online (Sandbox Code Playgroud)

如果您想了解更多关于adb的信息,请查看教程.