Magisk produces not valid boot.img (but it still boots)

Created on 21 Aug 2020  路  7Comments  路  Source: topjohnwu/Magisk

Looks like Magisk's update.zip patches boot.img but breaks it's structure because I can not unpack it with abootimg, magisk-boot and other utilities. Everything I see is init in initrd and kernel. Is this a problem of Magisk?
Device still boots, but it is still problem.

invalid

Most helpful comment

At least upload your boot image...
Do you think I can magically parse an unknown format from thin air?

All 7 comments

Looks like it uses mkbootimg which has the same problem. I tried everything that is present on github.

At least upload your boot image...
Do you think I can magically parse an unknown format from thin air?

Money says it's A-only Legacy SAR and he's surprised there's a cpio ramdisk in there now, (which is of course intended behavior, and is definitely valid, though the device may not accept it).

@topjohnwu
boot.img.tar.gz

Totally normal, valid hdr_v1 boot.img with a cpio ramdisk, as intended on an A-only Legacy SAR device. Unpacks perfectly in AIK or with magiskboot.

Problem is actually that your device, which you didn't tell us anything about, doesn't like it, but I'd bet is Samsung, and this is why there are instructions for patching the recovery instead on the wiki. 馃槈

Xiaomi Mi 6A. It accepts boot.img, but I can not unpack it on Ubuntu host. I did not try magisk-boot to unpack it. Is it built as a static binary?

x86/magiskboot might work since it is static, yes, and of course it can unpack it; how do you think it got made in the first place? And no, you're wrong, AIK-Linux can handle it just fine. 馃檮

@twaik, anyway, try patching recovery partition instead, using recovery mode instructions from the wiki. Likely Xiaomi is doing like Samsung on that device and just ignoring the cpio boot.img ramdisk entirely.

Was this page helpful?
0 / 5 - 0 ratings