OnePlus 5TOnePlus 5T

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.

Pre-requisites

  • 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.

Downloads

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.

  1. Make sure, Magisk flashable Zip file is safely stored to your phone memory in any suitable directory.
  2. Copy the TWRP file to the folder where ADB and Fastboot are installed.
  3. Turn off your OnePlus 5T.
  4. Boot your OnePlus 5T into Fastboot mode > Press and hold the Volume Up Button + Power Button.
  5. Connect your phone to your PC via USB Cable.
  6. Open a command window on the folder where ADB and Fastboot are installed.
    1. Go to the folder where ADB and Fastboot are installed.
    2. Hold down Shift Key > Right Click on the empty space > Choose ‘Open CMD Here’.
  7. Execute the below command in the command window to see if your device is properly connected:
    fastboot devices
  8. 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
  9. 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
  10. The Fastboot command will replace stock recovery with TWRP.
  11. 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.

  1. Assuming you’re now in TWRP recovery mode, after the second steps.
  2. Mount the system in TWRP.
  3. Make sure you can browse and see the contents of the system folder via TWRP file manager – This is very important.
  4. Flash “DM-Verity and Force Encryption Disabler” in TWRP.
  5. Done!
  6. Finally, Reboot to System.
Non-Encrypted Devices

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
  • Done.
  • 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.

  1. In Fastboot Mode, use the volume buttons and choose ‘Recovery Mode’ and then press the power button to enter TWRP Recovery.
  2. Once you are in TWRP > Tap on ‘Install’ > Choose Magisk file which you have downloaded > Swipe right to flash.
  3. Of course, you’ve now rooted your device.
  4. But again, don’t reboot the device.
  5. Since you’ve to disable the DM-Verity checksum and Force-Encryption to avoid boot loops.
  6. 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.

  1. Download the full OTA package of your currently running Android 10 Beta version.
  2. Use a file manager to extract boot.img from the zip file.
  3. Use Magisk Manager to patch the extracted boot.img.
  4. Copy the generated magisk_patched.img to a PC.
  5. Uninstall Magisk Manager completely, otherwise, the chance of getting into a  boot loop is high.
  6. Enable “USB debugging” in Developer options.
  7. Connect the phone to pc using the USB cable.
  8. Restart the phone in Bootloader mode.
  9. 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.
  • Done!

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.

Conclusion

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.

Related: Best Custom ROMs for OnePlus 5
Ijaz

By Ijaz

Decode my name to decode my norm.