How to Root OnePlus 7 & OnePlus 7 Pro using Magisk Patched Boot Image

How to Root OnePlus 7 and OnePlus 7 Pro using Magisk

In this step-by-step guide, you’ll learn how to root OnePlus 7 and OnePlus 7T using Magisk Patched Boot Image, without having to install TWRP recovery at all. The instructions will work on any OnePlus 7/7 Pro running Android 10 (OxygenOS 10+) or Android 9 Pie (OxygenOS 9+).

Advertisement

Table of Contents

Overview

Rooting your phone with Magisk not only allows you to use root applications but also enables you to apply modifications to your phone’s software systemless-ly. That is without actually mounting or altering the system partition of the phone. We have already covered a guide to install TWRP on OnePlus 7/7 Pro and then using it to root the phone.

A custom recovery like TWRP is usually preferred while flashing custom ROMs/kernels, taking Nandroid backups, wiping device partitions, etc. But if none of that is your concern and you just want to root your OnePlus 7 (Pro), then there’s no need to install TWRP at all.

Furthermore, Magisk creator and developer John Wu also provided an explanation as to why having both TWRP and Magisk root installed together in the /boot partition could cause problems, especially on Android 10 or above. Even if you plan on using custom ROMs, you could still boot TWRP temporarily and use it to install ROMs or anything else for that matter.

To sum up, rooting your OnePlus 7 / 7 Pro without installing TWRP can make things more streamlined, leading to minimal scope for any errors. Plus, rooting via this method also enables you to easily install OTA updates on your rooted phone.

The process is very simple. In brief, the first step is to download the stock boot image corresponding to the OxygenOS version installed on your phone. Then, the second step is to patch the stock boot image with Magisk, via the Magisk Manager app. And finally, the third step is to flash the resultant patched boot image to your phone via fastboot.

So now, without any further ado, let us begin with the instructions.

Related Article: Download Google Camera (GCam) Port for OnePlus 7/OnePlus 7 Pro

How to Root OnePlus 7 and OnePlus 7 Pro using Magisk

Prerequisites

  • Rooting your phone will not erase any data stored on it. However, we’d still strongly suggest taking a full backup to safeguard the data, just in case. If you want, you can refer to our detailed guide for the same.
  • Make sure to charge your device up to a safe battery percentage. Minimum 50-60% is recommended. This will ensure that the device does not suddenly turn off during the rooting process.
  • Rooting your OnePlus 7/OnePlus 7 Pro will require an unlocked bootloader. If you haven’t unlocked yet, then follow the instructions in this guide.
  • Also, make sure to install the latest OnePlus USB Drivers on your PC.

Instructions

For your convenience and a better understanding of the complete procedure, we have split the instructions into different steps. So, let’s start!

Step 1: Download the Stock Boot Image for your OnePlus 7/7 Pro

The first step of the process is to download the stock boot image of the OxygenOS version installed on your OnePlus 7 and OnePlus 7 Pro. We have extracted and provided the links to download the stock boot images for all different variants of the said phones.

Although we could have provided pre-patched boot images, we decided not to do so. That’s because when you patch the stock boot image by yourself, Magisk Manager takes a backup of your phone’s stock boot image. This makes it easier to further install OTA updates on your rooted OnePlus 7 device and also important should you want to unroot and restore the stock boot backup.

Note: If you have got your hands on a full ROM package of a more recent OxygenOS update, then use this tutorial to extract the payload.bin file. This will help you get the stock boot image for the latest OxygenOS version.

Advertisement

OnePlus 7

OnePlus 7 Pro

Step 2: Patch the Stock Boot Image using Magisk Manager

Once you have downloaded the correct stock boot image, transfer it to your phone’s internal or external storage.

Next, download the latest Magisk Manager from here and install the APK on your OnePlus phone using a file manager app. Then go to the app drawer and launch the ‘Magisk Manager’ app.

