Android Change boot logo

Source: Internet
Author: User

This is where we operate under Ubuntu. I logged in with the root user, first installing the NETPBM library

execution: Apt-get install NETPBM

for Android The first performance logo is in the kernel, so we have to change the kernel logo.

a . Related changes in the kernel

Compile the Linux kernel logo manufacturing script mklogo.sh, which reads 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 chosen logo to PNG format, named Logo.png and mklogo.sh with the unified path.
Execute./mklogo.sh Final Build logo_linux_gzsd_clut224.ppm

This designation can be freely changed, but must abide by the naming method of Logo_yourname_type, here only the *_clut224.ppm naming method, the other format of the naming method, please see drivers/video/logo/ Makefile file.

Place the logo_linux_gzsd_clut224.ppm file in the drivers/video/logo/directory under the kernel source

Enter the Drivers/video/logo directory

1. Modify the Kconfig file

added: #LOGO之前 in endif

Config LOGO_LINUX_GZSD        bool "GZSD LOGO"        default n

2. Modify the Makefile file

Increase:

obj-$ (CONFIG_LOGO_LINUX_GZSD) + = LOGO_LINUX_GZSD_CLUT224.O

3.logo.c in the function Fb_find_logo if (depth >= 8) is added above:

#ifdef CONFIG_LOGO_LINUX_GZSD
Logo = &logo_linux_gzsd_clut224;
#endif

4.added include/linux/linux_logo.h in the kernel source directory

extern const struct Linux_logo logo_linux_gzsd_clut224;

A daily truth
Perseverance, is thousands of miles of sand and a stone of the cohesion, a little accumulation, only before the head can not see the end of the magnificent, perseverance, is a wisp of spring silkworm spinning around, a silk to insist, only to break the cocoon and see the brilliance of the bright;

5. perform make menuconfig on the terminaland select .

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

save and compile when you exit

6. Disable the LCD console cursor

in the kernel source directory drivers/video/console/fbcon.c

comment out functions: All content within Fb_flashcursor and Fbcon_cursor

7. Make the logo appear next to the screen:

DRIVERS/VIDEO/FBMEM.C

Modify the function Fb_do_show_logo 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; Get next X coordinate Yoff = (Info->var.yres-num * (Fb_logo.logo->height + 8)) >>1; Get the next 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_imageblit (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_imag Eblit (info, image); IMAGE-&GT;DX-= Image->width + 8;}} else if (rotate = = FB_ROTATE_CW) {for (x = 0; x < num && image->dy + image->height <= Info->var.yre S X + +) {Info->fbops->fb_imageblit (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;}}}

re-compile can

two. After Android starts flashing screen changes:

path: File system source under the frameworks/base/core/res/assets/images/there are two pictures

Android-logo-mask.png

Android-logo-shine.png

modify these two pictures can be, note please save the original.

Android Change boot logo

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.