Issue
I follow the Android doc to build an AOSP (Android 10).
source build/envsetup.sh
lunch aosp_x86-eng
m -j32
Once building successfully, I use the emulator command to test if the built image can run. On my server running CentOS 8 Stream, the emulator can launch successfully and everything looks good.
However, when I try to move the built system image to my MacBook, the emulator only shows a blank screen even after 5 minutes.
I used to build an Android 7 system image (see here). All I need to do is to move the system.img and ramdisk.img to my MacBook's SDK folder. But this does not work for Android 10.
What should I move (e.g., system.img, ramdisk.img, vendor.img, userdata.img...) to make the built AOSP running on my Mac's emulators?
Solution
After understanding more about AOSP build outputs (especially all the .imgs under out/target/product/generic_x86), here is what I did to load the self-built system image on Mac's emulators:
- Copy
system-qemu.imgto<android_sdk>/system-images/android-29/google_apis/x86on the MacBook. Then renamesystem-qemu.imgtosystem.img(You can delete the originalsystem.imgor just give it another name). - Copy
VerifiedBootParams.textprototo<android_sdk>/system-images/android-29/google_apis/x86on the MacBook. Also remember to delete or rename the original one before copying. I guess it has something to do withvbmeta.img, which is used to verifysystem.img. Without this file, your emulators cannot launch because of verification failure. Refer here for more details.
Answered By - Richard Hu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.