Android5.1 shutdown charging Interface Size modification
Because the screen size of the project and the general phone screen is not the same, so the shutdown charging interface in the device after the serious deformation, you need to modify this interface, nonsense said, open to fight!
first of all to explain this is the Android 5.1 source code, the other version of the source code may be different.
Power off the interface and the Android upper layer of the application, is the resolution of the different there are many groups of pictures, but unlike the upper layer, where the use of the set of images can be configured, so before you make sure to determine the current source of the use of which group, or the arduous changes will be found later, And there's no egg to use.
1, the interface uses the resolution
Find this file in the source code:/BOOTABLE/BOOTLOADER/LK/PROJECT/<PROJECT>.MK, inside there is such a sentence, where QVGA is the current resolution, remember these letters to see the next
Boot_logo = QVGA
2, the interface picture path
All images in the resolution are under this folder:/bootable/bootloader/lk/dev/logo
Then use the resolution in the first step, according to the resolution to find the corresponding folder, in the future will see all the system to use the picture, and then according to your source code running results, find out the specific use of which pictures, I use here is qvga_bat_animation* these, Here you can replace the image or change the size of the picture, specifically how to do exactly what you grasp, you are God!
3, modify the display size
The second step to modify the size of the picture, but still no, the display of the charging interface will be messy, here continue to change
Find this file:/vendor/mediatek/proprietary/external/libshowlogo/cust_display.h, search the file for the resolution just now, find the corresponding data to start the modification:
//The battery icon increases as the charge increases , increasing the height of a rectangle, and the following is the rectangular position//Battery Capacity Rectangle #defineCapacity_left (82)//Battery Capacity Center #defineCapacity_top (124)#defineCapacity_right (158)#defineCapacity_bottom (241)//The battery is displayed as two digits and a percent semicolon, and the following is the position of the first digit//First number rectangle #defineNumber_left (93)// Number #defineNumber_top (50)#defineNumber_right (109)#defineNumber_bottom (73)//The following is the percent semicolon position//% Rectangle #definePercent_left (125)//percent Number_left + 2*number_width #definePercent_top (50)#definePercent_right (145)#definePercent_bottom (73)//The following is the position of the top animation//Top Animation part #defineTop_animation_left (82)//Top Animation #defineTop_animation_top (100)#defineTop_animation_right (158)#defineTop_animation_bottom (113)
OK, so far has been changed, compile the source brush into the system, depending on the situation can be adjusted to the top of the data in the header file
In addition, at the bottom of the head file just now, there is a sentence:
/**/#define animation_new
Probably without this definition source code will not be the same, specifically no test
Android5.1 shutdown charging Interface Size modification