构建Android模拟器系统运行镜像(系统固件)_android虚拟设备镜像

二、编译

模拟器镜像是通过qemu运行的。源码中定义的product为sdk_phone_xx(xx为arm,arm64,x86,x86_64等)。我们需要通过下面的命令设置环境,选择要编译的目标product并启动编译过程。

$source ./build/envsetup.sh
$lunch sdk_phone_x86
$make -j32

如果想构建 x86_64 位Android虚拟机运行镜像,则需针对 64 位目标运行 lunch。编译完成后会生成镜像文件。通过命令emulator可以直接启动模拟器。

$lunch sdk_phone_x86_64
$make -j32

[ 99% 36747/36947] Target empty super fs image: out/target/product/emulator_x86_64/super_empty.img
2022-11-01 15:43:06 - build_super_image.py - INFO    : Building super image from info dict...
2022-11-01 15:43:06 - build_super_image.py - INFO    : Done writing image out/target/product/emulator_x86_64/super_empty.img
[ 99% 36901/36947] Target cache fs image: out/target/product/emulator_x86_64/cache.img
WARNING: out/target/product/emulator_x86_64/cache.img approaching size limit (16777216 now; limit 16777216)
[ 99% 36902/36947] Target userdata fs image: out/target/product/emulator_x86_64/userdata.img
WARNING: out/target/product/emulator_x86_64/userdata.img approaching size limit (576716800 now; limit 576716800)
ls99% 36939/36947] Create product-qemu.img


[ 99% 36944/36947] Target super fs image for debug: out/target/product/emulator_x86_64/super.img
2022-11-01 15:45:08 - build_super_im
  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值