Magisk: Unable to repack boot image!

Created on 15 Aug 2019  路  8Comments  路  Source: topjohnwu/Magisk

Hi, I'm trying to install Magisk by patching a boot.img I got from a zipped OTA. I'm getting the following error:
screenshot
Log: log.txt
What is the cause of this error?

All 8 comments

Wow

Error #1: it's using 32bit busybox and failing. Guessing you're one of the few devices that's armeabi-v7a running 64bit OS

Error #2: Segmentation fault, possibly caused by error #1

Error 1 isn't of any concern, it now always tries the x86 binary first. #1766 will hide that correctly so it stops worrying people.

The segfault is because it didn't read or unpack the image correctly:

RECOV_DTBO_SZ [1919508803]

(That's a very wrong size.)

Please upload the actual boot.img. Otherwise how could we ever figure out and fix the issue?

@dubcusb please upload your boot image as @osm0sis said

Oh sorry for my delay. I kind of lost hope in this since I realized I won't be able to unlock my phone's bootloader without third party services (it's Huawei).
If, however, fixing this/finding the problem may help other huawei users or people with similar errors, I can upload the boot image here (as soon as I get home).
Again, sorry for not answering earlier.

Ok here is a zip with the boot.img I was using for the process.
boot.zip

@topjohnwu

Similarly to magiskboot, unpackbootimg has issues with the above image, but the output differs: unpackbootimg still thought there was a large dtb, but no additional large recovery_dtbo like magiskboot thought. Clearly the header's got some funky variant going on. I'll look into it more tomorrow probably.

It's because Huawei has added some data in the header at decimal offset 1632 (where recovery_dtbo info is stored on newer devices): Cairo-L23C469B125_65583_181210_SIGN

We'll have to add some protections against such nonsense to magiskboot and unpackbootimg. :+1:

1848 should fix this.

Was this page helpful?
0 / 5 - 0 ratings