问题
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
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.
I tried copying my custom ROM's system.img over the stock Nexus 6 AVD but the emulator doesn't launch after that.
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.
回答1:
Found out that it can be done using the following steps.
- Create a compatible AVD using the stock AVD System Images. In my case, I used a system image that is for Nexus 6 running Nougat on x86_64 ABI.
- Go to ~/.android/avd folder and then locate the folder for the AVD that you created above (ex. ~/.android/avd/test.avd). Copy your custom system.img file into that folder.
- Run the emulator!
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.
来源:https://stackoverflow.com/questions/45778555/running-custom-android-rom-on-emulator