Installing APK Files on Android Device Emulator
Let me first clear one thing, You do not need Eclipse or Eclipse-plugin the Android Development Tools (ADT) in order to run .APK file (adhoc builds) on emulator. They required for the software/application development for Android, but are not necessary for application adhoc testing on emulator.
You will need to download the Android SDK, which can be obtained here: http://code.google.com/android/download.html
Before running .apk into emulator, it is needed to setup the sdk first.
Installing the SDK:
After downloading the SDK, unpack the .zip archive to a suitable location on your machine. For the rest of this document, we will refer to the directory where you installed the SDK as $SDK_ROOT.
Optionally, you can add $SDK_ROOT/tools to your path:
- On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to your $SDK_ROOT/tools to it. If you don’t see a line setting the path, you can add one:
export PATH=${PATH}: - On a Mac, look in your home directory for .bash_profile and proceed as for Linux. You can create the .bash_profile, if you haven’t already set one up on your machine.
- On Windows, right click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path under System Variables, and add the full path to the tools/ directory under $SDK_ROOT to it.
*Note* – Updating the SDK for newer releases means you might also need to update the PATH settings.
If you have not created android virtual device (AVD) yet, then in ../tools directory,
run command ./android
This will open up the window to let you add virtual device with specific sdk version 1.6 or 2.0
To check AVDs present you can run the command ./android list avd
Using emulator:
1. Go to $SDK_ROOT/tools directory and execute the file ‘emulator.exe’.
You might need to also include android virtual device (AVD) to command line execution for example,
./emulator -avd TestDevice
Please wait couple of minutes until it loads. You should see the home screen of the android emulator.
2. Save/copy the APK file directly in the $SDK_ROOT/tools directory.
3. Goto Shell/Terminal/CommandPrompt, adb install fileName.apk (You will need to shell/terminal/cmd sessions live)
or ./adb install fileName.apk
4. if there is ‘Path not found’ error then you need to add $SDK_ROOT/tools directory to your system PATH settings correctly.
5. After above command executions, you will be able to see installed apk into emulator.
Good luck!
Regards,
Shail
about 4 months ago
Thanks you for the tutorial, this is very useful for me..
about 3 months ago
Excellent tutorial, It solved a problem i was facing.
about 3 months ago
Very creative presentation I’ve got here, tutorials are very useful for us and by increasing your productivity with APK files. Congratulations on a job well done! Thanks for posting this interesting post here.
about 2 months ago
Hi. I get these error messages when I try to run the adb command:
—
* daemon not running. starting it now *
ADB server didn’t ACK
* failed to start daemon *
error: cannot connect to daemon
—
can u tell me how to fix it?
Tnx in advance
about 2 months ago
hi i got error when i run the location alarm .apk file in this above format the error is
“Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
about 2 months ago
hi i got error when i run the location alarm .apk file in this above format the error is
“Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]”
PIS GIVE ME THE SOLUTION……….