mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Oops, MTK rootfs/recovery detection had wrong offset
This commit is contained in:
parent
9ea028f5ab
commit
d9fc5650b8
@ -27,9 +27,9 @@ void dump_ramdisk(uint8_t *ptr, size_t size) {
|
|||||||
dump(ptr, size, "ramdisk.gz");
|
dump(ptr, size, "ramdisk.gz");
|
||||||
//MTK header
|
//MTK header
|
||||||
} else if(memcmp(ptr, "\x88\x16\x88\x58", 4) == 0) {
|
} 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");
|
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");
|
dump(ptr, 0, "ramdisk-mtk-boot");
|
||||||
} else {
|
} else {
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user