问题描述
我基于 AOSP(Nexus 6 为 7.0)构建了一个自定义 ROM,我想将此 ROM 与 SDK 模拟器一起使用.构建的午餐组合是aosp_x86_64-eng",我相信
I built a custom ROM based out of AOSP (7.0 for Nexus 6) and I would like to use this ROM with SDK emulator. The lunch combo for the build is 'aosp_x86_64-eng' which I believe
应该可以在 SDK 模拟器上运行.但是,我在 AVD Manager 中没有看到指定我的自定义系统映像的选项.它只允许我使用 Google 列出的 ROM.
should work on SDK emulator. However, I don't see an option in AVD Manager to specify my custom system image. It only allows me to use the listed ROMs from Google.
我尝试将自定义 ROM 的 system.img 复制到库存 Nexus 6 AVD 上,但之后模拟器无法启动.
I tried copying my custom ROM's system.img over the stock Nexus 6 AVD but the emulator doesn't launch after that.
请注意,在构建过程中生成的模拟器可以正常工作.但是构建发生在服务器上,我想在我的开发机器上使用生成的 ROM 和我的 SDK 的 AVD 管理器.
Note that the emulator that gets generated during the build works fine. But the build happens on a server, and I want to use the generated ROM on my development machine with my SDK's AVD Manager.
推荐答案
发现可以通过以下步骤完成.
Found out that it can be done using the following steps.
- 使用库存 AVD 系统映像创建兼容的 AVD.在我的例子中,我使用了一个系统映像,它适用于在 x86_64 ABI 上运行 Nougat 的 Nexus 6.
- 转到 ~/.android/avd 文件夹,然后找到您在上面创建的 AVD 的文件夹(例如 ~/.android/avd/test.avd).将您的自定义 system.img 文件复制到该文件夹中.
- 运行模拟器!
当我第一次尝试时,这对我不起作用,因为我选择了错误的基础映像(Nougat x86 而不是 x86_64).关键是确保库存系统映像与您的构建完全兼容.
When I tried it for the first time this didn't work for me because I have chosen the wrong base image (Nougat x86 instead of x86_64). Catch is to make sure that the stock system image is fully compatible with your build.
这篇关于在模拟器上运行自定义 Android ROM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!