2

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?

Kamran Ahmed
  • 7,661
  • 4
  • 30
  • 55
  • 4
    if you know, why did you ask this question anyway ? – MrDumb Mar 30 '15 at 05:44
  • 2
    possible duplicate of [How do you install an APK file in the Android emulator?](http://stackoverflow.com/questions/3480201/how-do-you-install-an-apk-file-in-the-android-emulator) – Alex P. Mar 30 '15 at 05:45
  • Are you not aware of http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/? – Kamran Ahmed Mar 30 '15 at 05:49

3 Answers3

3

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

Yogendra
  • 4,817
  • 1
  • 28
  • 21
2

Use

adb devices

to get list of all connected devices. Then use

adb -s <deviceId> install abc.apk
pvn
  • 2,016
  • 19
  • 33
0

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
Kamran Ahmed
  • 7,661
  • 4
  • 30
  • 55