Originally Posted by AndroBuddy007
Well is the proces too different for other devices?
I just wanna learn how to do it for probably any device .
Anyways, the device is Nokia 6 (PL2)
Depends on device. Common is to extract BMP, RGB24 or RGB565 picture, cut and preserve part of file before (if not on start address 0h) called header and cut remain part of file or files (if splash more pictures for fastboot, system corruption, unlocked BL, download mode etc).
HxD is handy, free hex editor that can cut off and paste part as new file.
1) Found some Nokia 6.1 /FP2 splash.img eg. this post
2) Find resolution of FP2 eg. here
3) Check splash.img on eg. rawpixels.net
for same resolution to check format.
4) For 1080x1920, vert flip, rgb24 I got this splash
5) For 1080x12000 I got no more images, so I could say that FP2 splash has single image splash.
6) According to last experience, no need to verticaly flip splash RGB24 image, it is BMP image. Find first two bytes of BMP image, in splash.img, they are "BM", case sensitive. And it is interesting, on 0x4000h, just like on Redmi Note 7. So, cut part 0x0h to 0x3FFF as splash-header.img ...to be continued.
---------- Post added at 11:44 PM ---------- Previous post was at 11:23 PM ----------
BMP 1080x1920x24bit should take about 1080*1920*3 bytes ~ 6220800 bytes for splash image (to cut off from [image.img - 16 kb header.img] ).
Than join header.img + your new splash image in BMP format + appendix.img
with copy /b h.img+s.bmp+a.img.
Now it tricky to find right size to cut off.
Fastboot image on Redmi Note 7 takes size 6221610 bytes, (size, not size on disk value). Empty black BMP made in paint takes 6220854 bytes.
You can make own BMP or use any picture (png, jpg, gif, bmp), same or bigger and 1080x1920 and use almost the same script with magickimage to make BMP and join files to splash.img.
Even make flashable zip, if you know name (splash, logo, oemlogo etc) or partition number of splash. (eg. mmcblk0pX).
UPDATE1: Open bmp+appendix.img in Paint or GIMP or PS or something and save it as *.bmp.
Lucky, files are the same size. No appendix part
But image is 1080x2280. Let's try it that way first.
If not works, cut off bottom part of BMP (2280-1920) and save it. And difference is empty appendix.img.
UPDATE2: So, one of these two white Android One splashes should work on Nokia 6.1, differences on size are 2 bytes.
What is interesting in Nokia 6.1 - there is additional /splash2 partition for "multi-splash-img" (unpack it, 25kb, with Universal Extract 2.0...as GZIP, using mtee.exe) and
you will got "600CN.img.FHD" 7,1 MB which also has BMP image 1080x2280 inside from 0x4000h till end.
But how to compress it back to multi-splash-img ?! Compressing *.FHD is gzip not working, unless you cut the first 10 bytes (1F 8B 08 08 BE 77 56 5D 02 00), now multi-splash-modded.img starts with 600CN....