Home > Root

How to Root Android 13 via Magisk Patched Init_Boot/Boot

In this guide, we will show you the steps to root your Android 13 device via Magisk patched boot.img file. The thirteenth iteration of the OS build has brought in a slew of intriguing features, but you will till be limited to what the OEM has to offer. Well, unless you decide to step in the custom development, which in turn will allow you to welcome abode a plethora of tweaks onto your device.

These include the likes of LSposed, Xpsoed, and a slew of Magisk Modules. But before you could carry out any of these tweaks, there’s an important prerequisite that you need to checkmark off the list- you’ll have to root your device Android 13 device via Magisk Patched init_boot/boot.img file. And in this guide, we will show you how to do just that. So without further ado, let’s get started.

Benefits and Risks of Rooting Android 13

Once you root your device by flashing the Magisk patched boot.img via Fastboot Commands, you will be in a position to try out a plethora of customizations on your device. These include the likes of flashing custom ROMs, installing a custom recovery like TWRP, or flashing a custom kernel. Along the same lines, you could also flash Magisk ModulesXposed FrameworkSubstratum ThemesViper4Android, and the likes. However, this is just one side of the story.

root android 13
LSPosed in action on Android 13

Carrying out this process also has its downsides. First off, the process requires an unlocked bootloader. Doing so will wipe off all the data and could nullify the device’s warranty as well. Likewise, WideVine L1 will be degraded to L3, resulting in the inability to stream Netflix in HD [FIXED]. Then the SafetyNet will be triggered [FIXED], which might cause issues with banking apps [FIXED]. If that’s well and good, then let’s get started with the steps to root your device.

IMPORTANT: Rooting Android 13 is different from previous OS!

Till Android 12, you just need to extract the boot.img from the sock firmware, patch it via Magisk, boot your device using the patched file via the fastboot boot command, and then use Magisk’s Direct Install feature to complete the process. However, beginning with Android 13, this process is slightly different now. For the devices that ship with Android 13 out of the box, such as Pixel 7/Pro, Xiaomi 13, and OnePlus 11, you don’t have to use the boot.img file.

root android 13
Init_boot.img file inside Pixel 7 Pro Stock Firmware

