1

Windows 10 (64 bit).

My emulator is locate on folder :

d:\Programs\Android\avd.android\avd\Nexus_4_4.avd\

My apk is locate on folder:

d:\Programs\Android\apk\my_apk.apk

I'm locate on folder D:\temp If I want to start emulator from command line (prompt) I use the next command:

emulator -avd exus_4_4.avd

It's work fine. Emulator is success launched.

But I need more. Only from command line:

  1. Launch emulator
  2. Deploy d:\Programs\Android\apk\my_apk.apk to started emulator
  3. Run apk on emulator

How I can do this from command line?

Alexei
  • 14,350
  • 37
  • 121
  • 240
  • Possible duplicate of [How do you install an APK file in the Android emulator?](https://stackoverflow.com/questions/3480201/how-do-you-install-an-apk-file-in-the-android-emulator) – Hack5 Jun 13 '17 at 12:54

2 Answers2

2

To install a .apk file you need follow the below steps

  • Open the command prompt inside d:\Programs\Android\apk\
  • Type adb install my_apk.apk and press Enter.
  • If the app is already installed in the device then use adb install -r FileName.apk
Jeffrey Rajan
  • 4,391
  • 4
  • 27
  • 37
1

Check Android developer site for this kind of information. https://developer.android.com/studio/build/building-cmdline.html

Install

adb install path/to/your_app.apk

and install with run

adb -d install path/to/your_app.apk