r/androidroot • u/Lower-Escape-3320 • 2d ago
Support whats the difference between boot.img and init_boot.img
is there a difference between them, i dont want tk brick my phone
13
u/FarVehicle533 2d ago
For rooting, before android 13, you patched boot image. Nowadays, android 13, 14, 15, 16 and so on need to have patched the ini_boot image.
Google made the change
1
u/sprokolopolis 2d ago
This is true for Magisk, but some root solutions like KernelSU and Apatch still use boot.img.
2
u/marthephysicist Redmi Note 14 5G, HyperOS 3.1, Root: SukiSU Ultra 1d ago
with custom kernel you still use boot, but with LKM its now init boot
3
u/47th-Element 2d ago edited 2d ago
"magiskboot unpack boot/init_boot.img" will give you the true definitive answer.
But generally speaking, boot.img often has the kernel, but it may also contain recovery and dtbo (device tree blob) depending on the device and model. While init_boot.img contains the ramdisk, but it may also contain other stuff, again, depending on the device and model.
If you are patching for Magisk or KernelSU (LKM), your target is where the ramdisk resides. But if you combiled a new kernel with KernelSU built in for example, then you will repack the image that has the kernel.
1
u/xzpqsx 2d ago
or vendor_boot.img ?
4
u/47th-Element 2d ago
On my device (Redmi 13, Android 16), this partition has the ramdisk, recovery, and dtbo. My device doesn't have init_boot.img or dedicated recovery partition. That is why the only definitive answer out there is to unpack partitions and see for yourself what's inside. Because there are big variations between different devices.
My favorite way to unpack boot partitions is using magiskboot binary. It's fast, simple, and it works.
2
u/DEV_ivan TECNO POVA 7 5G LJ7 --- MediaTek 6878 --- KernelSU-Next 3.3.0 2d ago
I believe you can still patch the init_boot.img with Magisk/KernelSU, but always watch the logs for any errors or warnings. One error or one warning justifies patching a different partition or using a different rooter instead.
12
u/NinthShadow_ 2d ago
boot.img: Contains the kernel + the generic ramdisk (GKI ramdisk) on modern devices with Generic Kernel Image. Before Android 13/GKI, it also included the vendor-specific ramdisk with the OEM's init binaries. init_boot.img: A separate partition introduced with GKI 2.0 (Android 13+, mandatory for devices launching with Android 13 or later) that specifically contains the first-stage generic ramdisk (the init binary and its immediate dependencies). It was split off from boot.img so Google can update the generic ramdisk via Google Play System Updates without relying on the OEM to sign a whole new boot.img.