Android Virtual Devices and the Emulator
To use the emulator, you first must create one or more AVD configurations. In each
configuration, you specify an Android platform to run in the emulator and the set of hardware
options and emulator skin you want to use. Then, when you launch the emulator, you specify
the AVD configuration that you want to load.
To specify the AVD you want to load when starting the emulator, you use the
-avd argument, as shown in the previous section.
Each AVD functions as an independent device, with its own private storage for
user data, SD card, and so on. When you launch the emulator with an AVD configuration,
it automatically loads the user data and SD card data from the AVD directory. By default,
the emulator stores the user data, SD card data, and cache in the AVD directory.
To create and manage AVDs you use the android tool, a command-line utility
included in the SDK. For complete information about how to set up AVDs, see Android Virtual Devices.
Controlling the Emulator
You can use emulator
startup options and console commands to control the behaviors and
characteristics of the emulated environment itself.
When the emulator is running, you can interact with the emulated mobile
device just as you would an actual mobile device, except that you use your mouse
pointer to "touch" the touchscreen and your keyboard keys to
"press" the simulated device keys.
The table below summarizes the mappings between the emulator keys and and
the keys of your keyboard.
|Emulated Device Key
|Menu (left softkey)
||F2 or Page-up button
|Star (right softkey)
||Shift-F2 or Page Down
|Hangup/end call button
|Audio volume up button
|Audio volume down button
|Switch to previous layout orientation (for example, portrait, landscape)
|Switch to next layout orientation (for example, portrait, landscape)
|Toggle cell networking on/off
|Toggle code profiling
||F9 (only with
-trace startup option)
|Toggle fullscreen mode
|Toggle trackball mode
|Enter trackball mode temporarily (while key is pressed)
|DPad center click
|Onion alpha increase/decrease
||KEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/)
Note that, to use keypad keys, you must first disable NumLock on your development computer.