通过命令行的方式启动android studio中的模拟器
启动模拟器时需要读取下面四个文件 :
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 -init-data |
在sdk/tools目录下 执行./emulator -adv 模拟器的名称 -system system.img -data userdata.img -ramdisk ramdisk.img -kernal kernal-qemu-armv7 的方式启动模拟器
可以使用emulator -list-avds命令来查看模拟器的列表。
也可以通过命令行创建模拟器
$ ./android create avd -n mydroid -t 1