page.title=Managing AVDs with AVD Manager parent.title=Managing Virtual Devices parent.link=index.html @jd:body

In this document

  1. Creating an AVD
    1. Hardware options

The AVD Manager is an easy to use user interface to manage your AVD (Android Virtual Device) configurations. An AVD is a device configuration for the Android emulator that allows you to model different configurations of Android-powered devices. When you start the AVD Manager in Android Studio or navigate to your SDK's {@code tools/} directory and execute android avd, you will see the AVD Manager main screen with your current virtual devices. You can right-click an existing AVD to perform actions on the AVD, such as delete, duplicate, wipe data, show on disk, and display details.

Figure 1. AVD Manager.

Creating an AVD

You can create as many AVDs as you would like to test on. It is recommended that you test your applications on all API levels higher than the target API level for your application.

To create an AVD:

  1. Start the AVD Manager:
  2. Click Create Virtual Device to create an AVD. The Select Hardware dialog appears.

    Figure 2. Select Hardware window.

  3. Select the device category and form factor. Click Edit Device to modify an existing AVD, or click New Hardware Profile to create a new hardware profile. Click Next to continue.

    The hardware profile includes settings for screen size, camera, memory options,input type, and sensors. For a list of hardware features, see Hardware options.

    Figure 3. Configure Hardware window.

  4. Select the desired system image. Click Install Latest Version to download a new system image. Click Next to continue.
  5. Fill in the details for the AVD.

    Give it a name, device type, platform target, image size, orientation, and emulator performance. Click Show Advanced Settings to assign a custom skin to the hardware profile and other advanced settings for the device type.

    Tip:Store custom skins in an easily accessible directory, such as ~/skins. From information about custom skins, see Skins.

    Figure 4. Configure AVD window.

    Tip: Be sure to define a target for your AVD that satisfies your application's Build Target (the AVD platform target must have an API Level equal to or greater than the API Level that your application compiles against).

  6. Click Finish.

Your AVD is now ready and you can either close the AVD Manager, create more AVDs, or manage an emulator with the AVD by clicking an icon in the Actions column:

Hardware options

If you are creating a new AVD, you can specify the following hardware options for the AVD to emulate:

Characteristic Description Property
Device ram size The amount of physical RAM on the device, in megabytes. Default value is "96". hw.ramSize
Touch-screen support Whether there is a touch screen or not on the device. Default value is "yes". hw.touchScreen
Trackball support Whether there is a trackball on the device. Default value is "yes". hw.trackBall
Keyboard support Whether the device has a QWERTY keyboard. Default value is "yes". hw.keyboard
DPad support Whether the device has DPad keys. Default value is "yes". hw.dPad
GSM modem support Whether there is a GSM modem in the device. Default value is "yes". hw.gsmModem
Camera support Whether the device has a camera. Default value is "no". hw.camera
Maximum horizontal camera pixels Default value is "640". hw.camera.maxHorizontalPixels
Maximum vertical camera pixels Default value is "480". hw.camera.maxVerticalPixels
GPS support Whether there is a GPS in the device. Default value is "yes". hw.gps
Battery support Whether the device can run on a battery. Default value is "yes". hw.battery
Accelerometer Whether there is an accelerometer in the device. Default value is "yes". hw.accelerometer
Audio recording support Whether the device can record audio. Default value is "yes". hw.audioInput
Audio playback support Whether the device can play audio. Default value is "yes". hw.audioOutput
SD Card support Whether the device supports insertion/removal of virtual SD Cards. Default value is "yes". hw.sdCard
Cache partition support Whether we use a /cache partition on the device. Default value is "yes". disk.cachePartition
Cache partition size Default value is "66MB". disk.cachePartition.size
Abstracted LCD density Sets the generalized density characteristic used by the AVD's screen. Default value is "160". hw.lcd.density

Using Custom Emulator Skins

A custom Android emulator skin is a collection of files that enable you to customize the visual and control elements of an emulator display. Custom emulator skins enable you to define variations of emulation properties, such as the use of a trackball or touchscreen, to match your device customizations. Each custom emulator skin contains:

To create and use a custom skin:

  1. Create a skin folder in an easily accessible location, such as ~/skins.
  2. Define the skin orientation and configuration settings in a file called layout in the skin folder.
    parts {
    
        device {
            display {
                width   1080
                height  1920
                x       0
                y       0
            }
        }
    
        portrait {
            background {
                image background_port.png
            }
    
            buttons {
                power {
                    image  button_vertical.png
                     x  1229
                     y  616
                }
            }
        }
      ...
    }
    
    
  3. Creates a hardware.ini file for the skin-specific properties that determine emulator specifications and behavior. For a complete list of emulator properties, see Managing AVDs from the Command Line. For example:
  4. # skin-specific hardware values
    hw.lcd.density=213
    vm.heapSize=48
    hw.ramSize=1024
    hw.keyboard.lid=no
    hw.mainKeys=no
    
  5. Add the bitmap files of the device images to the skin folder.
  6. Archive the files in the skin folder.
  7. Create a new AVD and select the archive file as a custom skin.

You can now run the AVD with a custom skin for testing and viewing your app.