Search code examples
androidandroid-sourcesplash-screenromcustom-rom

How to include custom splash.img in AOSP build


I am building a version of Android Nougat from the AOSP source tree. I have a custom splash screen image which I am flashing with fastboot(code below) and I'd like to include it in the AOSP build if possible.

fastboot erase splash
fastboot flash splash ./splash.img

I created the splash image myself and I've flashed it with fastboot without issue however I want to include it in my AOSP build. I've done some searching and haven't been able to find any information on it, the closest I could find was information on changing the PPM image in the kernel(link below).

If it is necessary I may be able to make that work but if I could just use my existing splash.img file that would be ideal. Also if there is a way to include it in a OTA update but not in the build that will also work for my application.

Thanks,

https://www.digi.com/resources/documentation/digidocs/90001546/task/android/t_faq_change_android_boot_images.htm


Solution

  • There are two stages for showing boot pictures: Splash boot animation

    Normally, splash is not a part of AOSP since it depends on SOC vendors, different soc vendors like QCOM, mediatek have different splash solutions since it is loaded by bootloader(basically lk) It is also called logo in some platforms. It is designed to show a picture during early boot to improve user experience.

    Boot animation is a part of AOSP and the binary is located in system image, it is loaded by /system/bin/bootanimation service and can contains anmiation and sound.

    The boot procedure should be like this:

    |Bootloader| -> |Splash/Logo| -> |Linux kernel| -> |Android Native| -> |Bootanimation|

    I think you are talking about splash/logo part, so you should check your vendor source code about how to put this image build into normal build. If you are using pure AOSP source code, I prefer to include your prebuilt image into your build system since splash image will not be changed frequently. For OTA part, basically this partition can be upgraded, but it really depends on your OTA solution.