Author: Xu jianxiang (netpirate@gmail.com)
Date: 2010/03/06
Web: http://www.anymobile.org
Three images are displayed at the Android startup:
A. When the Linux system is started, the Linux penguin screen (reboot) appears );
B. The Android platform starts initialization and displays the text "a n d r I O D;
C. The upper-layer Graphics System of the Android platform is started, and an animated image (start) containing the ANDROID flash appears ).
1/boot image (Linux penguin)
After Linux Kernel boot starts, load the image.
/Kernel/trunk/drivers/video/fbmem. c
/Kernel/trunk/drivers/video/fbmem. h
/Kernel/trunk/drivers/video/logo. c
/Kernel/trunk/drivers/video/logo. h
/Kernel/trunk/drivers/video/logo/Kconfig
/Kernel/trunk/include/linux/linux_logo.h
2/boot text ("a n d r I O D ")
Android
After the system is started, read/initlogo. rle (A 565
Rle Compressed Bitmap). If the read is successful, the Logo image is displayed in/dev/graphics/fb0. If the read fails,/dev/tty0 is set to TEXT,
Open/dev/tty0 and output the text "a n d r I O D.
Related code:
/System/core/init. c
/System/core/init. h
/System/core/init. rc
/System/core/init/logo. c
* Steps for creating the rle file:
A. Use GIMP or Advanced Batch Converter to convert the image to RAW format;
B. Use the rgb2565 tool that comes with android to convert RAW files to the RLE format (for example, rgb2565-rle <initlogo. raw> initlogo. rle ).
3/boot animation (animated picture with ANDROID flash)
Android
The system login animation is similar to the scroll bar of the Windows system. It consists of two PNG images, foreground and background. These two images exist in/system/framework.
/Framework-res.apk file. The Android text section on the foreground image (android-logo-mask.png) is hollowed out and the background image is displayed.
(Android-logo-shine.png) is a simple texture. When you log on to the system, the foreground image is displayed at the top layer, and the background image is continuously rolled by the program code.
Scroll the blank part to display the background texture to achieve the animation effect.
Related code:
/Frameworks/base/libs/surfaceflinger/BootAnimation. h
/Frameworks/base/libs/surfaceflinger/BootAnimation. cpp
// Frameworks/base/core/res/assets/images/android-logo-mask.png
Default foreground image of Android, hollow out text part, size 256 × 64
// Frameworks/base/core/res/assets/images/android-logo-shine.png
Default background image of Android, with a dynamic effect. The size is 512 × 64
Reference:
Image Description: Android boot screen and boot Animation
Http://www.shudoo.com/09/1030/15/13418431.html
Initlogo. rle: display an image on boot
Http://forum.xda-developers.com/showthread.php? T = 443431
Analysis of the Startup Process of the Android root file system (Analysis of the init Daemon)
Http://crazier9527.javaeye.com/blog/454635