Ubuntu 22.04 安装 Cuttlefish 模拟器
Haiya Lv3

如果是国内网络环境,建议提前在 .bashrc 中配置好 http_proxyhttps_proxy

环境准备

1
2
sudo apt install -y sudo libfdt-dev git devscripts config-package-dev debhelper-compat bridge-utils libarchive-tools golang curl
git clone https://github.com/google/android-cuttlefish.git

构建

1
2
cd android-cuttlefish
./tools/buildutils/build-packages.sh

如果构建时遇到网络问题,请尝试修改以下文件

tools/buildutils/installbazel.sh

frontend/src/goutil

frontend/setup-nodejs-env.sh

安装

1
2
3
apt install ./cuttlefish-base_*.deb
apt install ./cuttlefish-user_*.deb
reboot

启动

构建 AOSP 参考:Ubuntu 22.04 构建 Android 14

1
2
3
4
5
6
cd ~/aosp/
source build/envsetup.sh
# -x_res/-y_res 为模拟器分辨率,如果需要重置所有设备,则添加参数 --resume=false
launch_cvd –start_webrtc=true -console=true -x_res=1280 -y_res=800
# OR
# launch_cvd -vm_manager=qemu_cli

访问

使用浏览器打开

1
https://localhost:8443

cuttlefish-cloud-android

模拟器启动后,支持在本机使用 adb 进行操作

References

由 Hexo 驱动 & 主题 Keep