How to install apk on emulator in Android Studio?

How do you install apk on the emulator in Android Studio from the terminal?

In Eclipse we did

/home/pcname/android-sdks/platform-tools/adb -s emulator-5554 install /home/pcname/Downloads/apkname.apk 

Now what about in Android Studio?

+53
android android-studio
Jun 18 '13 at 11:23
source share
8 answers

You can install .apk files on the emulator no matter what you use (Eclipse or Android Studio)

this is what i always do: (for beginners)

1- Run the emulator and wait for it to fully start.

2 Go to the sdk installation folder, then go to platform tools (you will see an executable file called adb.exe )

3- create a new file and name it run.bat , edit the file using notepad and write CMD in it and save it.

4- copy the desired apk to the same folder

5- now open run.bat and write adb install "your_apk_file.apk"

6 - wait for the installation to complete

7-voila Your apk is installed on your emulator.

Note: to reinstall the application, if it already exists, use adb install -r "your_apk_file.apk"

Sorry for the detailed instructions as I said for beginners.

I hope for this help.

Respectfully,

Tarek

Example 1

Example 2

+75
Jun 18 '13 at 16:07
source share
— -

Run the simulator → drag yourApp.apk to the simulator screen. It's all. No teams.

+83
Apr 21 '16 at 18:58
source share

For those who use a Mac, and you get a command not found error, you need to do

type

./adb install "yourapk.apk"

enter image description here

+29
Mar 22 '14 at 9:32
source share

Launch your emulator with Android Studio Tools->Android-> AVD Manager , then select the emulator image and run it.

After starting the emulator, just dragging the APK is very simple.

+8
Dec 29 '16 at 10:51
source share

It is much simpler to just run the emulator and then switch to sdk / platform-tools and use adb from here to install apk. How:

adb install xxx.apk

He will install it on a running emulator.

+7
Aug 27 '14 at 15:50
source share

In android studio emulator, just drag and drop apk to emulator to run apk file. The emulator will install apk

+5
Mar 02 '17 at 6:30
source share

For Linux: as soon as the emulator works, the following worked for me.

Since I installed the Android SDK in my home directory, I have the following file structure:

  • Home / Android / Sdk / Platform Tools / ADB

  • home / AndroidStudioProjects / Metronome.adk

AndroidStudioProjects is a file folder created for my Android projects. "Metronome.adk" is the file I want to run.

So, using Terminal from the home directory ...

 ./Android/Sdk/platform-tools/adb install ./AndroidStudioProjects/Metronome.adk 

As a Linux newbie, I often forget to put "./" when trying to find a file or run a command.

After executing the “Success” command, the application is in the “Applications” area of ​​the emulator and can be launched.

+2
May 19 '15 at 23:46
source share

In Android Studio: View - Tool Windows - Gradle

In the Gradle tool window, go to :app - Tasks - install and then execute (double-click): any of your install* tasks: for example. installDebug , installRelease

Note: apk will also be automatically installed when the application starts

0
Nov 07 '16 at 11:00
source share



All Articles