6

I want to install my .apk file in android emulator.But I have multiple emulators opened(5554,5556) and i don't want to close any one of the emulator how to install a .apk file in an emulator when there is multiple emulators are opened?

J. Steen
  • 15,470
  • 15
  • 56
  • 63
ram
  • 3,487
  • 10
  • 33
  • 47
  • It's very easy if you are using eclipse for development. Just select the emulator that you want to deploy to. – Kaj Jul 25 '11 at 11:02

5 Answers5

11

You can tell adb which device you want to connect to.

adb -s emulator-5554 install something.apk

(from the host). I am not sure the numbers you gave are the "serial numbers", so check with

adb devices
Jan Hudec
  • 73,652
  • 13
  • 125
  • 172
  • You can also use -e if there's only one running emulator. Run `adb` at the command line to see this switch described. – David Snabel-Caunt Jul 26 '11 at 10:05
  • i am using xamarin for build android app, this command is not working for me, can you tell me how can i install the something.apk into that xamarin emulator ? – Ashish-BeJovial Nov 27 '14 at 09:16
  • Did you try with the `-e` (`adb -e install something.apk`)? Did you use the correct device ID? Is the emulator _running_? (Otherwise I don't know; I didn't use Xamarin). – Jan Hudec Nov 27 '14 at 09:26
  • Using Visual Studio you can run adb from Tools>Android>Android Adb Command Prompt – Francesco B. Sep 20 '22 at 08:15
2

Use -s command line option with the name of emulator device, e.g.

#adb -s emulator-5554 install ...
b3er
  • 21
  • 1
1

Please check with this URLs

How to Install APK Files on Android Device Emulator

Tips: How to install apk files on Android Emulator

How to install .apk file to emulator?

Community
  • 1
  • 1
Naga Harish M
  • 2,779
  • 2
  • 31
  • 45
0

Just create a simple app to open the apk file on your emulator. Here is the code https://stackoverflow.com/a/35339372/4924755

Community
  • 1
  • 1
ORY
  • 393
  • 1
  • 4
  • 11
0

If you want to install an external apk in your emulator, you need to use adb line code

alikyo
  • 56
  • 1
  • 5