How to install an APK into your device or emulator through command prompt or shell.

By | December 27, 2011

In this post I will show you how to install an apk on to the emulator or the device through the shell or command prompt.
Before experimenting with this post I assume that you have these done

1. Installed the Android SDK.
2. Added the adb path to the environment path.

This is how you add the path to the environment variable.

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.

Now In windows Go to command prompt and type

C: adb devices

if you have correctly set your path then your android devices will be listed here.

then copy your apk to the C: directory and issue this command

C:adb install your_apk.apk

Take a look at the screenshot. Here I am installing CreateTable.apk that is located in the C: directory.

Install the APK onto emulator.

Install the APK onto emulator or device

Leave a Reply

Your email address will not be published. Required fields are marked *