-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
magiskboot: Corrupted boot image! after 26.1 ??? #7733
Comments
Maybe c97ab69 |
Magisk v26.1 also on my device is the last working version, see link below |
I possibly have the same issue on a real physical device. v26.4, 27.0 do not work but v26.1 does complete successfully. Onyx BOOX NovaAirC; Android 11 Not working output from v27.0:
Working output from v26.1:
|
Looks this boot image only contains a header and a ramdisk. The file size does not aligned upward with the page size. Magisk/native/src/boot/bootimg.cpp Lines 318 to 322 in c97ab69
Not sure how to properly deal with it. Simply removing the check brings back the chance of OOB access... |
I tried this, but the assertion still fails: #define get_block(name) \
name = base_addr + off; \
off += hdr->name##_size(); \
assert_off(); \
off = std::max(align_to(off, hdr->page_size()), map.sz());
#define get_ignore(name) \
if (hdr->name##_size()) { \
off += hdr->name##_size(); \
assert_off(); \
off = std::max(align_to(off, hdr->page_size()), map.sz()); \
} |
Device: generic_x86_64
Android version: 10
Magisk version name: 26.4
Magisk version code: 26404
Trying to update my rooted emulator to the latest version (26.4) gives me a:
will patching the boot image:
after some digging around i could boil the problem down to a change in magiskboot introduced in version 26.2:
boot.img attached (zipped because Github)
boot.zip
The text was updated successfully, but these errors were encountered: