Created
May 30, 2020 23:13
-
-
Save GarnetSunset/87209a481c7dd52e40bb08d38737812e 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() |
Modify it to make it match your res, good luck!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello sir please can you make a py script for Mi 11x to make logo.img ?