Forked from GarnetSunset/mi_9t_splash_screen_maker.py
Created
August 24, 2020 08:02
-
-
Save Twel12/c860caca1961d0d71a1484b846dba6f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
offset0 = 0x4000 | |
offset1 = 0x5000 | |
offset2 = 0x740000 | |
offset3 = 0xD2F000 | |
offset4 = 0x146A000 | |
outpt = open("logo_new_mi9t.img", "wb") | |
emptyContent = [0 for i in range(0x1A59000)] | |
mi9offset = [0x4C, 0x4F, 0x47, 0x4F, 0x21, 0x21, 0x21, 0x21, 0x05, 0x00, 0x00, 0x00, | |
0x3B, 0x07, 0x00, 0x00, 0x40, 0x07, 0x00, 0x00, 0xEF, 0x05, 0x00, 0x00, | |
0x2F, 0x0D, 0x00, 0x00, 0x3B, 0x07, 0x00, 0x00, 0x6A, 0x14, 0x00, 0x00, | |
0xEF, 0x05] | |
outpt.write(bytearray(emptyContent)) | |
#export in photoshop as 24bit windows bmps | |
outpt.seek(offset0) | |
outpt.write(bytearray(mi9offset)) | |
#Locked pic has to be 1080x2340 | |
outpt.seek(offset1) | |
img = open("pic1.bmp", "rb") | |
outpt.write(img.read()) | |
#Fastboot pic has to be 1080x1920 | |
outpt.seek(offset2) | |
img = open("pic2.bmp", "rb") | |
outpt.write(img.read()) | |
#Unlocked pic has to be 1080x2340 | |
outpt.seek(offset3) | |
img = open("pic3.bmp", "rb") | |
outpt.write(img.read()) | |
#Error pic has to be 1080x1920 | |
outpt.seek(offset4) | |
img = open("pic4.bmp", "rb") | |
outpt.write(img.read()) | |
outpt.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi sir, can you please make a py script for Xiaomi 11 Lite NE to make logo.img