luni, 5 ianuarie 2009

ExtraBlock and MTK tools


New firmware from Philips, like 5990 or 3980 have at end an "ExtraBlock" of bytes. This block of bytes "fill" firmware up to 2 MB. This block is usual fill with "FF" except last 8 bytes.
I write this article because usual tools like MTKRemaker or MTKWindows have some problems with this block.
A usual firmware end with a sequence like:
20 20 20 20 ab cd ef gh, where last 4 bytes is a calculated check sum.
A firmware with "extrablock" end with:
ab cd ef gh a1b1 c1d1 e1f1 g1h1, where last 4 bytes is a check sum over all firmware. In some firmware previous 4 bytes are used to select a "root menu".
So, in a firmware with "extra block", we have 2 check sum, normal and "over all".





Now, return to our MTK tools. When save firmware with MTKRemaker, the only check sum calculated is first. More than that, if extra block end with "FF", MTKRemaker "cut" extra block!!
If we save firmware with MTKWindows, the only check sum calculated is second (at end of firmware).
If you want to make change in MTKRemaker (fonts or skins)
You need an hex editor like UltraEdit or XVI32. Open firmware in editor and change last byte to 00 (or to a value <> FF). Save firmware. Now, we are sure that MTKRemaker will not cut extrablock.
Next, open firmware in MTKRemaker, make change and save. When save MTKRemaker "make" first check-sum.
For second check-sum use MTKWindows. Just open and save.
If you want to make change in MTKWindows
Open firmware in MTKWindows, make changes and save.
Next, open and save in MTKRemaker (first check-sum).
Last step, open and save in MTKWindows (last check-sum).

About check-sum in MTK firmware. This is a series of XOR. First 4 byts with next 4, result XOR with next 4 bytes and so....

Niciun comentariu: