Create and manage virtual devices

An Android Virtual Device (AVD) is a configuration that defines the characteristics of an Android phone, tablet, Wear OS, Android TV, or Automotive Bone device that you desire to simulate in the Android Emulator. The Device Manager is an interface yous tin can launch from Android Studio that helps you create and manage AVDs.

To open the new Device Manager, practice one of the post-obit:

  • From the Android Studio Welcome screen, select More Actions > Virtual Device Manager.

Opening the Device Manager from the Welcome screen

  • Afterward opening a project, select View > Tool Windows > Device Manager from the main menu bar.

New Device Manager window with "pair device" menu option highlighted

About AVDs

An AVD contains a hardware profile, system prototype, storage area, pare, and other properties.

We recommend that you create an AVD for each arrangement image that your app could potentially support based on the <uses-sdk> setting in your manifest.

Hardware profile

The hardware contour defines the characteristics of a device as shipped from the factory. The Device Manager comes preloaded with sure hardware profiles, such as Pixel devices, and y'all can ascertain or customize the hardware profiles as needed.

Notice that only some hardware profiles are indicated to include Play Store. This indicates that these profiles are fully CTS compliant and may apply system images that include the Play Store app.

Organisation images

A system image labeled with Google APIs includes access to Google Play services. A organisation paradigm labeled with the Google Play logo in the Play Store column includes the Google Play Store app and access to Google Play services, including a Google Play tab in the Extended controls dialog that provides a user-friendly button for updating Google Play services on the device.

To ensure app security and a consequent experience with physical devices, system images with the Google Play Shop included are signed with a release key, which ways that y'all cannot go elevated privileges (root) with these images. If y'all crave elevated privileges (root) to aid with your app troubleshooting, you can utilise the Android Open Source Project (AOSP) system images that do not include Google apps or services.

Storage area

The AVD has a defended storage expanse on your evolution auto. It stores the device user data, such every bit installed apps and settings, as well as an emulated SD card. If needed, y'all tin utilize the Device Director to wipe user data, and so the device has the same data as if it were new.

Pare

An emulator pare specifies the advent of a device. The Device Managing director provides some predefined skins. Yous can also define your own, or use skins provided by 3rd parties.

AVD and app features

Be sure your AVD definition includes the device features your app depends on. See Hardware Profile Properties and AVD Properties for lists of features y'all tin can define in your AVDs.

Create an AVD

Tip: If you desire to launch your app into an emulator, instead run your app from Android Studio and then in the Select Deployment Target dialog that appears, click Create New Virtual Device.

To create a new AVD:

  1. Open the Device Director.
  2. Click Create Device.

    The Select Hardware window appears.

    Find that only some hardware profiles are indicated to include Play Store. This indicates that these profiles are fully CTS compliant and may utilise system images that include the Play Store app.

  3. Select a hardware profile, and so click Next.
  4. If you don't see the hardware profile yous want, y'all can create or import a hardware profile.

    The System Epitome page appears.

  5. Select the system image for a particular API level, and then click Next.
  6. The Recommended tab lists recommended organisation images. The other tabs include a more than complete listing. The right pane describes the selected system prototype. x86 images run the fastest in the emulator.

    If yous meet Download adjacent to the arrangement prototype, y'all need to click information technology to download the system image. Yous must be connected to the internet to download it.

    The API level of the target device is important, because your app won't exist able to run on a system image with an API level that's less than that required by your app, as specified in the minSdkVersion attribute of the app manifest file. For more than information well-nigh the relationship betwixt system API level and minSdkVersion, run into Versioning Your Apps.

    If your app declares a <uses-library> element in the manifest file, the app requires a system epitome in which that external library is present. If you lot want to run your app on an emulator, create an AVD that includes the required library. To do and so, you might need to employ an add-on component for the AVD platform; for example, the Google APIs improver contains the Google Maps library.

    The Verify Configuration folio appears.

  7. Modify AVD backdrop as needed, and then click Finish.

    Click Evidence Advanced Settings to show more settings, such as the peel.

  8. The new AVD appears in the Virtual tab of the Device Director and the target drib-down carte.

