How can I modify the logo displayed on Android?

Source: Internet
Author: User
Tags imagemagick

 

1. The small logo shown at the beginning

Code File: System/CORE/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"

// "A n d r o I d ";

"R o c k c h I p r-B o X"; // modify the logo here

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

Close (FD );

}

}

Note: This is the first to change the display of the small logo, after modification will be in the gingerbread-itv-sdk-v1.02 \ out \ target \ product \ sdkdemo \ root directory to generate the init file, this time to burn boot to take effect

 

2. Modify the logo displayed for the second time:

 

Method 1: // I have never used

1. go to the android SDK package and run the "gcc-O2-wall-wno-unused-parameter-O rgb2565 to565.c" command to generate the rgb2565 file, then "sudo CP rgb2565/bin /". enter "ls-S/bin/rgb2565" in the root directory ". in this way, you can execute

"Rgb2565-RLE <android_logo.raw> initlogo. RLE" converts raw to Rle.

2. Image File Name definition: The image format must be converted to. Rle.

Core/init. h: # define init_image_file "/initlogo. RLE"

 

For details, refer:

1. Create an image of the current screen pixel (the default simulator is 320*480)

Use psto create a 320*480 image. Select "Save As Web format" when saving the image.

In the window, select "png-24.pdf" as the pre-configured item, and save it as "android_logo.png ".

Note: It seems that only the png-24 is supported, the RLE file generated in other formats is not displayed normally, if you are interested, you can try again

Verify it.

 

2. Convert the image to raw format

Use the convert command that comes with ImageMagick in Linux to convert the raw format. The command is:

Convert-depth 8 android_logo.png RGB: android_logo.raw

Note: The imgagemagick tool is installed in Ubuntu 10.04 by default. If the current system is not installed, you can

To execute the following command for installation:

Sudo apt-Get install ImageMagick

 

3. convert raw format to RLE file

The rgb2565 tool compiled by Android is used in the android/out/host/linux-x86/bin

Directory (Android is the directory of the Current Source Code). The conversion command is as follows:

Rgb2565-RLE <android_logo.raw> initlogo. RLE

So far, the image to be displayed is ready for start, that is, initlogo. Rle. Note that the file name is required.

If you want to change the file name, you must modify the file name in Android/system/CORE/init. h.

MACRO:

# Define init_image_file "/initlogo. RLE"

 

Method 2:

. Another method is to directly replace the PNG file. The method is: // I use this method, which is simpler.

Replace the image files in the \ gingerbread \ frameworks \ base \ core \ res \ assets \ images directory. Android-logo-shine.png "will be continuously rolled during startup. For detailed running mode, see the code in "system/CORE/init. c.

 

3. Modify the logo on the main interface

Replace the logo.png file under gingerbread-itv-sdk-v1.02 \ packages \ apps \ internettv \ res \ drawable

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.