How do you install an APK file in the Android emulator?
You can simply drag and drop the .apk file of your application to the emulator and it will automatically start installing.
Another option:
Windows:
- Execute the emulator (SDK Manager.exe->Tools->Manage AVDs...->New then Start)
- Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory.
- Paste the APK file in the 'android-sdk\tools' or 'platform-tools' folder.
- Then type the following command.
adb install [.apk path]
Example:
adb install C:\Users\Name\MyProject\build\Jorgesys.apk
Linux:
- Copy the apk file to
platform-tools
in theandroid-sdk linux
folder. - Open Terminal and navigate to platform-tools folder in android-sdk.
- Then Execute this command -
./adb install FileName.apk
- If the operation is successful (the result is displayed on the screen), then you will find your file in the launcher of your emulator.
Mac:
PATH=$PATH:~/Library/Android/sdk/platform-tools
Example : PATH=$PATH:/users/jorgesys/eclipse/android-sdk-mac_64/tools
Then run adb.
Mac:
1.Run the emulator,
2.then copy your .apk file and paste into /Users/your_system_username/Library/Android/sdk/platform-tools
,
if you are not able to find sdk path in your mac system, do the following steps: Open finder->select
Go option on top menu -> select Go to Folder option -> it will popup a window with a textfield: /Users/your_system_username/Library/Android/sdk/
-> now open platform-tools folder and paste your copied .apk file,
Now open the terminal and type the following:
cd Library/Android/sdk/platform-tools
execute the following in your terminal:
./adb install yourapkfilename.apk
if you get the following error message:error: no devices found - waiting for device
, follow step 5.Run your emulator from Android Studio, once emulator active then repeat step 4, you will see the success message on your terminal.
How to install an apk on the emulator in Android Studio?
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
How do I Install .apk files in the android emulator?
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
how to install .apk in a portable android emulator?
I finally found the answer. Yay! :) See this
How do you install an APK file in the Android emulator?
You can simply drag and drop the .apk file of your application to the emulator and it will automatically start installing.
Another option:
Windows:
- Execute the emulator (SDK Manager.exe->Tools->Manage AVDs...->New then Start)
- Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory.
- Paste the APK file in the 'android-sdk\tools' or 'platform-tools' folder.
- Then type the following command.
adb install [.apk path]
Example:
adb install C:\Users\Name\MyProject\build\Jorgesys.apk
Linux:
- Copy the apk file to
platform-tools
in theandroid-sdk linux
folder. - Open Terminal and navigate to platform-tools folder in android-sdk.
- Then Execute this command -
./adb install FileName.apk
- If the operation is successful (the result is displayed on the screen), then you will find your file in the launcher of your emulator.
Mac:
PATH=$PATH:~/Library/Android/sdk/platform-tools
Example : PATH=$PATH:/users/jorgesys/eclipse/android-sdk-mac_64/tools
Then run adb.
Mac:
1.Run the emulator,
2.then copy your .apk file and paste into /Users/your_system_username/Library/Android/sdk/platform-tools
,
if you are not able to find sdk path in your mac system, do the following steps: Open finder->select
Go option on top menu -> select Go to Folder option -> it will popup a window with a textfield: /Users/your_system_username/Library/Android/sdk/
-> now open platform-tools folder and paste your copied .apk file,
Now open the terminal and type the following:
cd Library/Android/sdk/platform-tools
execute the following in your terminal:
./adb install yourapkfilename.apk
if you get the following error message:error: no devices found - waiting for device
, follow step 5.Run your emulator from Android Studio, once emulator active then repeat step 4, you will see the success message on your terminal.
How to run .APK file on emulator
Steps (These apply for Linux. For other OS, visit here) -
- Copy the apk file to
platform-tools
inandroid-sdk linux
folder. - Open Terminal and navigate to platform-tools folder in android-sdk.
- Then Execute this command -
./adb install FileName.apk
- If the operation is successful (the result is displayed on the screen), then you will find your file in the launcher of your emulator.
For more info can check this link : android videos
How to install apk files on my android emulator with Eclipse?
You can put it anywhere on your system, just specify the path as part of your command line:
C:\android-sdk\platform-tools> adb -s emulator-5554 install C:\Users\Me\Desktop\myapp.apk
Or, change into the directory your APK is in first, then run your command:
C:\> cd %USERPROFILE%\Desktop
C:\Users\Me\Desktop> adb -s emulator-5554 install myapp.apk
Note: The above assumes you're on Windows, substitute UNIX-style paths if you're on Linux or Mac OSX.
Related Topics
Why Does Layoutinflater Ignore the Layout_Width and Layout_Height Layout Parameters I'Ve Specified
How to Force Use of Overflow Menu on Devices With Menu Button
Android - Cancel Asynctask Forcefully
No Resource Found That Matches the Given Name '@Style/Theme.Appcompat.Light'
How to Connect to More Than One Firebase Database from an Android App
How to Disable Gradle 'Offline Mode' in Android Studio
How to Display Image from Url on Android
Android Room - Simple Select Query - Cannot Access Database on the Main Thread
More Than One File Was Found with Os Independent Path 'Meta-Inf/License'
How to Programmatically Create and Read Wep/Eap Wifi Configurations in Android
Difference Between Fragmentpageradapter and Fragmentstatepageradapter
What's the Best Way to Limit Text Length of Edittext in Android
Noclassdeffounderror For Code in an Java Library on Android
How to Customize Listview Using Baseadapter
What Does "Program Type Already Present" Mean
How to Set My App as the Default Sms App