To create an AVD starting with a copy:

  1. From the Virtual tab of the Device Manager, click Menu and select Indistinguishable.
  2. The Verify Configuration page appears.

  3. Click Change or Previous if you demand to make changes on the System Prototype and Select Hardware pages.
  4. Make your changes, and then click Finish.
  5. The AVD appears in the Virtual tab of the Device Manager.

Create a hardware profile

The Device Manager provides predefined hardware profiles for common devices so you can easily add them to your AVD definitions. If you need to define a unlike device, y'all can create a new hardware profile. Y'all can define a new hardware profile from the beginning, or copy a hardware contour as a showtime. The preloaded hardware profiles aren't editable.

To create a new hardware profile from the showtime:

  1. In the Select Hardware page, click New Hardware Profile.
  2. In the Configure Hardware Contour page, modify the hardware profile properties as needed.
  3. Click Finish.
  4. Your new hardware contour appears in the Select Hardware page. You can optionally create an AVD that uses the hardware profile by clicking Next. Or, click Cancel to return to the Virtual tab or target device drop-downwards menu.

To create a hardware profile starting with a re-create:

  1. In the Select Hardware folio, select a hardware profile and click Clone Device.
  2. Or correct-click a hardware profile and select Clone.

  3. In the Configure Hardware Profile page, change the hardware profile backdrop as needed.
  4. Click Stop.
  5. Your new hardware profile appears in the Select Hardware folio. You can optionally create an AVD that uses the hardware contour by clicking Adjacent. Or, click Abolish to return to the Virtual tab or target device drop-down menu.

Edit existing AVDs

From the Virtual tab of the Device Manager, yous can perform the following operations on an existing AVD:

Edit existing hardware profiles

From the Select Hardware page, you can perform the following operations on an existing hardware profile:

  • To edit a hardware profile, select it and click Edit Device. Or right-click a hardware profile and select Edit. Next, make your changes.
  • To delete a hardware profile, correct-click information technology and select Delete.

You can't edit or delete the predefined hardware profiles.

Run and stop an emulator, and clear data

From the Virtual tab, yous can perform the following operations on an emulator:

Import and export hardware profiles

From the Select Hardware page, yous can import and export hardware profiles:

  • To import a hardware contour, click Import Hardware Profiles and select the XML file containing the definition on your computer.
  • To export a hardware contour, correct-click it and select Export. Specify the location where you want to store the XML file containing the definition.

Hardware profile properties

You can specify the post-obit properties of hardware profiles in the Configure Hardware Profile page. AVD configuration properties override hardware profile properties, and emulator backdrop that y'all set while the emulator is running override them both.

The predefined hardware profiles included with the Device Manager aren't editable. All the same, you can copy them and edit the copies.

Hardware Profile Property Clarification
Device Proper name Proper name of the hardware profile. The proper noun tin comprise uppercase or lowercase letters, numbers from 0 to 9, periods (.), underscores (_), parentheses ( () ), and spaces. The proper noun of the file storing the hardware contour is derived from the hardware profile name.
Device Blazon Select 1 of the following:
  • Phone/Tablet
  • Wear OS
  • Android TV
  • Chrome Os Device
  • Android Automotive
Screen Size The concrete size of the screen, in inches, measured at the diagonal. If the size is larger than your computer screen, it'south reduced in size at launch.
Screen Resolution Type a width and height in pixels to specify the full number of pixels on the simulated screen.
Round Select this choice if the device has a round screen, such equally some Article of clothing OS devices.
Memory: RAM Type a RAM size for the device and select the units, ane of B (byte), KB (kilobyte), MB (megabyte), GB (gigabyte), or TB (terabyte).
Input: Has Hardware Buttons (Dorsum/Domicile/Menu) Select this option if your device has hardware navigation buttons. Deselect it if these buttons are implemented in software only. If you lot select this option, the buttons won't announced on the screen. You can use the emulator side panel to "printing" the buttons, in either example.
Input: Has Hardware Keyboard Select this selection if your device has a hardware keyboard. Deselect information technology if it doesn't. If y'all select this option, a keyboard won't announced on the screen. You can utilize your computer keyboard to send keystrokes to the emulator, in either case.
Navigation Style

