A Beginner’s Guide to Unlock Bootloader, Install TWRP Recovery, and Root OnePlus 8 (Pro) using Magisk

A Beginner's Guide to Unlock Bootloader, Install TWRP, and Root OnePlus 8/8 Pro

This is a comprehensive all-in-one guide through which you’ll learn how to unlock the bootloader, install TWRP recovery, and simultaneously root OnePlus 8/OnePlus 8 Pro using Magisk. This guide and the included instructions are compatible with any OnePlus 8 or OnePlus 8 Pro running Android 10 (OxygenOS 10).

OnePlus phones are extremely development-friendly, primarily because the bootloader unlocking is easily possible through fastboot. Soon after the launch, stable builds of TWRP recovery for the OnePlus 8 and OnePlus 8 Pro were released, courtesy of XDA Recognized Developer mauronofrio.

Although the recovery is currently labeled as ‘unofficial’, it’s quite stable for usage. According to the developer, the available builds of TWRP support decryption of the data partition/internal storage, and can be used for backing up/restoring NANDroid backups, and also to install flashable ZIPs like custom ROMs, kernels, etc.

With TWRP now available, you can use it to flash Magisk and easily root the OnePlus 8/8 Pro. Rooting via Magisk will not only allow you to use root applications but also install Magisk modules to modify your phone’s software systemless-ly. This, in turn, enables you to keep the critical partitions untouched which can be extremely beneficial for passing SafetyNet checks and also for installing OxygenOS OTA updates after rooting.

It does not matter if you’re just a beginner or a veteran in the field of software modding; the instructions in this guide will take you through the complete process in a step-by-step manner. So, by the time you’re finished reading this guide, you’ll be able to:

  • Unlock the bootloader
  • Install TWRP recovery
  • and, root your OnePlus 8/OnePlus 8 Pro using Magisk.

Did you know? You can also root the OnePlus 8 series without TWRP. This is beneficial if you do not find a particular need for your use-case and also makes the OTA-on-rooted-phone process much easier.

Table of Contents

Before You Begin

Before you start following the instructions, there are a few requirements that should be met. These are:

  • A major part of this guide requires using a PC. So, you will need a Windows, Linux, or Mac PC.
  • Take a backup of all your important data stored on your phone. Everything including the apps, contacts, messages, photos, videos, documents, and complete internal storage will be erased while performing this process. If you need a hand, you can refer to our very own and simple guide to take full backups.
  • Second, charge your OnePlus 8 to a sufficient battery level (recommended: 60% or above). This shall prevent your phone from suddenly shutting down in the middle while you’re performing the steps.
  • At various points during the instructions, we’d ask you to boot your OnePlus 8/8 Pro into Fastboot and Recovery modes. It’s very important that you know how to do that and get comfortable doing it. Refer to this page for instructions.
  • You will often need to connect your OnePlus 8 to your PC while performing certain parts of the instructions. So, in order for the PC to properly recognize your phone, you will need to have the latest version of the OnePlus USB drivers installed.

Downloads

Below, you will find the links to download all the files you’ll need. You can download these to your PC beforehand, or when you’re asked to while performing the instructions.

It’s strongly recommended that you always download and use the latest version of TWRP and Magisk at the given point. We have provided links to the previous builds of TWRP for documentation purposes and should you need them.

Important Update: TWRP does not support Android 11 (OxygenOS 11). So, if your OnePlus 8/8 Pro is running A11, please do not attempt to install TWRP. It will end up the phone in Qualcomm’s Crash Dump mode. To fix it, you will need to extract and flash the stock recovery image.

In the meantime, you could easily root your phone without TWRP by following this tutorial.

Instructions

Like any other modern-day Android device, rooting the OnePlus 8 (Pro) could be done in two different ways. First is through TWRP recovery, by using it to flash the Magisk root package. The second way to root is by flashing a Magisk patched boot image to your OnePlus phone via fastboot.

In this guide, we are focussing our attention on the former, that is, rooting the phone through TWRP recovery. In doing so, not only you’d learn how to root but also how to install TWRP on the OnePlus 8/8 Pro, which you can further utilize for flashing ROMs, kernels, taking backups, etc.

The process itself is quite straightforward. So without any ado, follow the steps below to unlock the bootloader, install TWRP, and root OnePlus 8/8 Pro using Magisk.

Step 1: Set up Android SDK Platform-tools on PC

The first step of the process is to install and set up the Android SDK Platform-tools on your PC. These platform-tools include the fastboot command-line tool that you’ll need for unlocking the bootloader, as well as for installing TWRP.

