Root via AnyKernel and Magiskboot [Without Patching Init_Boot]

Recently, I was planning to root my device via AnyKernel by having a look at the official documentation provided by KernelSU. One line which I came across was “Download the AnyKernel3 ZIP. Open the Kernel Flasher app, grant necessary root permissions, and use the provided AnyKernel3 ZIP to flash”. Well, when my device doesn’t even have root to begin with, how can I “grant necessary root permissions” to the Kernel Flasher app in the first place!

root kernelflasher - 1

To address this, there are two ways out. First, get root by patching and flashing the init_boot or use the GKI image provided by KernelSU to temporarily boot your device, give the Kernel Flasher app the necessary root access, and then flash the AnyKernel3 ZIP via it. While the first method is unnecessarily lengthy, the second method doesn’t work on some devices [they don’t support the fastboot boot patched_boot.img command].

So what else can be done? Well, I’ll show you a nifty method using which you can root your device via the Magiskboot and then easily flash AnyKernel, there’s no need to patch and flash the init_boot nor is there any need for temporary booting the patched boot.img. So without any further ado, let’s get started.

How to Root via AnyKernel and Magiskboot

YouTube video - 2

Before starting, please take a complete device backup. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.

  1. Download the same firmware that is installed on your device [you may verify via the Build Number].
  2. Now extract it and get the boot.img file. Next up, download the magiskboot.zip and extract it as well.
  3. Then transfer the boot.img & magiskboot.exe inside the same folder and open a CMD window there.
  4. Now download the AnyKernel ZIP file corresponding to your kernel and extract it to the same folder. My Pixel 6A has the kernel version 6.1.145-android14-11-gbd17012cc2f7-ab14044926 . So the nearest build of AnyKernel corresponding to this version is AnyKernel3-android14-6.1.134_2025-05.zip, which is what I will be using right now.
  5. Extract AnyKernel ZIP, copy the Image file from there, and transfer it to the same folder where boot.img & magiskboot.exe files are present. Likewise, rename the Image file to kernel.
  6. Now, let’s pack all these files. For that, type in the below command, replacing name with the desired version [I’ll rename it after my device codename, bluejay]. magiskboot repack boot.img name.img
  7. Now download and extract Android SDK Platform Tools on your PC.
  8. Next up, enable USB Debugging and OEM Unlocking on your device.
  9. Now unlock the bootloader on your device [take a backup beforehand].
  10. After that, type in the below command to boot to the Fastboot Mode adb reboot bootloader
  11. Then type in either of the two commands, depending on your device: temporary boot: fastboot boot name.img permanent flash: fastboot flash boot name.img
  12. If you have done a temporary boot and everything is working fine [see STEP 13], then boot to Fastboot Mode and permanently flash it [refer to the above command]. Then boot to the OS as shown below.
  13. If you have permanently flashed it, boot your device to the OS via the below command: fastboot reboot
  14. Finally, download and install KernelSU and launch it to verify if the root is successful or not.
  • How to Spoof Custom Kernel to Stock using KernelSU and SUSFS
  • How to Add Module and Repository to Magisk/KernelSU/APatch
  • KERNELSU V2 SIGNATURE NOT FOUND IN KERNEL [FIXED]
  • How to Root via Magisk when it’s Already Rooted using KernelSU
Google preferred - 3 Google preferred - 4

(Cancel Reply)

Δ