mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 13:17:39 +02:00
@ -398,6 +398,13 @@ void boot_img::parse_image(uint8_t *addr, format_t type) {
|
||||
}
|
||||
fprintf(stderr, "%-*s [%s]\n", PADDING, "RAMDISK_FMT", fmt2name[r_fmt]);
|
||||
}
|
||||
if (!hdr->is_vendor && hdr->ramdisk_size() == 0 && hdr->header_version() == 4) {
|
||||
// When a v4 boot image does not contain ramdisk, we will have to create
|
||||
// the CPIO from scratch. However, since this ramdisk will have to be merged
|
||||
// with other vendor ramdisks, it has to use the exact same compression method.
|
||||
// v4 GKIs are required to use lz4 (legacy), so hardcode it here.
|
||||
r_fmt = LZ4_LEGACY;
|
||||
}
|
||||
if (auto size = hdr->extra_size()) {
|
||||
e_fmt = check_fmt_lg(extra, size);
|
||||
fprintf(stderr, "%-*s [%s]\n", PADDING, "EXTRA_FMT", fmt2name[e_fmt]);
|
||||
|
Reference in New Issue
Block a user