The quickest and easiest way to install the Android SDK Platform-tools is by doing it manually, which is exceptionally easy (believe me it is). To do this:

  1. First, download the latest version of the Android SDK platform-tools on your PC:
  2. Once you have downloaded the platform-tools ZIP file, extract its contents. Once extracted, move the ‘platform-tools’ to an easily accessible location on your PC. If you’re using Windows, we suggest moving the folder to the C:\ drive. On the other hand, if you’re using Linux/macOS, move the folder inside the ‘Documents’ folder.
  3. Now, launch the command-line window inside the ‘platform-tools’ folder, where the fastboot tool/binary is present.
    1. On Windows: Go to the ‘platform-tools’ folder. Then right-click on any empty space inside the folder while holding the SHIFT key. Select the ‘Open PowerShell window here’ option.
    2. On Linux/Mac: Launch the ‘Terminal’ and change its directory to the ‘platform-tools’ folder using the cd command. For example, if the ‘platform-tools’ folder is inside the ‘Documents’ directory, then the command should look like:
      cd Documents/platform-tool

      OnePlus 8/8 Pro Guide: Launch Terminal on Mac/Linux

That’s it, you now have the Android SDK platform-tools set up and ready-to-use for the steps that follow. Make sure that you keep this command-line window open until you’re asked to close it. Although if you do accidentally close it, you can always launch it again.

Some notes about fastboot

  • When entering fastboot or ADB commands while performing the instructions, make sure that you use the right syntax according to your PC. In Windows PowerShell, prepend the given command with a dot and backslash [.\]. In Linux/Mac Terminal, prepend the commands with a dot and a forward slash [./].
  • Users often confide in one-click ADB/Fastboot installers such as Minimal ADB and Fastboot. However, we would not recommend you to use such installers because most (if not all) of them contain outdated versions of the ADB and Fastboot tools.
  • If you encounter unusual errors while using fastboot commands, then try using the USB 2.0 ports of your PC to connect your phone.

Step 2: Unlock OnePlus 8 Bootloader

Unlocking your OnePlus 8/OnePlus 8 Pro’s bootloader is the top-level requirement for installing TWRP, rooting, or making any other sort of modifications to the software.

Thankfully, the bootloader on OnePlus phones can easily be unlocked using a simple fastboot command. You wouldn’t need to acquire any unlock key or get a server-side approval from the manufacturer, which makes the process a whole lot easier and very less time-consuming.

To unlock the bootloader on the OnePlus 8/8 Pro:

  1. First, enable the Developer Options menu.
  2. Then go to ‘Settings’ > ‘System’ > ‘Developer options’ and turn ON the ‘OEM Unlocking’ switch. Without enabling OEM Unlocking, your phone will not accept the bootloader unlocking command.
    Enable OEM Unlocking on OnePlus 8/8 Pro
  3. Now, power off your OnePlus 8 completely and boot it into Fastboot Mode.
    Connect OnePlus 8/8 Pro to PC in Fastboot Mode
  4. Connect the phone to your PC over USB, while it’s in Fastboot Mode.
  5. Enter the following command in the PowerShell/Terminal to ensure that the PC can recognize and communicate with your phone over the fastboot interface:
    fastboot devices
  6. The command should return your phone’s unique ID. If it doesn’t, then ensure that you have the proper OnePlus USB drivers installed and try using a USB 2.0 port on your PC.
  7. Now, enter the following fastboot command to unlock the bootloader on your OnePlus 8/8 Pro:
    fastboot flashing unlock

    Enter fastboot command to unlock bootloader on OnePlus 8/8 Pro

  8. As soon as the command is entered, you will see a message on your phone’s screen, prompting you to confirm the unlock. Simply use the Volume keys to highlight “UNLOCK THE BOOTLOADER” and press the Power button to confirm.
    Confirm Bootloader Unlock on OnePlus 8/8 Pro

Your phone will automatically reboot into the system (OS). You will also see the unlocked bootloader warning message during the initial boot process. This is a mandatory warning and completely normal.

Do note that the only way to get rid of this warning message is by relocking the bootloader, which is NOT RECOMMENDED if you plan on installing TWRP, rooting, etc.

OnePlus 8/8 Pro Unlocked Bootloader Warning

That’s it! Your OnePlus 8’s bootloader is now unlocked. From here on, you can head over to the next step to install TWRP recovery. Or, if you wish to root your OnePlus 8/8 Pro without TWRP, then directly skip to this tutorial.