Now to patch the stock boot image, tap the ‘Install’ button in Magisk Manager. Then press ‘Install’ again and select the ‘Select and Patch a File’ option.Root OnePlus 7 (Pro) - Select and Patch a File in Magisk Manager

Navigate to the phone’s internal storage and select the stock boot image file that you transferred earlier. As soon as you select the file, Magisk Manager will download the latest version of the Magisk Installer and patch the stock boot with it.Root OnePlus (Pro) - Patch Stock Boot Image using Magisk Manager

Once finished, the resultant Magisk patched boot image (filename: magisk_patched.img) should be stored inside the ‘Download’ folder of your phone’s internal storage.

Step 3: Install Android SDK Platform-Tools on PC & Launch Command-Line

You now have to install the Android SDK platform-tools on your PC. The platform-tools include the fastboot tool, that you’ll be using flash the patched boot image to your phone in the next step.

So, download the platform-tools package according to your PC’s OS from below:

Once downloaded, extract the ZIP file to get the ‘platform-tools’ folder containing fastboot and other tools. You can copy this ‘platform-tools’ folder to the C:\ drive if you’re using a Windows PC or to the ‘Documents’ directory on a macOS/Linux PC for easier access.

Next, launch the command-line inside the ‘platform-tools’ folder (Where ADB and Fastboot binaries are installed) on your PC:

  1. PowerShell on Windows: Hold the SHIFT key and right-click on an empty space inside the ‘platform-tools’ folder, then select ‘Open PowerShell window here’.
    Root OnePlus 7/7 Pro without TWRP - Open PowerShell window here
  2. Terminal on macOS/Linux: ‘cd’ to the ‘platform-tools’ folder. For example: If you extracted the payload_dumper.zip’ to the ‘Documents’ folder, then the command should look like:
    cd Documents/platform-tools

Root OnePlus 7/7 Pro without TWRP - cd to 'platform-tools' folder in Terminal

Step 4: Flash Magisk Patched Boot Image to root OnePlus 7/OnePlus 7 Pro

Transfer the Magisk patched boot file (magisk_patched.img) from the ‘Download’ folder of your phone’s internal storage to the ‘platform-tools’ folder on your PC.

Now that you have the patched boot image in place, you can flash it to root your OnePlus 7 or OnePlus 7 Pro. To do this, first power off your phone and boot it into Fastboot Mode by holding the Volume Down and Power keys together. Then connect your phone to the PC using the USB cable once it is in Fastboot Mode.

Enter the following code in the command-line to verify that your PC can communicate and identify your phone over the fastboot interface:

  • On Windows:
    .\fastboot devices
  • On macOS/Linux:
    ./fastboot devices

The command-line should return your phone’s unique ID along with the ‘fastboot’ message. In case it doesn’t, make sure that you have the proper USB drivers installed on your PC.

Now issue the following command to flash the patched boot image and root your OnePlus 7/OnePlus 7 Pro using Magisk:

  • On Windows:
    .\fastboot flash boot magisk_patched.img

    Flash Magisk Patched Boot Image to Root OnePlus 7/7 Pro

  • On macOS/Linux:
    ./fastboot flash boot magisk_patched.img

Since the OnePlus 7 devices support the A/B partition scheme, Magisk will only be installed on your phone’s current active slot; leaving the inactive slot untouched. Once the file has been flashed, reboot your phone into the OS by entering the following code:

  • On Windows:
    .\fastboot reboot
  • On macOS/Linux:
    ./fastboot reboot

That’s it! Your phone will now boot into the system (OS) and should be rooted with Magisk.

You can now install root apps or mods like the EdXposed Framework, ViPER4Android, etc. You can also use Magisk Modules to apply modifications to the software or the Magisk Hide feature to hide root from certain apps.

So, you have just learned how to root the OnePlus 7 and 7 Pro using the Magisk Patched Boot Image method, and all without installing TWRP. If you have any questions regarding the instructions or rooting in general, then feel free to ask us.

