Integrating a new Android AVD (Emulator) into Android SDK

Hi

In this post i would simply show the quick and simple steps on how to add a new OEM Emulator into your Android SDK and run a sample Android application (APK) on it or on a specific Emulator.

The assumption for this post is that you’ve already downloaded and installed on your Windows/Linux machine the latest Android SDK.
If you have not yet done so, you may download the SDK from: http://developer.android.com/sdk/index.html

** Please note that the SDK requires a JDK (Java Development Kit) to be installed on your PC.

Once you have the SDK installed, you will have a basic skin/AVD (Android Virtual Device) to work with, which comes with the SDK.

As application developer/tester you know that 1 emulator will not give you enough confidence about your application functionality and behavior (without getting into the debate of the use of real device – which i tend to recommend to start ASAP and in the worse case, no later than Beta milestone), so you need to get as much coverage as possible using as many emulators as possible.

Most OEM’s develop and provide for free many emulators which you can simply add to your sdk (We have Samsung, Motorola, LG and HTC as well as Sony Ericsson who provide Tablets and Smartphones emulators which you can download and deploy in the SDK).

From your SDK installation path, simply paste the ZIP with the AVD files into the folder:

{SDK_HOME}/platforms/android-xx/skins –> When android-xx stands for the version of Android on which you wish you run your application on (e.g. – Android-10 stands for Android 2.3.3 Ginger Bread, while android-15 stands for Android ICS 4.0.3).

See example of a folder into which i created few simulators (or AVD’s):

The problems which people often ran into or ask about are, what is the method to install and run an application through the ADB command line on a specific emulator while i have 2 or more running?

The answer is simple:

From the command line assuming you have few AVD’s running, run the command “adb devices”

You will get an output in the below form:

“C:\android-sdk_r18-windows\android-sdk-windows\platform-tools>adb devices
List of devices attached
emulator-5560   device
emulator-5564   device”

If you than want to install an APK on 1 of the above emulators (e.g. emulator-5560), simply run this command:

“adb -s emulator-5560 install “demo.apk”

 

That’s it

I know that it is a quick and short post, if you have any problems or questions about the above – feel free to ask

Regards,

Eran Kinsbruner

3 Replies to “Integrating a new Android AVD (Emulator) into Android SDK”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: