OnePlus devices are considered developer-friendly as OnePlus allows its devices to be bootloader unlocked with few steps. Most of the users like this factor about OnePlus devices and why not. So, rooting or flashing a custom recovery on an OnePlus is comparatively easier than other Android devices.
Here, we’ll take a look at how to flash TWRP and root OnePlus 5T. The three-year-old device still has a lot of energy left even in 2020, thanks to OnePlus’ nearly ideal software support. In case if you’ve been in search of OnePlus 5 root and TWRP installation tutorial than head over here. Without any further ado, let’s get straight into the tutorial.
Install TWRP on OnePlus 5T running Android Pie
Not many of the users would prefer to flash beta builds. So, we believe the majority of OnePlus users currently will be running the stable Android Pie.
Basically, root access is achieved by flashing a custom recovery, here TWRP recovery, and then installing the latest Magisk via custom recovery. Ultimately, flashing DM-Verity and Force-Encryption disabler via TWRP in order to address the problem caused by tampering of the core OS.
- OnePlus 5T on Android Pie based OxygenOS.
- Minimal ADB and Fastboot,
- Unlocked Bootloader of OnePlus 5T,
- TWRP recovery designated for OnePlus 5T
- Magisk and “DM-Verity and Force-Encryption disabler”.
- Most importantly, patience.
- Official TWRP 3.3.1 for OnePus 5T; Download.
- Minimal ADB and FastBoot: Download.
- Magisk 20.4: Download
- Magisk Manager: Download
- DM-Verity and Force Encryption Disabler: Download
So, let us begin the rooting step-by-step.
Warning : Proceed further if and only if you know the risk associated with flashing custom recovery or rooting. We’re not responsible for any damage or data loss that happens to your device on following this procedure. Do this at your own risk.
Steps to Install TWRP recovery on OnePlus 5
Get ready with your PC or laptop, in which Minimal ADB and Fastboot is installed. Then follow the below steps.
- Make sure, Magisk flashable Zip file is safely stored to your phone memory in any suitable directory.
- Copy the TWRP file to the folder where ADB and Fastboot are installed.
- Turn off your OnePlus 5T.
- Boot your OnePlus 5T into Fastboot mode > Press and hold the Volume Up Button + Power Button.
- Connect your phone to your PC via USB Cable.
- Open a command window on the folder where ADB and Fastboot are installed.
- Go to the folder where ADB and Fastboot are installed.
- Hold down Shift Key > Right Click on the empty space > Choose ‘Open CMD Here’.
- Execute the below command in the command window to see if your device is properly connected:
Your device needs to be unlocked before it can flash custom images. To unlock your device, if not done via developer option; Input the following command on cmd prompt terminal.
fastboot oem unlock
- Make sure the TWRP file is in the ADB folder. Execute the below command to install TWRP on your OnePlus 5T:
fastboot flash recovery twrp-3.3.1-0-dumpling.img
- The Fastboot command will replace stock recovery with TWRP.
- Don’t restart your device once installation completes. Because rooting is yet to be done. Jump to the next step.
Disable DM-Verity and Force Encryption.
For the time being, just note that DM-Verity and Force-Encryption are the security precautions implemented by OnePlus as well as other OEM’s to prevent temperament or modification of System.
DM-Verity disabling is different depending on the current state of your device. i.e. whether encrypted or non-encrypted.
Currently Encrypted Devices
Procedure 1: This is applicable only to users who have their data currently ENCRYPTED and needs the zip just for NOT TRIGGERING DM-VERITY.
- Assuming you’re now in TWRP recovery mode, after the second steps.
- Mount the system in TWRP.
- Make sure you can browse and see the contents of the system folder via TWRP file manager – This is very important.
- Flash “DM-Verity and Force Encryption Disabler” in TWRP.
- Finally, Reboot to System.
Procedure: This is applicable only to users who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED
- Mount the system in TWRP. Make sure you can browse and see the contents of the system folder via TWRP file manager – This is very important.
- Flash “DM-Verity and Force Encryption Disabler” in TWRP.
- Reboot back to TWRP
- Reboot to System!
NB: The above Procedure should prevent force encryption in almost all cases but users have reported that the above steps failed to decrypt the device in some instances.
Root OnePlus 5T using Magisk
Finally, it’s time to root. Immediately after completing the above steps. Do the following.
- In Fastboot Mode, use the volume buttons and choose ‘Recovery Mode’ and then press the power button to enter TWRP Recovery.
- Once you are in TWRP > Tap on ‘Install’ > Choose Magisk file which you have downloaded > Swipe right to flash.
- Of course, you’ve now rooted your device.
- But again, don’t reboot the device.
- Since you’ve to disable the DM-Verity checksum and Force-Encryption to avoid boot loops.
- Proceed to the third step with immense patience.
Root OnePlus 5T Android 10 Beta
Official TWRP for Android 10 isn’t available yet. So in order to avoid failure and assure a successful root, we should use a patched Magisk image to root the OnePlus on Android Beta.
- Download the full OTA package of your currently running Android 10 Beta version.
- Use a file manager to extract boot.img from the zip file.
- Use Magisk Manager to patch the extracted boot.img.
- Copy the generated magisk_patched.img to a PC.
- Uninstall Magisk Manager completely, otherwise, the chance of getting into a boot loop is high.
- Enable “USB debugging” in Developer options.
- Connect the phone to pc using the USB cable.
- Restart the phone in Bootloader mode.
- Input the below command on pc and restart the phone using the patched image.
fastboot flash boot magisk_patched.img
- Reinstall Magisk Manager and install Magisk directly.
The above method will help you root your device without the need for a custom recovery. It’s pertinent to mention here that, the patched Magisk image method can be used for rooting your device even if it’s on Android Pie. All you’ve to do is to get the right firmware and create a Magisk patch. The rest of the steps are the same as given above.
Above in this article, we’ve tried our best to enlist each and every step needed for successfully rooting your OnePlus 5T. The above guide should yield the result if done properly. However, errors or failures shouldn’t be completely ignored.
Although root access has got its own merits and demerits, we’d recommend our readers to stick with the untampered firmware. Since the safety and satisfaction of the readers are our utmost priority.
Have any questions can ask us in the comments below.