Oops, MTK rootfs/recovery detection had wrong offset

This commit is contained in:
Pierre-Hugues Husson 2016-10-06 17:47:26 +02:00 committed by topjohnwu
parent 9ea028f5ab
commit d9fc5650b8

View File

@ -27,9 +27,9 @@ void dump_ramdisk(uint8_t *ptr, size_t size) {
dump(ptr, size, "ramdisk.gz");
//MTK header
} else if(memcmp(ptr, "\x88\x16\x88\x58", 4) == 0) {
if(memcmp(ptr+4, "RECOVERY", 8)==0) {
if(memcmp(ptr+8, "RECOVERY", 8)==0) {
dump(ptr, 0, "ramdisk-mtk-recovery");
} else if(memcmp(ptr+4, "ROOTFS\0\0", 8)==0) {
} else if(memcmp(ptr+8, "ROOTFS\0\0", 8)==0) {
dump(ptr, 0, "ramdisk-mtk-boot");
} else {
exit(1);