Skip to content

magiskboot can't modify kernel #9880

Description

@AlexLiuDev233

magiskboot can't repack boot.img when kernel change, keeps reporting

! Recompressed kernel is too large, using original kernel

Full log:

Parsing boot image: [boot.img]
HEADER_VER      [0]
KERNEL_SZ       [6044953]
RAMDISK_SZ      [734108]
SECOND_SZ       [0]
EXTRA_SZ        [0]
OS_VERSION      [11.0.0]
OS_PATCH_LEVEL  [2020-11]
PAGESIZE        [2048]
NAME            []
CMDLINE         [androidboot.hardware=qcom androidboot.bootdevice=msm_sdcc.1 ehci-hcd.park=3 buildvariant=userdebug]
CHECKSUM        [d364514792c193a4eca7c42711738f3fc8df67fb000000000000000000000000]
KERNEL_DTB_SZ   [1075105]
ZIMAGE_KERNEL
KERNEL_FMT      [dtb]
RAMDISK_FMT     [xz]
Repack to boot image: [new-boot.img]
! Recompressed kernel is too large, using original kernel
HEADER_VER      [0]
KERNEL_SZ       [11015073]
RAMDISK_SZ      [732828]
SECOND_SZ       [0]
EXTRA_SZ        [0]
OS_VERSION      [11.0.0]
OS_PATCH_LEVEL  [2020-11]
PAGESIZE        [2048]
NAME            []
CMDLINE         [androidboot.hardware=qcom androidboot.bootdevice=msm_sdcc.1 ehci-hcd.park=3 buildvariant=userdebug]
CHECKSUM        [fdf19409eb0a97a23257b6a367529bd601463365000000000000000000000000]

How to reproduce:

  1. Download the boot image and zImage
  2. execute magiskboot unpack boot.img
  3. replace zImage to kernel file
  4. execute magiskboot repack boot.img
  5. Problem Reproduced

zImage and boot.img generated by same Android build, generated by command m bootimage
Device tree: https://github.com/YumeMichi/device_oneplus_onyx
Kernel tree: https://github.com/YumeMichi/kernel_oneplus_onyx

Looks that's caused by magiskboot dumped invalid kernel file, it think the kernel file is "dtb"

Device: OnePlus ONE 1001 (codename onyx)
Android version: 11 (LinegaeOS 18.1)
Magisk version name: v30.7
Magisk version code: 30700

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionSomething works in previous versions but not in the current one

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions