Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Custom Android ROM on Emulator

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.

like image 634
Yohan Liyanage Avatar asked Aug 20 '17 04:08

Yohan Liyanage


1 Answers

Found out that it can be done using the following steps.

  1. 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.
  2. 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.
  3. 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.

like image 73
Yohan Liyanage Avatar answered Oct 22 '22 22:10

Yohan Liyanage