How to Root a OnePlus Device with Magisk

Rooting a OnePlus phone has always been fairly straightforward, but recent Android updates have changed the process slightly. Some models now use an init_boot partition instead of the traditional boot.img. If you’re planning to root your device with Magisk, you’ll need to know which partition your phone uses, grab the correct firmware, and then patch the right image.

Here’s a simple, no-nonsense guide that works across most modern OnePlus devices.


What You’ll Need

  • A OnePlus phone with the bootloader unlocked

  • A PC with ADB and Fastboot installed

  • The Magisk app installed on your phone

  • The full firmware package for your exact device version (to get boot.img or init_boot.img)


Step 1: Check if Your Device Uses init_boot Partition

  1. Connect your phone to the PC and boot into fastboot:

    adb reboot fastboot
  2. On the PC, run:

    fastboot getvar all
  3. If you see an init_boot partition, that’s the file you’ll need.
    If not, stick with boot.img.


Step 2: Get the Correct Image

Download the firmware that matches your phone’s current version. If the firmware version is different, flash the matching firmware first—root will only work if the patched image is from the same build.

  • Extract boot.img or init_boot.img from the firmware package.


Step 3: Patch with Magisk

  1. Copy the image file (boot.img or init_boot.img) to your phone.

  2. Open Magisk → InstallSelect and Patch a File.

  3. Choose the image. Magisk will save a patched copy in your Downloads folder.


Step 4: Flash the Patched Image

  1. Reboot your phone back into fastboot:

    adb reboot fastboot
  2. Flash the patched file:

    • For devices with init_boot:

      fastboot flash init_boot magisk_patched.img
    • For devices with boot.img:

      fastboot flash boot magisk_patched.img
  3. Reboot:

    fastboot reboot

Step 5: Confirm Root

Once your phone boots, open Magisk. If everything went well, you should see that root access is active. You can double-check with apps like Root Checker.