Update [January 03, 2019]: Added Magisk v18.0.

Update [September 02, 2018]: Added TWRP 3.2.3-1 for the OnePlus 5 too. This version supports Project Treble as well as an ability to decrypt the data partition, which is cool.

Update [August 20, 2018]: The article has been updated to provide latest TWRP recovery that supports Android 9 Pie as well as Project Treble, TWRP 3.2.3-1.


Well, some good news here, folks! The OnePlus 5/5T root is now available, meaning you can now gain superuser access on the OP5, and use your favorite root apps for some super cool stuff right away.

The OnePlus 5 root is available thanks to TWRP recovery for the device becoming available today, which is what you need to install first in order to gain root access.

Though, that’s not really the first step, as you would need to unlock the bootloader of your OnePlus 5 first. So, achieving root access on OnePlus 5 goes in this order: unlock the bootloader, then install TWRP, and then dead-simple method to gain root access.

We have covered everything below in our guide to help you root OnePlus 5/5T easily, so do check it out now.


OnePlus 5T root

To be able to root. you need TWRP recovery, and for TWRP, you first need to unlock the bootloader of your OnePlus 5 or OnePlus 5T, whatever you have.

How to Unlock Bootloader on OnePlus 5 and OnePlus 5T

  1. Setup ADB and Fastboot on your PC. For help, use this link .
  2. Enable OEM unlock and USB debugging:
    • Go to your phone’s Settings » About phone » and tap “Build number” Seven/Ten times. This will enable Developer options on your OnePlus 5.
    • Now go to Settings » Developer options » and look for “Enable OEM unlock” option, tick the checkbox next to it.
    • On the same page, also tick the USB debugging checkbox.
  3. Connect your phone to PC and open a command window on the PC.
  4. Reboot your OnePlus 5/5T into Bootloader/Fastboot mode by issuing the following command:
    adb reboot bootloader

    └ Check your phone’s screen, if it asks for “Allow USB debugging”, accept it by selecting OK/Yes.

  5. Once it is booted into Bootloader mode, issue the following command to finally unlock the bootloader on your OnePlus 5/5T:
    fastboot oem unlock

    └ This will unlock the bootloader on your OnePlus 5/5T and also completely wipe your phone while doing that. So make sure you backup everything important on your device before unlocking the bootloader.

  6. Once the bootloader is unlocked, your OnePlus 5/5T will automatically reboot. In case it asks for bootloader unlock permission on the device, accept it.

That’s all. Your OnePlus 5/5T bootloader should be unlocked now and you can install/flash a custom recovery like TWRP on it.


TWRP recovery

Download the TWRP recovery from below:

We are providing a single guide below that helps you install TWRP first, and then root the device. So, to install TWRP, just follow the root guide below.

OnePlus 5 and OnePlus 5T Root

Warning!

Do not try anything given on this page if you do not know completely what you are doing. In case any damage occurs, we won’t be held responsible.

Compatibility

The stuff given on this page is compatible only with the OnePlus 5 and OnePlus 5T. Do not try this on any other device as you might end up damaging your device.


Let’s see how to install TWRP first, and then root the OnePlus 5 and OnePlus 5T.

  1. Make sure you have unlocked the bootloader of your OnePlus 5 and OnePlus 5T (as given above).
  2. Download the required files:
    1. TWRP recovery from above
    2. Magisk 18.0 root package
    3. DM Verity disabler
  3. Make sure you have enabled USB Debugging on your OnePlus 5 device. You may need to re-do it after unlocking the bootloader.
  4. Connect your OnePlus 5 device to PC using the USB cable that came with it.
  5. Now open a command window inside the folder where you have the TWRP file from above. For this, go that folder, and then type cmd in the address bar of that folder’s window, and then hit the enter key. A command window will open up, and its location will be that folder.
    open-a-command-window-in-a-folder
  6. Connect your OnePlus 5 device to the PC. And type the following into the command window we opened in Step 5 above to boot your device into bootloader/fastboot mode:
    adb reboot bootloader

    └ If you get a permission dialogue on your OnePlus 5/5T to “Allow USB debugging”, tap OK.

  7. Once your OnePlus 5/5T boots into bootloader mode, issue the following command into command window to flash the TWRP recovery .img file :
    fastboot flash recovery <name of twrp file here>.img
  8. Run the command below to reboot into recovery mode to make sure the system doesn’t remove the TWRP upon reboot to Android.
    fastboot boot <name of twrp file here>.img
  9. The device will reboot to recovery mode and you will see TWRP recovery right there. Tap on ‘Keep Read Only’ button now to do not allow system modifications.
    twrp keep read only
  10. [Ignore this if using TWRP 3.2.3-1 on OnePlus 5.] In TWRP, tap on Wipe, and then on Format data option. Type yes on the next screen to confirm wiping of data. This will delete everything on the device.
  11. Connect your OnePlus 5 to your PC now using a USB cable and transfer the DM Verity disabler file and Magisk file to the device again as everything on the device is deleted now. (No for OnePlus 5 though if you used TWRP 3.2.3-1 on that device that already supported decryption and thus ‘Format data’ was not required.)
  12. Time to root your OnePlus 5 device. Install the magisk file to root the device, but if you don’t want to root, you still need to install the DM Verity disabler file to prevent the device from bootlooping when starting to Android from TWRP.
    → Go back to the home screen of TWRP and tap on Install button, and then select the Magisk file (or DM verity disabler if you don’t want to root), and confirm the installation on the next screen.
  13. Reboot now and your OnePlus 5 will start to Android. If you installed Magisk, you can verify root access on your OnePlus 5 using a root checker app. (If you want to install Android Pie now using TWRP, see check out the link below.)

How to install Android 9 Pie on your OnePlus 5 and OnePlus 5T now


How to reboot into recovery mode to access TWRP recovery

TWRP recovery should be installed on your device now. To boot into the freshly installed recovery, you can use adb — simply issue the adb reboot recovery command after connecting the device to PC.

Or, use the manual mode to reboot into recovery mode as explained below:

  1. Power off the device.
  2. Press and hold power and volume down buttons together for a few seconds until you see the OnePlus logo on the screen. You will see the TWRP soon.

Happy Androiding!