Understanding the default directories and files
The emulator uses associated files, of which the AVD system and data directories are the most important. It helps to understand the emulator directory structure and files when specifying command-line options. Although, you normally don't need to modify the default directories or files.
The Android Emulator uses the Quick Emulator (QEMU) hypervisor. Initial versions of the Android Emulator used QEMU 1 (goldfish), and later versions use QEMU 2 (ranchu).
AVD system directory
The system directory contains the Android system images that the emulator uses to simulate the operating system. It has platform-specific, read-only files shared by all AVDs of the same type, including API level, CPU architecture, and Android variant. The default locations are the following:
v Mac OS X and Linux - ~/Library/Android/sdk/system-images/android-apiLevel/variant/arch/
v Microsoft Windows XP - C:\Documents and Settings\user\Library\Android\sdk\system-images\android-apiLevel\variant\arch\
v Windows Vista - C:\Users\user\Library\Android\sdk\system-images\android-apiLevel\variant\arch\
Where:
Ø apiLevel is a numeric API level, or a letter for preview releases. For example, android-M indicated the Android Marshmallow preview. On release, it became API level 23, designated by android-23.
Ø variant is a name corresponding to specific features implemented by the system image; for example, google_apis or android-wear.
Ø arch is the target CPU architecture; for example, x86.
Use the -sysdir option to specify a different system directory for the AVD.
The emulator reads the following files from the system directory.
File |
Description |
Option to Specify a Different File |
kernel-qemu or kernel-ranchu |
The binary kernel image for the AVD. kernel-ranchu is the QEMU 2 emulator, the latest version. |
-kernel |
system.img |
The read-only initial version of the system image; specifically, the partition containing the system libraries and data corresponding the API level and variant. |
-system |
ramdisk.img |
The boot partition image. This is a subset of system.img that's loaded by the kernel initially before the system image is mounted. It typically contains just a few binaries and initialization scripts. |
-ramdisk |
userdata.img |
The initial version of the data partition, which appears as data/ in the emulated system and contains all writable data for the AVD. The emulator uses this file when you create a new AVD or use the ‑wipe-data option. For more information, see the userdata-qemu.img file description in the following section. |
-initdata |