install twrp on oneplus 5 root

Obviously, OnePlus 5/5T users are now on cloud nine. OnePlus had released the latest Android 10, although beta, to these nearly three years old devices. It’s only a matter of days for the firmware to become stable and OnePlus software support is commendable indeed.

install twrp on oneplus 5 root

Despite having the latest major update, the limited customization options on OxygenOS should push a lot of users to the root side. We know it, so we’re giving you a step-by-step guide on how to root your beloved OnePlus 5.

Install TWRP on OnePlus 5 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

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 5.
  4. Boot your OnePlus 5 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 5:
    fastboot flash recovery twrp-3.3.1-0-cheeseburger.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 5 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 5 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!

Conclusion

Above in this article, we’ve tried our best to enlist each and every step needed for successfully rooting your OnePlus 5. 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: How to Unlock Bootloader of OnePlus 5 easily

 

Ijaz

By Ijaz

Decode my name to decode my norm.