Install TWRP and Root OnePlus 5 on Android Oreo (OxygenOS 5.0+)

Root OnePlus 5 on Android 8.0 Oreo

If you have updated to OxygenOS 5.0, then follow this tutorial on how to install TWRP recovery and root OnePlus 5 on Android Oreo 8.0 and 8.1.

OnePlus devices have gained a lot of recognition this year due to its powerful hardware specs and excellent software support. There’s no doubt that the devices while offering a near-AOSP experience can also be customized easily, similar to the Google Pixel and Nexus lineup.

If you have updated your 2017 OnePlus flagships to OxygenOS 5.0 or above and want to root the device on Android Oreo, then we have got you covered. Rooting the latest Android version requires you to use a modified version of the TWRP, as well as latest Magisk/SuperSU root package.

The OEM recently announced OxygenOS update for the OnePlus 5, which is based on Android 8.1 Oreo. Well, the latest software just isn’t enough for everybody. We all love some extra goodies and features to make the overall experience better. If that’s the case, then ‘Rooting’ is the solution. Here in this guide, we will guide you on how to root OnePlus 5 on Android Oreo 8.0 and 8.1.

Recommended: Install TWRP and Root OnePlus 5/5T on Android Pie (OxygenOS 9.0+)

Table of Contents

Install TWRP Recovery and Root OnePlus 5 on Android Oreo 8.0 and 8.1

Root OnePlus 5 on Android Oreo 8.0 and 8.1

You might ask how this method different than the regular one. Well, the answer is “Android Oreo” itself. The new version of Android brought several changes in the code, that wouldn’t allow the regular TWRP to play along, especially on the OnePlus 5. Also, not every version of SuperSU or Magisk works correctly to root OnePlus 5 on OxygenOS 5.0 and above.

Thankfully, the popular custom kernel developer – eng.stk and XDA recognized developer codeworkx have provided customized TWRP recovery for the device. We appreciate both their works regarding the matter. We have gathered all the files, including the specific versions of SuperSU and Magisk to help you root OnePlus 5 on Android Oreo (8.0 and 8.1).

Prerequisites

Downloads

Note: If Blu_spark TWRP doesn’t work, kindly use codeworkx TWRP linked below.

Install blu_spark TWRP Recovery on OnePlus 5

The first step to root OnePlus 5 on Android Oreo is to flash the compatible TWRP recovery on the device.

  1. Boot your OnePlus 5 into Fastboot mode:
    • Power down the device completely.
    • Press and hold the Volume Up and Power button simultaneously to enter Fastboot mode.
  2. Connect your device to the PC via the USB cable.
  3. Download the “twrp-3.2.1-x_blu_spark_v8.61-op5_op5t.img” file from the links above.
  4. Copy the downloaded file to C:\adb, where all the ADB and Fastboot files are present.
  5. Hold the SHIFT key on the keyboard and right-click on any empty space inside this folder.
  6. Select ‘Open PowerShell window here’ option from the menu.
    Root OnePlus 5 on Android Oreo (8.0 and 8.1) - Open PowerShell window here
  7. Execute the following command to install TWRP recovery on OnePlus 5 running OxygenOS 5.0.
    fastboot flash recovery twrp-3.2.1-x_blu_spark_v8.61-op5_op5t.img
  8. Once installed, you can disconnect the device and reboot it. The procedure goes further to root OnePlus 5 on Android Oreo.

Root OnePlus 5 on Android Oreo using Magisk or SuperSU

  1. Download latest Magisk or SuperSU flashable zip from the links above.
  2. Connect your device to the PC and transfer the Magisk or SuperSU zip to the internal storage of the device.
  3. Disconnect the phone from the PC and power it off completely.
  4. Press and hold the Volume Down and Power button simultaneously to enter TWRP recovery mode.
  5. In TWRP, tap on the ‘Install’ button.
    Root OnePlus 5 on Android Oreo using Magisk
  6. Navigate to the location where you transferred the file and select it.
  7. Swipe the button on the screen to flash Magisk/SuperSU and root OnePlus 5 on Android Oreo 8.0 and 8.1.
  8. Once the flashing process is complete, press the ‘Reboot System’ button.

Your OnePlus 5 should boot and would be running rooted OxygenOS 5.0. You can go ahead and use root-enabled apps and mods like ViPER4Android. If you have rooted the device using Magisk, you can install from a long list of modules to enjoy additional features on your OnePlus device.

So we have just guided you on how to root OnePlus 5 on Android Oreo. If you have any questions regarding the process, leave a comment below.

