42

I wanted to build a custom ROM for Android TV.

I have followed the steps given on the Android Source Code - AOSP website and downloaded the source using the commands below:

repo init -u https://android.googlesource.com/platform/manifest -b master
repo sync -j16 -c

source build/envsetup.sh
lunch aosp_x86-eng

To build the system image, I am using the following command:

make -j16

It is using the latest Q release to build:

PLATFORM_VERSION_CODENAME=Q
PLATFORM_VERSION=Q
TARGET_PRODUCT=aosp_x86
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=LiveTv
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-130-generic-x86_64-Ubuntu-16.04.4-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OC-MR1
OUT_DIR=out

The build is always successful. system.img and ramdisk.img are also generated.

I wanted to test the system image on an emulator. I used the command below:

./emulator -avd tvrom -sysdir out/target/product/generic_x86/ -system out/target/product/generic_x86/system.img -ramdisk out/target/product/generic_x86/ramdisk.img -data out/target/product/generic_x86/userdata.img -kernel prebuilts/qemu-kernel/x86/kernel-qemu

The avd name is tvrom and the other parameters are paths to the system images that I have built.

But, after doing this, system.img is not booting in the emulator and it remains a black screen there.

Also, there is an error printing in terminal:

Segmentation fault (core dumped)

I searched for it, but didn't found any solution. Can anyone please help?

EDIT

If someone provides a list of steps to flash and boot the latest AOSP_X86 or AOSP_X86_64 customized ROM on Android Emulator, then it will be useful.

krupal.agile
  • 735
  • 8
  • 22

0 Answers0