14

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.

Yohan Liyanage
  • 6,840
  • 3
  • 46
  • 63

1 Answers1

17

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.

Yohan Liyanage
  • 6,840
  • 3
  • 46
  • 63
  • Can confirm that this still works, though I used a symbolic link. – Sohail Sep 18 '17 at 16:55
  • 3
    There is no system.img in the avd directory. Only userdata.img files are there for the emulators created from Android studio. What now? – Umer Farooq Jan 27 '18 at 09:09
  • 1
    @UmerFarooq Just copy your custom ROM's system.img file to that location. By default the emulator refers to the ADK system images elsewhere, so the system.img file is not there. – Yohan Liyanage Feb 20 '18 at 09:22
  • While running the lunch command, did you choose "aosp_angler-userdebug"? Mine keeps giving me a blank screen. I've tried x86, x86_64, arm64-v8A, armeabi-v7a. For x86 and 64, it doesn't even allow me to run the emulator. – Sunil Apr 11 '18 at 14:36
  • aosp_x86_64-eng was the option that I used. – Yohan Liyanage Apr 12 '18 at 11:11
  • Did you copy the driver binaries? – artsylar Aug 15 '19 at 13:42
  • @UmerFarooq ucan find the here C:\Users\computer-name\AppData\Local\Android\Sdk\system-images\ –  Feb 09 '21 at 03:43