a) Read the splash image data from splash .h file.
b) Get the splash image data from Splash Partition.
for a):
1 首先得拿到图片,格式要求是png, 色深8bit, 且不带alpha(透明色)通道的
2 将 png文件转换成raw文件
convert Android.png -depth 8 rgb:android.raw
3 对于某些屏(只支持RGB565才需要此步骤),将raw文件转换成565格式的raw文件, Android 自带了一个这样的工具,在out/host/Linux-x86/bin
./rgb2565 android.raw android.raw565
4 将android.raw或android.raw565转换成原始数组
xxd -i android.raw565 > android_logo.h
xxd -i android.raw > android_logo.h
然后用生成的数组替换掉splash.h中的imageBuffer_rgb888数组即可.
for b:
企鹅界面对应splash.img的生成
device\qcom\common\display\logo\logo_gen.py,生成splash.img的步骤:
(1) sudo apt-get install Python-imaging
(2) python ./logo_gen.py snapdragon.png
这样就可在当前目录下生成splash.img,图片要求png格式,且且色深为8-bit的RGB或者RGBA格式。