AOSP编译完成后启动Android Emulator报错求助
解决AOSP Cuttlefish模拟器启动失败问题
问题场景
编译完成AOSP构建版本后,执行命令:
launch_cvd --daemon
启动Cuttlefish虚拟设备时,出现以下错误:
06-03 14:31:46.869 2117619 2117619 I launch_cvd: main.cc:179 Using system_image_dir of: =================================================================== NOTICE: By using this Android Virtual Device, you agree to Google Terms of Service (https://policies.google.com/terms). The Google Privacy Policy (https://policies.google.com/privacy) describes how Google handles information generated as you use Google Services. =================================================================== Automatically send diagnostic information to Google, such as crash reports and usage data from this Android Virtual Device. You can adjust this permission at any time by running "launch_cvd -report_anonymous_usage_stats=n". (Y/n)?:n 读取--config选项来自:/path/to/output_file/out/target/product/vsoc_x86_64/android-info.txt 使用--config='phone'启动CVD。 执行/usr/lib/cuttlefish-common/bin/capability_query.py失败(没有该文件或目录) 本机器不支持VM管理器crosvm。 无效的vm_manager: crosvm 06-03 14:31:56.823 2117619 2117619 E launch_cvd: subprocess.cpp:207 子进程2122296被信号'Aborted'(6)中断 06-03 14:31:56.823 2117619 2117619 E launch_cvd: main.cc:263 assemble_cvd返回-1
错误原因
- 缺少Cuttlefish虚拟设备的核心依赖工具,导致
capability_query.py文件缺失 - 当前系统不支持
crosvm作为虚拟机管理器,启动时默认使用该管理器导致失败
解决方案
1. 安装Cuttlefish依赖包
针对Debian/Ubuntu系列发行版,执行以下命令安装所需依赖:
sudo apt update sudo apt install cuttlefish-common cuttlefish-user
安装完成后,验证文件是否存在:
ls /usr/lib/cuttlefish-common/bin/capability_query.py
2. 指定使用QEMU作为虚拟机管理器启动
由于系统不支持crosvm,启动时手动指定vm_manager参数为qemu:
launch_cvd --daemon --vm_manager=qemu
3. 验证模拟器状态
启动完成后,执行以下命令确认模拟器是否正常运行:
cvd status
内容的提问来源于stack exchange,提问作者Nitish Sharma
相关产品推荐
相关产品推荐

