xiaolu / mkbootimg_tools

Unpack and repack boot.img,support dtb(dt.img).
530 stars 365 forks source link

unpack ramdisk with MTK (Mediatek) header #36

Open carlitros900 opened 4 years ago

carlitros900 commented 4 years ago

Mediatek prepends a 512 bytes partition header to filesystem, identified by magic 0x58881688 and with struct:

typedef union { struct { unsigned int magic; unsigned int size; char name[32]; } info; unsigned char padding[512]; // Pad up to 512bytes } mtk_header;

Supress it in unpacking