Source code to modify the boot screen and login screen

Source: Internet
Author: User

The entire boot screen consists of the boot screen and logon screen.

Modify the boot screen:
System \ core \ init. H has a macro definition:
# Define init_image_file "/initlogo. RLE"


System \ core \ init. C contains the following code snippet:

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"

"A n d r o I d ";

Write (FD, MSG, strlen (MSG ));

Close (FD );


Read/initlogo. RLE (A 565 RLE Compressed image). If it succeeds, the logo is displayed in/dev/graphics/fb0, if it fails, set/dev/tty0 to text mode, open/dev/tty0, and output the text "android.


Step 1: process an RLE image, use the android compiled tool rgb2565 (Out/host/linux-86/bin), command rgb2565-RLE <initlogo. Raw> initlogo. Rle.

2. Package the image to the root directory of ramdisk. IMG. Personal method: add the vender folder to the Code, put initlogo. RLE in this folder, and add it to generic. mk.
Product_copy_files
:= \

Vendor/initloge. RLE: Root/initloge. RLE
3. Compile the source code.


Logon screen modification:

Android
System Login animation is similar to the Windows system scroll bar, is composed of foreground and background two PNG images, these two images exist in the/system/framework/framework-res.apk file. In the foreground image (android-logo-mask.png), The androidtext is empty, and the background image (android-logo-shine.png) is a simple texture. When the system logs on, the foreground image is displayed at the top layer. The program code controls the continuous scrolling of the background image. The background texture is displayed by scrolling through the hollow-out part of the foreground image text to achieve the animation effect. The Code address is provided. Modify it by yourself. (This paragraph is not original)


Related code:

\ Frameworks \ base \ cmds \ bootanimation. h

\ Frameworks \ base \ cmds \ 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.