编译:
1. 初始化:
source build/envsetup.sh
2. 选择target
lunch
然后选择aosp_arm
3.
make -j4
等待大概2个小时,就可以顺利编译完成。
模拟器运行
直接运行emulator,会出现如下错误:
emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.
原因是文件路径没有设置,解决办法添加绝对路径:
out/host/Linux-x86/bin/emulator -kernel prebuilts/qemu-kernel/arm/kernel-qemu -sysdir out/target/product/generic/ -system out/target/product/generic/system.img -ramdisk out/target/product/generic/ramdisk.img -data out/target/product/generic/userdata.img -sdcard sdcard.img -scale 0.7 -memory 512 -partition-size 1024
然后运行模拟器