Step 3: Install TWRP Recovery

With an unlocked bootloader, you can now install TWRP recovery on your OnePlus 8/8 Pro. According to the developer, OnePlus has re-introduced the /recovery partition. This means you will not need to temporarily boot TWRP image and then flash the TWRP installer ZIP for permanent installation anymore.

Instead, you can now simply flash the TWRP recovery image to the /recovery partition of your phone, as shown in the instructions below.

To install TWRP on the OnePlus 8/8 Pro:

  1. First, download the latest TWRP recovery image to your PC.
  2. Move the downloaded image file inside the ‘platform-tools’ folder and launch the PowerShell/Terminal window on the PC (refer to step #1).
    Move OnePlus 8/8 Pro TWRP image inside 'Platform-tools' folder
  3. Power off your phone completely and boot it into Fastboot Mode by holding the Volume Up, Volume Down, and Power buttons together.
  4. Connect the phone to the PC using the USB cable.
  5. Enter the following command to ensure that your PC can communicate with the phone over the fastboot interface:
    fastboot devices
  6. Now, flash the recovery image to install TWRP on your OnePlus 8/8 Pro using the following command:
    fastboot flash recovery twrp-image-filename.img

    Replace “twrp-image-filename.img” with the full filename of the TWRP recovery image you’re flashing. For example, if you’re going to install TWRP 3.4.0-2, then the command should be:

    fastboot flash recovery twrp-3.4.0-2-instantnoodle-unified-mauronofrio.img

    Flash TWRP Recovery Image on OnePlus 8/8 Pro

  7. Boot your phone right into recovery mode now. To do this, tap the Volume keys until you see the “Recovery Mode” selection on the top of the fastboot screen. Then press the Power button to confirm and boot your OnePlus 8 into TWRP recovery mode.
  8. Upon entering, TWRP will prompt you to enter the password to “Decrypt Data“. Simply input your phone’s lock screen password/PIN.
    Decrypt Data in OnePlus 8/8 Pro TWRP Recovery

That’s it! Now with your phone in TWRP recovery mode, head over to the next and final step for rooting.

Step 4: Root OnePlus 8/8 Pro by Flashing Magisk

With TWRP installed, you can now flash the Magisk installer ZIP file to root your OnePlus 8/OnePlus 8 Pro. The instructions for this are as follows.

  1. First, download the latest Magisk installer ZIP file on your PC.
  2. Next, connect your OnePlus 8/8 Pro to the PC via USB. Your PC will recognize and automatically mount your phone’s internal storage over MTP. In case it doesn’t, go to the ‘Mount’ menu of TWRP and press the ‘Enable MTP’ button.
  3. Transfer the downloaded Magisk ZIP file to your phone’s internal storage.
  4. Disconnect the phone from the PC once the file has been transferred.
  5. Now go to the ‘Install’ menu from the TWRP main screen.
  6. Navigate through the phone’s internal storage (/sdcard) and select the Magisk ZIP file (e.g. Magisk-v20.4.zip) to add it to TWRP’s flashing queue.
    Flash Magisk ZIP to Root OnePlus 8/8 Pro
  7. Finally, swipe the button on the bottom of the screen to flash Magisk and root your OnePlus 8/OnePlus 8 Pro.
  8. Once the flashing process finishes, press the ‘Reboot’ button and select ‘System’.
    Reboot OnePlus 8/8 Pro into System after rooting

Your phone will now boot into the system (OS) and should be rooted via Magisk. To verify this, launch the “Magisk Manager” application and check Magisk’s installation status. It should look as shown in the figure below.

OnePlus 8/8 Pro successfully rooted with Magisk

That’s it! Through this guide, you have learned how to unlock the bootloader, install TWRP, and root your OnePlus 8/8 Pro using Magisk. You can now use TWRP recovery to flash custom ROMs or kernels available on XDA, use root applications like Titanium Backup, and install Magisk Modules to apply modifications to your phone’s software systemless-ly. With root permissions, you can also install the ViPER4Android audio mod on the OnePlus 8 series.

Note: If you wish to unroot your phone at any point during the future, you can easily do so by using the ‘Uninstall’ option in Magisk Manager or flashing the Magsk Uninstaller ZIP file (Download here) using TWRP. Further, you can also follow this tutorial if you wish to revert your OnePls 8/8 Pro back to stock OxygenOS software.

Have any questions or find yourself stuck anywhere while performing the instructions? Do let us know.

// TWRP source