Alexei
Alexei

Reputation: 15656

Android. How from command line start emulator, deploy apk AND run apk?

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?

Upvotes: 1

Views: 805

Answers (2)

Jeffrey
Jeffrey

Reputation: 4650

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

Upvotes: 2

Miroslav Ranisavljevic
Miroslav Ranisavljevic

Reputation: 355

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

Upvotes: 1

Related Questions