Select ane of the following:

  • None - No hardware controls. Navigation is through the software.
  • D-pad - Directional Pad support.
  • Trackball
  • Wheel

These options are for actual hardware controls on the device itself. However, the events sent to the device past an external controller are the same.

Supported Device States

Select ane or both options:

  • Portrait - Oriented taller than broad.
  • Landscape - Oriented wider than tall.

If y'all select both, y'all can switch betwixt orientations in the emulator. You must select at to the lowest degree i pick to keep.

Cameras

To enable the camera, select one or both options:

  • Back-Facing Camera - The lens faces away from the user.
  • Front-Facing Camera - The lens faces toward the user.

Later on, you tin can use a webcam or a photo provided by the emulator to simulate taking a photo with the camera.

Sensors: Accelerometer Select if the device has hardware that helps the device determine its orientation.
Sensors: Gyroscope Select if the device has hardware that detects rotation or twist. In combination with an accelerometer, information technology tin can provide smoother orientation detection and support a six-axis orientation system.
Sensors: GPS Select if the device has hardware that supports the Global Positioning System (GPS) satellite-based navigation arrangement.
Sensors: Proximity Sensor Select if the device has hardware that detects if the device is close to your face during a call to disable input from the screen.
Default Pare Select a skin that controls what the device looks like when displayed in the emulator. Remember that specifying a screen size that's too large for the resolution tin can hateful that the screen is cutting off, and so y'all can't see the whole screen. Meet Create an emulator skin for more data.

AVD properties

You tin specify the following properties for AVD configurations in the Verify Configuration page. The AVD configuration specifies the interaction betwixt the development computer and the emulator, equally well every bit properties you desire to override in the hardware profile.

AVD configuration properties override hardware profile properties. Emulator properties that yous set while the emulator is running override them both.

AVD Property Description
AVD Proper name Name of the AVD. The name can comprise majuscule or lowercase messages, numbers from 0 to 9, periods (.), underscores (_), parentheses ( () ), dashes (-), and spaces. The name of the file storing the AVD configuration is derived from the AVD proper noun.
AVD ID (Advanced) The AVD filename is derived from the ID, and yous can use the ID to refer to the AVD from the command line.
Hardware Contour Click Change to select a unlike hardware profile in the Select Hardware page.
System Image Click Change to select a different arrangement image in the System Image page. An agile cyberspace connection is required to download a new epitome.
Startup Orientation

Select i pick for the initial emulator orientation:

  • Portrait - Oriented taller than broad.
  • Landscape - Oriented wider than alpine.

An option is enabled merely if it's selected in the hardware profile. When running the AVD in the emulator, you can change the orientation if both portrait and mural are supported in the hardware contour.

Camera (Avant-garde)

To enable a camera, select one or both options:

  • Front - The lens faces abroad from the user.
  • Back - The lens faces toward the user.

The Emulated setting produces a software-generated paradigm, while the Webcam setting uses your development estimator webcam to take a picture.

This pick is available only if it'southward selected in the hardware profile; information technology's non available for Wear Os and Android Television receiver.

Network: Speed (Advanced)

Select a network protocol to determine the speed of data transfer:

  • GSM - Global Organisation for Mobile Communications
  • HSCSD - High-Speed Excursion-Switched Information
  • GPRS - Generic Bundle Radio Service
  • EDGE - Enhanced Data rates for GSM Evolution
  • UMTS - Universal Mobile Telecommunications System
  • HSDPA - Loftier-Speed Downlink Parcel Access
  • LTE - Long-Term Evolution
  • Total (default) - Transfer data as chop-chop equally your reckoner allows.
Network: Latency (Advanced) Select a network protocol to set how much fourth dimension (delay) it takes for the protocol to transfer a data bundle from one indicate to another point.
Emulated Performance: Graphics

