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:
- 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
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.