Comments

  1. Hey Dhananjay, I already have TWRP universal installed with Magisk 16 but unable to install the recent update of 5.1.1. I’m currently on 5.0.4. I’m trying to dirty flash new full update file but getting error code while trying to do so via TWRP. Just curious, should I change to bluespark and try if that’s gonna give me success. Thanks.

    1. Hi Sanjay. Instead of the universal version of the codeworkx recovery, kindly use the specific build provided above (dated: 20180414). And if even that doesn’t work, then opt for BluSpark. I am quite sure though that Codeworkx should work, cause I myself used it to update my OP5 recently.

    1. Sure, Jimmy. Please let me know the results so that I can add/remove related information in the article as well.

  2. Hello, does magisk 16.0 cause the boot loop issue? or should i stick to the 15.2 since that seems to work. Debating on which i should use when i root my op5 running OOS 5.0.4

    1. Hi Jimmy, for me 16.3 worked fine. Over at XDA, I have seen people preferring 15.3 as well. So it’s up to you.

      Or what you can do is flash 15.3 and then update to 16.3 using the Magisk Manager app afterward.

  3. My bootloader is unlocked..can I still perform a dirty flash following above steps??
    Will it go into a bootloop?
    Pls help

    1. No, there won’t be a problem. After flashing the full ROM, also flash this file, and then Magisk for root. You should be fine.

  4. Hi.. I’m running nougat on my OnePlus 5.. It is rooted with normal twrp and magisk..
    Please instruct me on how to install the complete Oreo zip file and still retain root. (I would like to do a dirty flash if possible)

    1. Hi Gautam. You may first flash codeworkx TWRP from above.

      Once that is done, there are three files that you will need.
      1) OOS Oreo full ROM ZIP
      2) no-verity disabler: Link
      3) Latest Magisk ZIP

      Copy them all to the storage and flash them in the provided order. I recently did the same for OOS 5.0.4 on my OnePlus 5.

    2. Thank you for instructing me..
      Can u pls tell me what is this no Verity thing and will it affect the device after some time??

  5. Do you have a recovery to flash OOS 5.0.2 on the OP5? Because when i flash the OOS 5.0.2 I get the Errorcode 7.

    Best regards Topfi

    1. Hello, kindly use the “twrp-3.2.1-0-universal-codeworkx-cheeseburger.img” linked in Downloads above.

  6. gracias si me ha funcionado, con esta version de twrp:twrp-3.2.1-x_blu_spark_v8.61-op5_op5t.img con este si mi permitio intalar magisk

    1. I am glad to know it worked for you. Good look for further customization.

  7. Bonjour,
    J’ai un OP5 black midnight.
    J’ai correctement flashé la ROM France officielle 5.0.1, donc en OREO,
    (OnePlus5Oxygen_23_OTA_028_all_1801031502_109fde3709984ec8.zip).
    Avant de rooter, cette ROM fonctionne correctement; en particulier, le hotspot wifi est fonctionnel, à la fois
    avec mon ordinateur et également avec mon autre smartphone.
    Cependant après avoir installé le bon recovery (twrp-3.2.1-x_blu_spark_v8.61-op5_op5t.img),
    et rooté avec Magisk-v15.3.zip, la fonction Hotspot wifi de mon OP5 n’est plus opérationnelle
    (ni sur mon ordi ni avec mon second smartphone).

    Quelqu’un a une idée de ce bug ?

    Best regards.
    J. P.

    1. Hello, I have visited the forums and scanned if this is a major issue or not. Well, it’s not. I would advise you to enter TWRP recovery, go to the Wipe menu and wipe off the cache and dalvik. Let me know how that goes.

  8. Hello,
    I successfully flashed twrp using codeworkx. I was wondering if it is safe to just flash magisk 15.2 or will I run into bootloop again? I already have oxygen os 5.0 oreo on my oneplus 5.

    1. Hi Andy, I recently flashed 15.2 on my OP5 and updated to 15.3 directly from the Magisk Manager. Didn’t face any problems so far. So as per my own experience, it should be just fine.

    1. and if I try to do adb push it tells me “adb: error: connect failed: closed” I think it is for USB debugging not active (I can not activate it if I can not turn on the phone)

    2. Kindly get in touch with me at my personal mail address. You can find the link in the author profile box just above the comments section.

    1. when I download the twrp with adb it tells me that everything is fine, but when I go in recovery mode the twrp is not there

    2. I am glad it worked. I will now update this article with the required TWRP build.

    3. excuse me, I was downloading the root for oneplus 5 oxygenOS 5.0.1, but the phone does not turn on any more, then I go into the twrp to do a hard reset, turn on the phone and after 11 minutes it remains in the power on screen (the one where the symbol of oneplus white) I would like to flash a rom, but I do not have the usb debug active and I can not activate it! can you help me? Thanks in advance

    4. Of course. I believe that’s an error on our part. Both, Magisk 15.0 and 15.1 have had issues with certain devices using dtb. To fix the specific issue Magisk 15.2 was released. I have updated the link, you can download and try flashing it through TWRP. I would recommend that you perform the whole drill again:

      1) Flash OxygenOS (Whichever version you had)
      2) Flash Codeworkx TWRP
      3) Install Magisk 15.2 using TWRP

    5. I already tried to flash the oxygenOS, but it says unknown partition ‘OnePlus5Oxygen_23_OTA_019_all_1710311604_e278653ff79644a5.zip’
      error: can not determine image filename for ‘OnePlus5Oxygen_23_OTA_019_all_1710311604_e278653ff79644a5.zip’
      so I do not know what to do!

    6. Okay. I got it. You are trying to flash the OTA update and not the full ROM zip. Kindly flash the Full ROM zip.

    7. I was trying to download the third open beta of 8.0 that I found on the official site, not good?

  9. Does this method allow you to access your internal storage in twrp , because when i followed a similar procedure , it led to internal storage becoming 0mb and i could not access files in my storage in twrp.

    1. Which TWRP are you using? OnePlus 5 on Oreo requires a special TWRP build, which is available through the links above.

    2. earlier was using a different one, using this one bricked my device after flashing

    1. Hello, I have personally tried it on my OnePlus 5. It works flawlessly. What I can analyze is that some problems were discovered in Magisk 15.0. Kindly elaborate your situation more, like what steps it went ok, and what’s the exact condition now.

      I have also updated the link to Magisk. You can now download the zip and try that.

Leave a Reply

Your email address will not be published. Required fields are marked *