In this tutorial we are going to learn how to install any given Android application in Android emulator using [dot]APK ".apk" files.
[Update] Steps For Windows7 (API v 2.2, v2.3)
Follow the instructions with SCREENSHOTS of the Android emulator. All you need is just the Android SDK platform with JDK or JRE (software development kit, with emulator) and .apk files. There is no need to install Eclipse or Netbeans SDK, to work with APK files [wiki]. An .apk file extension denotes an Android Package (APK) file. This file format, a variant of the JAR format, is used for the distribution and installation of bundled components onto the Android mobile device platform.
Let's proceed with installation. First of all download the required stuffs.
Step 1. Download and Install Android SDK: It can be downloaded from the official google website- here is a link to Latest Android SDK (for which you also need JAVA VM, JDK or JRE already installed). Read how to install it, before you proceed with this tutorial. Don't forget to update the SDK and also install the suitable platform version, in this tutorial we are going to use a stable Android Platform 1.5.
Step 2. Get a sample APK file: Let's take Sudoku.apk, kindly download it.
"Are you ready for installation?"
WINDOWS XP/VISTA/SEVEN System Setting
NOTE : For this tutorial, the SDK has been unzipped to this Windows folder location: "E:\android-sdk-windows\"
Step 3. Create and launch the emulator (Virtual Android device):
Either you can start the emulator directly by running emulator.exe from "E:\android-sdk-windows\tools\"
Run the setup sdk "SDK Setup.exe" from "E:\android-sdk-windows\" and then create and start AVD (emulator), in the above picture you can see that we have already created bOtskOOl AVD using Android SDK and AVD manager.
After a few minutes a virtual Android shall boot up and then observe the desktop view, as shown in the picture. Press on menu button and you will find that the applications are arranged in a grid view.
Step 4. Copy .APK files:
Now, manually copy and paste the Sudoku.apk to the destination folder "E:\android-sdk-windows\tools\".
Step 5. Run adb command:
Go to Start>>run>>cmd (open a windows command prompt or shell) and type the following commands "highlighted in bold orange".
comments: we do this in order to change our directory level to where the emulator is installed
adb install Sudoku.apk
comments: android emulator command to install the Sudoku application in .apk format.
Thats all, it's done. You must get a success message, Hurray!! You have installed your application successfully.
[Update] for Windows7 and android SDK v2.2, v2.3
"How to install .apk files in android SDK (v2.2, v2.3) on Windows7 "
Here is an alternative solution for those who are getting this message: " 'adb' is not recognized as an internal or external command, operable program or batch file. " in android emulator on Windows7 with latest Android v 2.2, 2.3.
What I have noticed is that if you install the latest android SDK emulator, these three files adb.exe, AdbWinApi.dll and InstallAgent(batch file) are missing from "android-sdk-windows/tools" folder, which is required to run adb command. So I copied these three files to the "tools" folder and followed the steps described above.
Download the adb.zip file which contains adb.exe, AdbWinApi.dll and InstallAgent(batch file)
I have summarized the steps for Windows7 with latest android SDk:
STEP 1. Download the Latest Android SDK from Google
STEP 2. Install JDK(java development kit) from Oracle and then launch the "SDK Manager.exe", download and update the Android SDK version (eg. v2.3, API9) and other stuffs.
STEP 3. Create an AVD (virtual device) with a suitable android platform(API and version) using Adroid SDk and AVD manager.
STEP 4. Select and launch the AVD (Wait for the android to boot properly).
STEP 5. Unzip adb.zip , then copy and paste adb.exe, AdbWinApi.dll and InstallAgent(batch file) to the "android-sdk-windows/tools/" folder.
STEP 6. Copy and paste Sudoku.apk inside the "android-sdk-windows/tools" folder.
STEP 7. Open a command line window(cmd), change your directory to "android-sdk-windows/tools/" where adb and Sudoku.apk is located "cd" command(see the command line pic). Run the adb command "adb install Sudoku.apk" and Njoy :D
In case if you get error messages then please do read the tutorial again, see to it that you have copied the apk file in the right folder or there is no uppercase/lower case error while typing file name. Now switch to your Android emulator, and click on the menu button, you will observe that a Sudoku application appears in the grid view.
Hope you will be able to install your favourite Android apps using .apk files.
If you want to uninstall any application, then please do read this tutorial on how to uninstall Android .apk files from emulator.
"On other websites, people talk about Environment variables, but in this tutorial installation it has been achieved without doing so and it works superbly."
Keep visiting bOtskOOl Geeks section for more Geek like stuffs on Android.