Installing .apk Files onto an Emulator via the ADB
In Chapter: Getting Started
Author: Rachee Singh ('racheesingh')
You have an application's .apk file, and want to installing it on the emulator to check out the application, or because an application you are developing requires it.
Use the command-line ADB to install the .apk on the running emulator; this can also be used to install an APK onto a connected Android phone).
To install the .apk, follow the following steps:
- Find the location on your machine where you have installed Android SDK. In the Android SDK directory, go to tools directory.
- Look for an executable 'adb' in the tools directory. If it is present then that is the location of adb, otherwise, there must be a .txt file named 'adb has moved'. The contents of the file would point you to the location of adb. This file states that adb is present in the 'platform-tools' directory within the Android SDK installation directory.
'tools' directory, with adb has moved.txt :
- Once you have located the adb, go to that location on the command prompt.
- Use the command: ./adb install location of the apk you want to install for Linux. For Windows: adb install location of the apk you want to install
- This should start the installation on the current device running (It could be an Emulator that is running or an Android device that is connected).
- After the installation finishes, in the Menu of the Android device/Emulator you would see the icon of the application you just installed.