diff --git a/docs/html/images/tools/as-avd-start.png b/docs/html/images/tools/as-avd-start.png new file mode 100644 index 0000000000000..02c58ef044517 Binary files /dev/null and b/docs/html/images/tools/as-avd-start.png differ diff --git a/docs/html/images/ui/studio-avdmgr-icon.png b/docs/html/images/ui/studio-avdmgr-icon.png deleted file mode 100644 index c90b73e1ecaf4..0000000000000 Binary files a/docs/html/images/ui/studio-avdmgr-icon.png and /dev/null differ diff --git a/docs/html/tools/devices/emulator.jd b/docs/html/tools/devices/emulator.jd index d7bb8c75a0161..dc9294bf1486b 100644 --- a/docs/html/tools/devices/emulator.jd +++ b/docs/html/tools/devices/emulator.jd @@ -160,7 +160,7 @@ href="{@docRoot}tools/devices/index.html">Managing Virtual Devices.
During development and testing of your application, you install and run your application in the Android emulator. You can launch the emulator as a standalone -application from a command line, or you can run it from within your Eclipse +application from a command line, or you can run it from within your Android Studio development environment. In either case, you specify the AVD configuration to load and any startup options you want to use, as described in this document.
@@ -188,13 +188,13 @@ window. For more information about command line options for the emulator, see th instances of the emulator concurrently, each with its own AVD configuration and storage area for user data, SD card, and so on. -If you are working in Eclipse, the ADT plugin for Eclipse installs your -application and starts the emulator automatically, when you run or debug -the application. You can specify emulator startup options in the Run/Debug +
When you run your app from Android Studio, it installs and launches the +app on your connected device or emulator (launching the emulator, if necessary). +You can specify emulator startup options in the Run/Debug dialog, in the Target tab. When the emulator is running, you can issue console commands as described later in this document.
-If you are not working in Eclipse, see Installing Applications
+ If you are not working in Android Studio, see Installing Applications
on the Emulator for information about how to install your application. To stop an emulator instance, just close the emulator's window.
If you don't have access to Eclipse or the ADT Plugin, you can install your application on the +
If you don't have access to Android Studio, you can install your application on the
emulator using the adb utility. Before
installing the application, you need to build and package it into an .apk as described
in Building and
@@ -287,16 +287,16 @@ option:
Android 4.0.3 (API Level 15, revision 3) or higher system image target. Graphics acceleration is not
available for earlier system images.
Note: You must provide an x86-based AVD configuration name, otherwise VM acceleration will not be enabled.
Note: You must provide an x86-based AVD configuration name, otherwise VM acceleration will not be enabled.
-Note: You must provide an x86-based AVD configuration name, otherwise VM acceleration will not be enabled.
--qemu -m 512 -enable-kvm
-data <filepath>, where <filepath> is the
path the image, relative to the current working directory. If you supply a filename only,
the emulator looks for the file in the current working directory. If the file at <filepath> does
-not exist, the emulator creates an image from the default userdata.img, stores it under the name you
+not exist, the emulator creates an image from the default userdata.img, stores it under the name you
specified, and persists user data to it at shutdown. To learn how to manage AVDs using a graphical tool, read Managing AVDs with AVD Manager. To -learn how to manage AVDs on the command line, read + learn how to manage AVDs on the command line, read Managing AVDs from the Command Line.
diff --git a/docs/html/tools/devices/managing-avds.jd b/docs/html/tools/devices/managing-avds.jd index 9afa88a803917..4ca858846dbb6 100644 --- a/docs/html/tools/devices/managing-avds.jd +++ b/docs/html/tools/devices/managing-avds.jd @@ -10,100 +10,110 @@ parent.link=index.html -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.
The AVD Manager is a tool you can use + to create and manage Android virtual devices (AVDs), which define device configurations + for the Android Emulator.
+ +To launch the AVD Manager:
+
in the toolbar.tools/ directory and execute:
+ $ android avd+
The AVD Manager main screen shows your current virtual devices, as shown in figure 1.
+
- Figure 1. AVD Manager.
+Figure 1. The AVD Manager main screen shows your current + virtual devices.
+ + +Note: If you launch the AVD Manager from the command line, the UI +is different than how it appears in Android Studio, as documented here. Most of the same +functionality is available, but the command-line version of the AVD Manager +is currently not documented.
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.
+You can create as many AVDs as you would like to use with the Android Emulator. + To effectively test your app, you should create an AVD that models each device type for which + you have designed your app to support. For instance, you should create an AVD for each + API level equal to and higher than the minimum version you've specified in your manifest + {@code <uses-sdk>} tag.
-To create an AVD:
+To create an AVD based on an existing device definition:
In the Select Hardware window, select a device configuration, such as Nexus 6, + then click Next.
- -tools/ directory and execute the
- android tool with no arguments.
+ Figure 2. The Select Hardware window.
Click Create Virtual Device to create an AVD. The - Select Hardware dialog appears.
- -
- Figure 2. Select Hardware window.
+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.
+If necessary, click Show Advanced Settings to select a custom skin + for the hardware profile and adjust other hardware settings.
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).
-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: -
+To launch the AVD in the Android Emulator, click the launch button
+
+ in the list of AVDs.
In case the available device definitions do not match the device type you'd like to emulate, +you can create a custom device definition for your AVD:
+Or, to start from scratch, click New Hardware Profile.
+The following Configure Hardware Profile window (figure 3) allows you to specify various +configurations such as the screen size, memory options, input type, and sensors.
+ +When you're done configuring the device, click Finish.
+ +
+ Figure 3. The Configure Hardware window when + creating a custom device configuration.
+If you are creating a new AVD, you can specify the following hardware options for the AVD to emulate:
@@ -264,28 +274,31 @@ to emulate: -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:
+An Android emulator skin is a collection of files that define the visual and control elements of +an emulator display. If the skin definitions available in the AVD settings don't meet your needs, +you can create your own custom skin definition, then apply it to your AVD from the +advanced settings on the Verify Configuration screen.
+ +Each emulator skin contains:
hardware.ini file for initialization settingshardware.ini fileTo create and use a custom skin:
-layout
- in the skin folder.
-++
+- Create a new directory where you will save your skin configuration files.
+- Define the visual appearance of the skin in a text file named +
-layout. This file defines many characteristics of the skin, such as the + size and image assets for specific buttons. For example: +parts { - device { display { - width 1080 - height 1920 + width 320 + height 480 x 0 y 0 } @@ -299,32 +312,25 @@ parts { buttons { power { image button_vertical.png - x 1229 - y 616 + x 1229 + y 616 } } } - ... + ... } -- Creates a
-hardware.inifile 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:-# skin-specific hardware values -hw.lcd.density=213 -vm.heapSize=48 -hw.ramSize=1024 -hw.keyboard.lid=no -hw.mainKeys=no --- Add the bitmap files of the device images to the skin folder.
-- Archive the files in the skin folder.
-- Create a new AVD and select the archive file as a custom skin.
-
hardware.ini
+ file for the device settings, such as hw.keyboard and
+ hw.lcd.density.For more detailed information about creating emulator skins, see the +Android Emulator Skin File Specification in the tools source code.
+ -You can now run the AVD with a custom skin for testing and viewing your app.