You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

编译Android14 AOSP并运行模拟器时出现fstab错误求助

解决思路

核心问题是镜像路径与编译目标不匹配:你执行lunch aosp_cf_x86_64-phone-trunk_staging-userdebug指定的编译目标是cf_x86_64_phone,但启动模拟器时却引用了vsoc_x86_64目录下的镜像,导致init无法找到对应设备的fstab配置文件。

具体修复步骤

  1. 修正启动命令的路径:将所有vsoc_x86_64替换为cf_x86_64_phone,命令如下:
emulator \
  -kernel ./out/target/product/cf_x86_64_phone/kernel \
  -ramdisk ./out/target/product/cf_x86_64_phone/ramdisk.img \
  -system ./out/target/product/cf_x86_64_phone/system.img \
  -data ./out/target/product/cf_x86_64_phone/userdata.img \
  -vendor ./out/target/product/cf_x86_64_phone/vendor.img \
  -no-audio \
  -no-window \
  -selinux permissive \
  -show-kernel \
  -verbose
  1. 更简便的启动方式:编译完成后,直接执行emulator命令即可——lunch操作已经配置好正确的环境变量,模拟器会自动加载cf_x86_64_phone目录下的镜像文件,无需手动指定路径。

额外排查点

  • 确认out/target/product/cf_x86_64_phone目录下存在所有需要的镜像文件(kernel、ramdisk.img、system.img等)
  • 检查是否在编译后切换过终端窗口或重置过环境变量,若有需重新执行source build/envsetup.sh和lunch aosp_cf_x86_64-phone-trunk_staging-userdebug

内容的提问来源于stack exchange,提问作者Marco Polo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 08:47:36