Magic Splash Wand is a set of scripts for unpacking and packaging the splash screen of Qualcomm series devices on boot, powered by PHP.
- Magic Splash!! Wand
Tool for unpacking and packaging splash image for Qualcomm devices.
- Magic Splash Logo! Wand
Tool for unpacking and packaging splash image for OPlus Qualcomm devices.
- Download and install PHP 8.1.0+ for your system from the official website.
- Enable GD extension in
php.ini. - Open the terminal and use PHP interpreter to execute the script or script (for oplus) with the usage.
- Wait for the script to run.
While cracking the BootLoader of OPPO Watch 2 eSIM Series, I got interested in its Splash. It's format is not quite the same as the script provided by Qualcomm.
After analysis, it contains multiple logos and store information with the structure below:
Splash Payload (0x0)
โ
โโโ Header [0x200] (0x0)
โ โ
โ โโโ(header structure) [0xC] (0x0)
โ โ โ
โ โ โ *** Splash Identity ***
โ โ โ
โ โ โโโ char[0x8] magic; <--- magic header, "SPLASH!!"
โ โ โ
โ โ โ *** Content Identity ***
โ โ โ
โ โ โโโ unsigned number; <--- number of logos, little endian
โ โ
โ โโโ(logo structure) [0x14] (0xC)
โ โ โ
โ โ โ *** Content 1 Information ***
โ โ โ
โ โ โโโ unsigned width; <--- image's width, little endian
โ โ โโโ unsigned height; <--- image's height, little endian
โ โ โโโ unsigned type; <--- flag for compression, 0: Raw Image; 1: RLE24 Compressed Image
โ โ โโโ unsigned blocks; <--- block size, real size / 512
โ โ โโโ unsigned offset; <--- offset of image's content, little endian
โ โ
โ โโโ(logo structure) [0x14] (0x20)
โ โ โ
โ โ โ *** Content 2 Information ***
โ โ โ
โ โ โโโ unsigned width;
โ โ โโโ unsigned height;
โ โ โโโ unsigned type;
โ โ โโโ unsigned blocks;
โ โ โโโ unsigned offset;
โ โ
โ โโโ(logo structure) [0x14] (0x34)
โ โ โ
โ โ โ *** Content N Information ***
โ โ โโโ ...
โ โ โโโ ...
โ โ
โ โโโ ...
โ
โโโ Payload data (0x200)
โ
โ *** Content 1 data ***
โ
โโโ (data) <--- image's content
โ
โ *** Content 1 data ***
โ
โโโ (data)
โ
โ *** Content N data ***
โ
โโโ ...
โโโ ...
The original script was so old that it didn't even support Python 3.x. It's a pain to retrofit on top of it.
Out of distaste for Python syntax, I rewrote the script in PHP and added unpacking support.
-- Update --
Qualcomm devices from OPlus (OPPO/OnePlus/Realme) use a different but similar format to the above.
Combined with the Qualcomm structure, the analysis resulted in the following structure:
Splash Payload (0x0)
โ
โโโ Padding [0x4000] (0x0) <--- padding before the header, usually empty
โ
โโโ Header [0x4000] (0x4000)
โ โ
โ โโโ(header structure) [0x120] (0x4000)
โ โ โ
โ โ โ *** Splash Identity ***
โ โ โ
โ โ โโโ char[0xB] magic; <--- magic header, "SPLASH LOGO!"
โ โ โโโ char[0x40] desc1; <--- description of this splash file (1)
โ โ โโโ char[0x40] desc2; <--- description of this splash file (2)
โ โ โโโ char[0x40] desc3; <--- description of this splash file (3)
โ โ โโโ char[0x40] desc4; <--- description of this splash file (4)
โ โ โ
โ โ โ *** Content Identity ***
โ โ โ
โ โ โโโ unsigned number; <--- number of logos, little endian
โ โ โโโ unsigned version; <--- version of this splash image, little endian, current 4
โ โ โโโ unsigned width; <--- screen width, little endian
โ โ โโโ unsigned height; <--- screen height, little endian
โ โ โโโ unsigned compress; <--- flag for compression, 0: Raw Image; 1: GZIP Compressed Image
โ โ
โ โโโ(logo structure) [0x80] (0x4120)
โ โ โ
โ โ โ *** Content 1 Information ***
โ โ โ
โ โ โโโ unsigned offset; <--- offset of image's content, little endian
โ โ โโโ unsigned real_size; <--- content real size (decompressed if GZIP compressed)
โ โ โโโ unsigned data_size; <--- payload data size
โ โ โโโ char[0x74] name; <--- content file name, extension is ".bmp"
โ โ
โ โโโ(logo structure) [0x80] (0x41A0)
โ โ โ
โ โ โ *** Content 2 Information ***
โ โ โ
โ โ โโโ unsigned offset;
โ โ โโโ unsigned real_size;
โ โ โโโ unsigned data_size;
โ โ โโโ char[0x74] name;
โ โ
โ โโโ(logo structure) [0x80] (0x4220)
โ โ โ
โ โ โ *** Content N Information ***
โ โ โโโ ...
โ โ โโโ ...
โ โ
โ โโโ ...
โ
โโโ Payload data (0x8000)
โ
โ *** Content 1 data ***
โ
โโโ (data) <--- image's content
โ
โ *** Content 1 data ***
โ
โโโ (data)
โ
โ *** Content N data ***
โ
โโโ ...
โโโ ...
Compression format was changed from RLE24 to GZIP (magic number 1F 8B 08 00). Device is confirmed to be able to load content at the maximum compression level.
Have fun :)
- Magic Splash!! Wand
- Add supports for Raw package method
-
Add supports for AVIF, GD2, GD, TGA, WBMP, WEBP, XBM, XPM, etc. image formats
- Magic Splash Logo! Wand
-
Add supports for AVIF, GD2, GD, GIF, JPEG, PNG, TGA, WBMP, WEBP, XBM, XPM, etc. image formats
-
- Magic Splash!! Wand
- v1.2:
- Add supports for AVIF, GD2, GD, TGA, WBMP, WEBP, XBM, XPM, etc. image formats.
- Optimized code logic.
- Upgraded PHP requirement to 8.1.0.
- v1.1:
- Implemented repack feature.
- v1.0:
- Support splash screen format Qualcomm devices
- v1.2:
- Magic Splash Logo! Wand
- v1.2:
- Optimized log output.
- v1.1:
- Add supports for AVIF, GD2, GD, GIF, JPEG, PNG, TGA, WBMP, WEBP, XBM, XPM, etc. image formats.
- v1.0:
- Support splash screen format for OPlus (OPPO/OnePlus/Realme) Qualcomm devices
- v1.2:
No license, you are only allowed to use this project. All rights are reserved by MeowCat Studio, Meow Mobile and NekoYuzu (MlgmXyysd).