This article will give an overview of Android* Virtual Device (AVD) Emulation, introduce the x86 Android* Emulator, and how to configure and create AVD, general AVD usage, additional options and tips.
Table of Contents
- Overview of Android* Virtual Device Emulation
- Android* Emulation for Intel® Architecture
- Creating AVD Configurations
- AVD Usage
Overview of Android* Virtual Device Emulation
Android* runs on a variety of form factor devices with different screen sizes, hardware capabilities, and features. A typical device has a multitude of software (Android* API) and hardware capabilities like sensors, GPS, camera, SD card and multi-touch screen with specific dimensions.
Android* developers looking for a way to develop, test and verify their Android* apps on a variety of Android* devices and targeting different Android* APIs (eg: Gingerbread*, Honeycomb*) need development tools to help make this process as simple as possible.
Android* SDK comes with support for device emulation. The emulator is quite flexible and configurable with different software and hardware configuration options. Developers can customize the emulator using the emulator configuration called Android* Virtual Device (AVD). AVD can be thought of as a set of configuration files that specify different Android* software and device hardware capabilities. The Android* Emulator uses these AVD configurations to configure and start the appropriate Android* virtual image on the emulator.
As documented on Android* website (http://developer.android.com/guide/developing/devices/index.html), a typical AVD configuration has
- A hardware profile that specifies all the device capabilities (eg: camera, sensors)
- A System image to be used by the emulator for this AVD (API level to target eg: Gingerbread or Honeycomb)
- A Data image that acts as the dedicated storage space for user’s data, settings and SD card
- Other options including emulator skin, the screen dimensions, SD card size
Android* Emulator for Intel® Architecture
Android* runs on a variety of Intel® Architecture-based devices that could potentially have different software (Android* APIs) and hardware capabilities. Android* app developers looking to target Intel Architecture-based devices can use the emulator for development purposes.
Developers are encouraged to target different API levels, screen sizes, and hardware capabilities like camera, sensors, multi-touch among others. The AVD configuration can be used to customize the emulator as need. Developers can create as many AVDs as needed, each targeting a different variety of Intel Architecture-based Android* device.
For example, a developer can create an IA based Gingerbread AVD with a built-in skin like WVGA800 or a custom one manually specifying the screen resolution to be used. A separate IA based Honeycomb AVD can be created for targeting the Tablet form-factor apps as well.
Android* SDK as of version r12 (July 2011 release), supports Intel Architecture-based Android* Emulation. The SDK integrates this support into all developer tools including the eclipse ADT plugin.
Below is a sample screenshot of Android* Emulator for x86 running Gingerbread* version. Model number is highlighted, which shows “Full Android* on x86 Emulator”.
For detailed instructions on how to use the emulator please refer to the Android* documentation at this link http://developer.android.com/guide/developing/devices/emulator.html
The following sections will cover basics of creating AVD configurations, their usage and some tips.
Creating AVD Configurations
Before we can use Android* Emulator, we need to first create an AVD configuration which specifies the software settings, targets API level and hardware feature options.
Android* SDK provides a tool named “android” which lets users create and modify AVD configurations. The “android” tool can be used in two ways to create or modify AVD configurations –as a command line or from GUI screen of “android” tool.
The “android” tool is located under “tools” folder of SDK installation folder. For example, on Linux* it is located at “android-sdk-linux_x86/tools/android”.
To use the "android" tool in GUI mode, simple run the “android” tool without any command line arguments. Users can also invoke it directly from Eclipse* ADT plugin. It will bring up “Android SDK and AVD Manager” as shown in below screenshot:
Figure 2: Screenshot of Android* SDK and AVD Manager “android” tool
For more details on invoking and creating of basic AVD configurations please refer to the Android* website http://developer.android.com/guide/developing/devices/managing-avds.html#createavd
AVD configuration involves software options as well as hardware features. Clicking “New…” button shown in Figure 2, brings up the “create new AVD” dialog shown in figure 3.
Typically a user just needs to fill in the “Name”, “Target” and “CPU/ABI” fields for basic AVD configuration. The Tool will fill out default values for other options. Users can further customize the AVD as needed. The below annotated screenshot illustrates all the options.
Under “Hardware” the tool supports several hardware configuration options. The user can click on “New…” button which brings up another GUI dialog with a dropdown option “Property”. The screenshot below shows all the hardware properties available.
Figure 4: AVD hardware properties
Android* developers are encouraged to multiple AVDs to target different API levels, skins, or other custom hardware features.
The screenshot below illustrates a simple 5-step process to create an AVD configuration for Intel Architecture.
Figure 5: Basic 5 step process to create Honeycomb AVD configuration for IA
AVD configurations can also be created and managed from command line using “android” tool as discussed here: http://developer.android.com/guide/developing/devices/managing-avds-cmdline.html
Example Creation of AVD from command line for Intel Architecture: avd create avd –n HC –t android-13 –s WXGA
Accept “yes” for custom hw and choose x86 for hw.cpu.arch property
When users create AVD configurations, the SDK "android" tool saves these configurations under the user’s home directory. According to Android* documentation, the default storage location for AVDs is in ~/.android/avd on Mac OS X* and Linux*, C:\Documents and Settings\\.android\ on Windows XP*, and C:\Users\\.android\ on Microsoft Windows Vista*.
Using AVD configurations is an easy process.
The emulator can be invoked from “android” GUI tool or command line or directly from Eclipse* itself.
The screenshot below illustrates the process of invoking the emulator with chosen AVD configuration (in this case AVD configuration called “HC”).
This article covered Android* Virtual Device Emulation basics, how to create an AVD for Intel Architecture devices and AVD usage with Android* Intel Architecture Emulator.
* Other names and brands may be claimed as the property of others
Copyright © 2011 Intel Corporation. All rights reserved.
Intel and Atom are trademarks of Intel Corporation in the U.S. and/or other countries.
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR.
Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined". Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information.
The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.
Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.
Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or go to: http://www.intel.com/design/literature.htm
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.