vi system/core/init/init.c if( load_565rle_image(INIT_IMAGE_FILE) ) { fd = open("/dev/tty0", O_WRONLY); if (fd >= 0) { const char *msg; msg = "\n" "\n" "\n" "\n" "\n" "\n" "\n" // console is 40 cols x 30 lines "\n" "\n" "\n" "\n" "\n" "\n" "\n" " Happy Everyday! "; write(fd, msg, strlen(msg)); close(fd); } }
fd = open(fn, O_RDONLY); if (fd < 0) { ERROR("cannot open '%s'\n", fn); goto fail_restore_text; } .... //unlink(fn);
因为unlink操作只要Android系统重启会删除initlogo.rle文件,我用的是nfs文件系统,有写权限,所以为了避免被删除,就暂时unlink掉,用mmm 命令编译下吧,然后把生成的init,copy到/nfsroot1/下。
制作initlogo.rle文件
sudo apt-get install imagemagick
convert -depth 8 ~/Desktop/initlogo.png rgb:initlogo.raw
./out/host/linux-x86/bin/rgb2565 -rle <initlogo.raw> initlogo.rle
如果/out/host/linux-x86/bin/下没有rgb2656那么就自己编译吧,cd到目录build/tools/rgb2565执行
gcc -O2 -Wall -Wno-unused-parameter -o rgb2565 to565.c
cp /initlogo.rle /nfsroot1/
原始png图片我使用的是480*320的,这个根据自己的屏幕和横竖屏设置。
如果想改文件名只需要改system/core/init/init.h中的
#define INIT_IMAGE_FILE "/initlogo.rle"
ubuntu can't install jdk .
sudo ./jre-6u30-linux-i586.binthe Installation Instructions on the download page for more information.
sudo apt-get install g++-multilib
then install jdk.can sucess.
make systemimage - system.img
make userdataimage - userdata.img
make ramdisk - ramdisk.img
make snod