[SCRIPTS] Unpack / repack MT65xx boot.img, recovery.img or logo.bin
If you are looking for a way to easily unpack / repack boot.img, recovery.img or logo.bin from your MediaTek device, don't look any further. Here you can find my own Perl scripts.
Scripts were first based on the ones available on Android-DLS WiKi, but are now highly modified in order to work with specific MTK boot and recovery images. Currently, the scripts fully work with any MT6516, MT6513 or MT6573 images. It is also confirmed to be working with new MT6575 (and even MT6577) images.
The most up to date version of the scripts is always available at my public github repository: bgcngm/mtk-tools. Scripts were fully tested under Ubuntu 12.04 as well as Windows 7 x64 (Cygwin with Perl v5.10.1 or v5.14.2).
Please don't just leech the files and go away. You can easily say thanks just by pressing "Thanks" button.
Unpack script usage:
Code:
Usage: unpack-MT65xx.pl <infile> [COMMAND ...]
Unpacks boot, recovery or logo image
Optional COMMANDs are:
-force_logo_res <width> <height>
Forces logo image file to be unpacked by specifying image resolution
(only useful when no zlib compressed images are found)
Repack script usage:
Code:
Usage: repack-MT65xx.pl COMMAND [...]
-logo [--no_compression] <logo-directory> <outfile>
Repacks logo image
Version history:
Changes by Bruno Martins:
modified to work with MT6516 boot and recovery images (17-03-2011)
included support for MT65x3 and eliminated the need of header files (16-10-2011)
added cygwin mkbootimg binary and propper fix (17-05-2012)
included support for MT65xx logo images (31-07-2012)
fixed problem unpacking logo images containing more than nine packed rgb565 raw files (29-11-2012)
re-written logo images file verification (29-12-2012)
image resolution is now calculated and shown when unpacking logo images (02-01-2013)
added colored screen output (04-01-2013)
included support for logo images containing uncompressed raw files (06-01-2013)
Credits:
Android-DLS for the initial scripts
starix (from forum.china-iphone.ru) for the decryption of logo.bin files structure