Select how graphics are rendered in the emulator:

  • Hardware - Employ your computer graphics card for faster rendering.
  • Software - Emulate the graphics in software, which is useful if you lot're having a problem with rendering in your graphics card.
  • Automatic - Let the emulator decide the all-time option based on your graphics card.
Emulated Performance: Boot option (Advanced)
  • Cold boot - Outset the device each time by powering up from the device-off land.
  • Quick kick - Start the device past loading the device country from a saved snapshot. For details, see Run the emulator with Quick Kicking.
Emulated Performance: Multi-Core CPU (Avant-garde) Select the number of processor cores on your reckoner that y'all'd similar to employ for the emulator. Using more processor cores speeds up the emulator.
Retentiveness and Storage: RAM The corporeality of RAM on the device. This value is set by the hardware manufacturer, but you lot can override it, if needed, such as for faster emulator operation. Increasing the size uses more than resources on your computer. Type a RAM size and select the units, one of B (byte), KB (kilobyte), MB (megabyte), GB (gigabyte), or TB (terabyte).
Retentiveness and Storage: VM Heap The VM heap size. This value is set by the hardware manufacturer, but you tin can override it, if needed. Type a heap size and select the units, one of B (byte), KB (kilobyte), MB (megabyte), GB (gigabyte), or TB (terabyte). For more than data on Android VMs, see Memory Management for Different Virtual Machines.
Retentivity and Storage: Internal Storage The amount of nonremovable memory infinite available on the device. This value is prepare by the hardware manufacturer, only y'all tin can override it, if needed. Type a size and select the units, one of B (byte), KB (kilobyte), MB (megabyte), GB (gigabyte), or TB (terabyte).
Retention and Storage: SD Menu The amount of removable memory infinite available to store information on the device. To use a virtual SD carte managed past Android Studio, select Studio-managed, type a size, and select the units, ane of B (byte), KB (kilobyte), MB (megabyte), GB (gigabyte), or TB (terabyte). A minimum of 100 MB is recommended to use the camera. To manage the infinite in a file, select External file and click ... to specify the file and location. For more information, encounter mksdcard and AVD data directory.
Device Frame: Enable Device Frame Select to enable a frame around the emulator window that mimics the look of a real device.
Custom Skin Definition (Advanced) Select a pare that controls what the device looks like when displayed in the emulator. Call up that specifying a screen size that'due south also big for the peel tin mean that the screen is cut off, and then y'all tin can't see the whole screen. Encounter Create an emulator peel for more information.
Keyboard: Enable Keyboard Input (Advanced) Select this option if you want to use your hardware keyboard to collaborate with the emulator. It's disabled for Wearable OS and Android Telly.

Create an emulator skin

An Android emulator skin is a collection of files that define the visual and command elements of an emulator display. If the peel definitions available in the AVD settings don't meet your requirements, y'all can create your own custom peel definition, and then utilise it to your AVD.

Each emulator skin contains:

  • A hardware.ini file
  • Layout files for supported orientations (landscape, portrait) and physical configuration
  • Image files for display elements, such equally background, keys and buttons

To create and use a custom skin:

  1. Create a new directory where you lot will relieve your peel configuration files.
  2. Ascertain the visual appearance of the pare in a text file named layout. This file defines many characteristics of the skin, such every bit the size and image assets for specific buttons. For case:
    parts {     device {         display {             width   320             height  480             x       0             y       0         }     }      portrait {         groundwork {             image background_port.png         }          buttons {             power {                 image  button_vertical.png                 x 1229                 y 616             }         }     }     ... }                      
  3. Add the bitmap files of the device images in the same directory.
  4. Specify additional hardware-specific device configurations in a hardware.ini file for the device settings, such as hw.keyboard and hw.lcd.density.
  5. Archive the files in the skin folder and select the annal file as a custom peel.

For more detailed data about creating emulator skins, see the Android Emulator Peel File Specification in the tools source code.