Toll Free - 855-572-2777 / 855-572-APPS

Our Thinking

Installing APK Files on Android Device Emulator

By Shailendra Sinhasane | In Android | on February 1, 2010

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

2 Comments to "Installing APK Files on Android Device Emulator"

    *
  • Android Emulator For Pc says:

    March 21, 2014 at 11:56 PM -

    Good day! This post couldn’t be written any better! Reading this
    post reminds me of my old room mate! He always
    kept talking about this. I will forward this write-up to
    him. Fairly certain he will have a good read. Thank you for
    sharing!

  • Ali says:

    August 10, 2013 at 2:26 AM -

    this message appears after editing the path.
    thanks in advance
    ‘abd’ is not recognized as an internal or external command,
    operable program or batch file.

Leave a Reply

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


five − = 3

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Leave a Reply

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


seven − 5 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright by Mobisoft Infotech LLC 2013, All rights reserved
GET IN TOUCH