1、使用ImageMagick自帶的convert命令,進行raw格式轉換(convert -depth 8 splash.png rgb:splash.raw)
注:imgageMagick安裝包,執行sudo apt-get install imagemagick
2、編譯一下android自帶的rgb2565工具,其 路徑在$ANDROID_HOME/build/tools/rgb2565上(gcc -O2 -Wall -Wno-unused-parameter -o rgb2565 to565.c)
3、對raw文件進行rle565格式轉換(rgb2565 -rle < splash.raw > initlogo.rle)
最後將initlogo.rle文件打包到根文件系統中即可
$ convert -depth 8 splash.png rgb:splash.raw # Make sure it is 460800 bytes long! $ rgb2565 < splash.raw > splash.raw565 # Triple-check size before flashing! 307200 bytes $ fastboot flash splash1 g1-splash.raw565 $ fastboot reboot