How to install an apk in one of the connected devices through adb? [closed]

限于喜欢 提交于 2021-02-19 05:43:46

问题


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

  1. Multiple Emulator and one device attached you want to install apk on device :

    adb -d install <path of apk>

  2. 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>

  1. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!