Comments

    1. Hi Tabe, I have added the said boot images. Please refresh the page and check now.

    1. Hi Aakash. I have added the latest boot images for both the OP7 and 7 PRO.

  1. I have a Oneplus 7 Pro GM1917 on 10.3.0 and patched the boot image with Magisk and it rooted, but when I restarted the phone it got stuck at the bootloader. I reinstalled the stock boot image and tried it again and it gets stuck at the bootloader every time. I downloaded a patched boot image that someone else patched and get the same issue.

    1. Hi Tabe. Are you using the latest version of SDK platform-tools on your PC?

    1. Addendum:

      Tried with OxygenOS 10.0.3: stock_boot_oos_10.0.3_oneplus7pro_eu.img it roots the device but without Wifi and telefon function… ;-/

    2. Hi. May I know your phone’s model number as well as the OxygenOS version installed on it?

      WiFi and mobile network will stop working if you download and use a incorrect/incompatible boot image.

  2. hey my oneplus 7 is on oos 10.3.0 nd model no. GM1901 how to get stock boot.img for it?pls help

    1. Hi Manish. You should download the OOS 10.3.0 stock boot image for the Global OnePlus 7 variant. I have added the links now.

  3. Hi I need the stock boot image for Oneplus 7 Pro version 10.0.3… This version is already in my phone, but not here?..

    1. Hi. I have added the download links for the same. Please refresh the page and check again.

    1. Hi Mark. Do you mean the OP7 Pro 5G EU variant? If yes, then I have just uploaded the file and added the link to it above. Please check now.

    1. Hi. This is majorly caused by incompatible boot images. Please let me know your phone’s model number, along with the software build number installed on it. Also, which image did you use for your device?

    2. Hello, successfully rooted, but wifi and bluetooh are not working. Model is GM1913, Build number is 10.0.1.GM21AA, and the image used is “stock_boot_oos_10.0.1_oneplus7pro_eu.img”.
      Didn’t find a solution yet.

    1. Hi Kevin. I have uploaded the boot images for OxygenOS 10.0.2, for all OnePlus 7 and 7 Pro variants. Please check now.

    2. Hi Mani. I believe you’re referring to the Chinese variant. If so, I think you have HydrogenOS (not OxygenOS) installed on it, am I right?

    3. You right it’s a chinese variant but with OxygenOs .
      I also installed the EU oxygen ( 10.0.2.GM21AA ).
      So do I have to install stockboot from GM1913 ?

    4. GM21AA software tag is for Indian (GM1911) and Global/US Unlocked (GM1917) variants. Not EU. Are you sure you have GM21AA and not GM21BA?

    5. Hi,I have Oxygen OS 10.0.1 GM21AA on Model 1910 I’m wandering which stock boot should I use to root my phone ?

    6. Hi Fahad. Did your OP7 Pro come with HydrogenOS installed out-of-the-box?

    7. Great! Then you can download the boot images for the OnePlus 7 Pro (EU variant).

    8. Hi ,Dhanajay my OP7 pro comes with Oxygen OS installed , but its model is GM1910 .. By the way I ordered it from AliExpress because in my country Saudi Arabia I Couldn’t Find OP7 pro with 12 GB RAM

    9. Hi Fahad. You may then use the images meant for the OnePlus 7 Pro global variant.

    10. Hi , Dhanajay . Actually my OP7 pro didn’t come with Hydrogen it came with Oxygen OS 10.0.1 GM21AA and model GM1910

    11. Hi Kevin. From now on, I will do it for Open Beta as well. Thanks for the suggestion!

  4. You forgot “boot” in the line (.\fastboot flash magisk_patched.img has no boot in it)
    with boot it worked!

    Great guide nonetheless!

    1. Hi Sairam. First of all, let me know which variant you have? EU or Global? Also, please share the OxygenOS version which is installed and rooted.

    1. Hi Antonio. I have updated the download links and revised the method, so that you can self-patch the stock boot image. Patching the boot image by yourself will allow Magisk to take a backup of the stock boot image, in case you want to uninstall Magisk in future.

Leave a Reply

Your email address will not be published. Required fields are marked *