问题
I have multiple devices/emulators connected to my computer and I want to install an apk or run other adb commands in one of the devices.
How do I do that?
回答1:
If you want to install apk
Multiple Emulator and one device attached you want to install apk on device :
adb -d install
<path of apk>
Multiple Emulator and Multiple device attached And you want to install on device :
A. Get devices name and serial numbver.
adb devices
B. Now install apk on given device id.
adb -s <serial number of device>
install <path of apk>
Multiple Emulator And you want to install on selected emulater:
adb -e install
<path of apk>
For more detail please follow below link: http://developer.android.com/tools/help/adb.html
回答2:
Use
adb devices
to get list of all connected devices. Then use
adb -s <deviceId> install abc.apk
回答3:
You may query the list of devices connected to your computer with:
adb devices
Then you may run any adb
command for one of the devices like:
adb -s emulator-5554 install myAPK.apk
来源:https://stackoverflow.com/questions/29339040/how-to-install-an-apk-in-one-of-the-connected-devices-through-adb