Exchange/customize the android image/splash screen at boot time


#1

Hi,

does anybody know how to exchange/customize the “android” image/splash screen at boot time?

Thanks,
BR,
Thomas


#2

Found out what/how to do to get this custimized.
Thanks a lot.
BR


#3

Hi @Thomas_Brzoza

Can you post a pointer to your solution, or write out the solution here on the forum please.

-Lawrence-


#4

Hi,

there are two options how to customize the boot animation. It is in fact an animation consisting of two PNG images which can be found here:
./frameworks/base/core/res/assets/images/android-logo-mask.png
./frameworks/base/core/res/assets/images/android-logo-shine.png

The animation is written in C++. The ‘android-logo-mask.png’ is a transparent PNG and ‘android-logo-shine’ is being moved over the X-axis.

The C++ code can be found here:

./frameworks/base/cmds/bootanimation/BootAnimation.cpp

Option 1 (dirty and quick):
-create your own picture you want to show at boot time (png-format, not transparent!, same size, with same name (android-logo-mask.png))
-simply exchange ./frameworks/base/core/res/assets/images/android-logo-mask.png (same file name) with yours
-build/make

=> the animation is still running but only your image will be visible (tested successfully by me)

Option 2 (cleaner solution):
-touch the code within the package ‘./frameworks/base/cmds/bootanimation’ and write your own animation or even disable the animation (I have seen several properties in the code which disable the animation at all)
-build/make

=> code is not trivial but undertandable. didn’t try so far to touch it due to time constraints (but I will :))

Hope this helps.
Thanks,
BR,
Thomas


#5

Excellent, thanks @Thomas_Brzoza


#6

Wow. You must really enjoy doing things the hard way.

And this is also the wrong way. Editing the AOSP base repositories is always the ABSOLUTE LAST RESORT for any kind of device or implementation changes.

The boot animation is loaded from several different locations, in a priority order. The one packed into the frameworks is the LOWEST priority and is only loaded if all the other locations are empty.

https://android.googlesource.com/platform/frameworks/base/+/master/cmds/bootanimation/FORMAT.md

I think the list may also include /vendor/media/, not sure about /data/media/


#7

Thanks for this useful hint. I have no idea how you want to reach this on the recent AOSP Master. Perhaps you can give me here as well a hint?

I was not able to find anything about bootanimation.zip in the AOSP sources.

My proposed option is definitelly working and is very flexible. Nevertheless, thanks for your hints.
BR,
Thomas


#8

I GAVE you the hint. In fact, I linked you straight to the actual AOSP DOCUMENTATION.

Even if your “proposed solution” works, it is still the WRONG WAY (and is therefore NOT a solution at all). Read the documentation, it explains to you how to actually do it correctly.