Issue
How do you install an 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 how about in Android Studio?
Solution
EDIT: Even though this answer is marked as the correct answer (in 2013), currently, as answered by @user2511630 below, you can drag-n-drop apk files directly into the emulator to install them.
Original Answer:
You can install .apk files to emulator regardless of what you are using (Eclipse or Android Studio)
here's what I always do: (For full beginners)
1- Run the emulator, and wait until it's completely started.
2- Go to your sdk installation folder then go to platform-tools (you should see an executable called adb.exe)
3- create a new file and call it run.bat, edit the file with notepad and write CMD in it and save it.
4- copy your desired apk to the same folder
5- now open run.bat and write adb install "your_apk_file.apk"
6- wait until the installation is complete
7- voila your apk is installed to your emulator.
Note: to re-install the application if it already existe use adb install -r "your_apk_file.apk"
sorry for the detailed instruction as I said for full beginners
Hope this help.
Regards,
Tarek
Answered By - Tarek K. Ajaj
Answer Checked By - Pedro (JavaFixing Volunteer)