Instead, you have to use the init_boot.img file which could be extracted from the stock firmware itself. After this, you could patch the init_boot via Magisk and flash it via Fastboot [as of now, you cannot temporarily boot patched init_boot via Fastboot, so you cannot use Magisk’s Direct Install either. Rather, you will have to directly flash the patched init_boot via the fastboot flash command.

root android 13
Patching init_boot via Magisk

However, do keep in mind that this rule only applies to the devices that come with Android 13 out of the box, if your device came with an older version of OS and has subsequently received the Android 13 update, such as OnePlus 10 or the Pixel 6 series, then you don’t have to use the init_boot file, rather you should still use the older method of rooting via patched boot.img.

How to Root Android 13 via Magisk Patched Boot.img

root android 13 via magisk

The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned. 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.

STEP 1: Install Android SDK

install adb platform tools windows

First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform-tools folder, which will be used throughout this guide.

STEP 2: Enable USB Debugging and OEM Unlocking

Next up, you will also have to enable USB Debugging and OEM Unlocking on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode. On the other hand, OEM Unlocking is required to carry out the bootloader unlocking process.

root android 13 via magisk

So head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging and OEM Unlocking.

STEP 3: Unlock Bootloader

Next up, you will also have to unlock the device’s bootloader. Do keep in mind that doing so will wipe off all the data from your device and could nullify its warranty as well. So if that’s all well and good, then please refer to our detailed guide on How to Unlock Bootloader on any Android Device.

STEP 4: Extract Stock Boot/Init_Boot

  1. To begin with, download the stock firmware [factory image] for your device.
    root android 13 via magisk
  2. Make sure to download the same version that is currently installed on your device. To check the same, head over to Settings > About Phone > Build Number.
    root android 13 via magisk
  3. Once downloaded, extract it to any convenient location on your PC. For Pixel devices, you can simply extract the firmware via WinZIP/WinRAR and get the boot.img from the Images folder.root android 13 via magisk
  4. However, for other OEMs, things are a little bit different. So refer to your device-specific guides to extract the stock boot.img file for your device from the below links:
    root android 13 via magisk

  5. Once you have extracted the firmware, copy the boot.img file [if your device originally shipped with an OS version older than Android 13] or init_boot.img [if your device shipped with Android 13 out of the box] and transfer it to your device.

STEP 5: Patch Boot/Init_boot via Magisk

  1. Download and install the latest Magisk APK onto your device.
  2. Then launch it and tap on the Install button next to Magisk.
  3. After that, choose ‘Select and Patch a File’, navigate to the stock boot.img/init_boot.img file, and select it.
    root android 13 via magisk
  4. Then tap on the Let’s Go button situated at the top right.
  5. The boot.img file will now be patched and placed under the Downloads folder on your device.
    root android 13 via magisk
  6. You should transfer this patched boot/init_boot file to the platform-tools folder on your PC. Also, rename it magisk_patched. We will now be using this file to root your Android 13 device.
    root android 13 via magisk

STEP 6: Boot to Fastboot Mode

  1. Now connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
  2. Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
    command-prompt-inside-adb
  3. Type in the following command in the CMD window to boot your device to Fastboot Mode
    adb reboot bootloader

    root android 13 via magisk

  4. To verify the Fastboot connection, type in the below command and you should get back the device ID.
    fastboot devices

STEP 7A: Root Android 13 using Magisk Patched Boot.img

This step is applicable for those devices that came with an OS version older than Android 13 and have since received an Android 13 update.


It is always recommended to first boot your device via the patched boot.img, rather than directly flashing it. This way you will be able to check if everything is working well or not. If everything is on the good side, then you may proceed to the permanent root. So use the below command to boot your device via magisk patched boot.img and hence attain temporary root.

fastboot boot magisk_patched.img

root android 13 via magisk

Now that your device is booted without any issues with a temporary root, let’s now make this root permanent. So refer to the below instruction steps to try it out.

  1. Launch the Magisk app and tap on Install.
  2. Then tap on Direct Install (Recommended) > Let’s Go situated at the top-right.
    root android 13 via magisk
  3. Once done, hit the Reboot button situated at the bottom right.
  4. That’s it, your device will now boot to the rooted OS.

STEP 7B: Root Android 13 using Magisk Patched Init_Boot.img

This step is applicable for those devices that came with Android 13 out of the box.


  1. Type in the below command in the CMD window to flash the patched init_boot.img file:
    fastboot flash init_boot magisk_patched.img
  2. Make sure to replace magisk_patched.img with the name of the patched init_boot.img file.
  3. NOTE: If you are getting the Failed (remote: Flashing is not allowed for partition) error, then you’ll have to flash the patched init_boot to the FastbootD Mode instead of the Fastboot/Bootloader. For that, use the fastboot reboot fastboot command to directly boot to FastbootD Mode and then use the above [or below] command to flash the file.
  4. If the above command didn’t work, then you should manually flash the init_boot to both slots using the below command:
    fastboot flash init_boot_a magisk_patched_boot.img
    fastboot flash init_boot_b magisk_patched_boot.img
  5. Your device should now boot to the rooted OS. If it doesn’t happen, then you may manually do so via the below command:
    fastboot reboot

So with this, we round off the guide on how you could root your Android 13 device via Magisk patched boot.img. If you have any queries concerning the aforementioned steps, do let us know in the comments section below. We will get back to you with a solution at the earliest.

FIX: Error while flashing Init_boot

If you are getting an error message such as [Flashing is not allowed in lock state], then try flashing the patched init_boot in the FastbootD Mode, as opposed to Fastboot/Bootloader Mode. The flashing commands are the same as listed above. As far as booting to FastbootD is concerned, you could use the adb reboot fastboot command if you want to do so from the OS or use the fastboot reboot fastboot if you want to do so from the Fastboot/Bootloader Mode.


Share:
  • I have a issue with my nord n30. It is carrier unlocked through T-Mobile. I am trying to use it on Metro PCs, which is through T-Mobile. Now here’s the fun part . In engineer mode, when I click on simlock test, it shows locked with operator id 32 American … What do I need to do to get this phone to work??