Logo modification during Android startup

Source: Internet
Author: User

Here we perform operations in Ubuntu. I log on as a root user. First, install the netpbm library.

Run: APT-Get install netpbm

For Android systems, the logo is displayed in the kernel at first, so we need to modify the logo in the kernel first.

1. related modifications in the kernel

Compile the Linux kernel logo to create the script mklogo. Sh. The content is as follows:

#!/bin/shpngtopnm logo.png > linuxlogo.pnmpnmquant 224 linuxlogo.pnm > linuxlogo224.pnmpnmtoplainpnm linuxlogo224.pnm > logo_linux_gzsd_clut224.ppmrm linuxlogo.pnm linuxlogo224.pnm

Convert your selected logointo a PNG format, named as logo.png, and put it in the same path as mklogo. Sh.
Run./mklogo. Sh to generate logo_linux_gzsd_clut224.ppm.

This name can be changed freely, but it must follow the naming method of logo_yourname_type. Here, only the naming method of * _ clut224.ppm is listed. For other naming methods, see the drivers/Video/logo/MAKEFILE file.

Put the logo_linux_gzsd_clut224.ppm file to the drivers/Video/logo/directory under the kernel source code.

Go to the drivers/Video/logo directory

1. Modify the kconfig File

Added: Before endif # logo

config LOGO_LINUX_GZSD        bool "gzsd logo"        default n

2. Modify the MAKEFILE file

Added:

OBJ-$ (config_logo_linux_gzsd) + = logo_linux_gzsd_clut224.o

3. The function fb_find_logo in logo. C is added below if (depth> = 8:

# Ifdef config_logo_linux_gzsd
Logo = & logo_linux_gzsd_clut.pdf;
# Endif

4. added the kernel source code in include/Linux/linux_logo.h.

Extern const struct linux_logo logo_linux_gzsd_clut.pdf;

5. Run make menuconfig on the terminal.

Device Drivers ---> graphics support ---> bootup logo ---> gzsd logo

Save and exit before compiling

6. Disable the LCD console cursor

In the kernel source code directory Drivers/Video/console/fbcon. c

Comment out the function: All content in fb_flashcursor and fbcon_cursor

7. display the screen in the middle of the logo:

Drivers/Video/fbmem. c

Modify the fb_do_show_logo function as follows:

Static void fb_do_show_logo (struct fb_info * info, struct fb_image * image, int rotate, unsigned int num) {unsigned int X; int xoff, yoff; /** for central logo **/xoff = (Info-> var. xres-num * (fb_logo.logo-> width + 8)> 1; // obtain the intermediate X coordinate yoff = (Info-> var. yres-num * (fb_logo.logo-> height + 8)> 1; // obtain the intermediate y coordinate if (rotate = fb_rotate_ur) {for (x = 0; x <num & image-> dx + image-> width <= Info-> var. xres; X ++) {image-> dx = xoff; image-> DY = yoff; Info-> fbops-> fb_imageb.pdf (Info, image ); image-> dx + = image-> width + 8 ;}} else if (rotate = fb_rotate_ud) {for (x = 0; x <num & image-> DX> = 0; X ++) {Info-> fbops-> fb_imageb.pdf (Info, image ); image-> DX-= image-> width + 8 ;}} else if (rotate = fb_rotate_cw) {for (x = 0; x <num & image-> dy + image-> height <= Info-> var. yres; X ++) {Info-> fbops-> fb_imageb.pdf (Info, image); image-> dy + = image-> height + 8 ;}} else if (rotate = fb_rotate_ccw) {for (x = 0; x <num & image-> dy> = 0; X ++) {Info-> fbops-> fb_imageblit (Info, image); image-> dy-= image-> height + 8 ;}}}

Recompile

2. Change the flashing screen after Android is started:

Path: Two images under frameworks/base/CORE/RES/assets/images/in the file system source code

Android-logo-mask.png

Android-logo-shine.png

Modify the two images. Save the original images.


Related Article

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.