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.
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.
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
- Setup ADB and Fastboot on your PC. For help, use this link .
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.
- Connect your phone to PC and open a command window on the PC.
- 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.
- 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.
- 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.
Download the TWRP recovery from below:
- OnePlus 5: TWRP 3.2.3-1 (find more versions here; in case 3.2.3-1 doesn’t work, try 3.2.3-0)
- OnePlus 5T: TWRP 3.2.3-1 (find more versions here)
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
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.
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.
- Make sure you have unlocked the bootloader of your OnePlus 5 and OnePlus 5T (as given above).
- Download the required files:
- Make sure you have enabled USB Debugging on your OnePlus 5 device. You may need to re-do it after unlocking the bootloader.
- Connect your OnePlus 5 device to PC using the USB cable that came with it.
- 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.
- 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.
- 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
- 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
- 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.
- [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.
- 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.)
- 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.
- 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 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:
- Power off the device.
- 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.