OnePlus 5: Unlock Bootloader | Flash TWRP | Root | Nandroid & EFS Backup & More !!

Search This thread

néonaloj

Senior Member
Dec 29, 2014
953
457
@Funk Wizard, a bit out of topic, sorry, but because of all my attempts to decrypt my phone...
I finally gave up, after trying all and everything, and now that my phone is configured, I do have a problem with Titanium Backup : as I couldn't find the file on my PC, I tried to uninstall the app and re-install. Now I only have FCs. Here is the log : https://pastebin.com/mK0ZhA4X
Only if you've time, I do know you're so busy to help others ;)
Thanks!
 

dansou901

Recognized Contributor
Apr 10, 2012
3,120
1,209
30
Aachen
OnePlus Nord
@Funk Wizard, a bit out of topic, sorry, but because of all my attempts to decrypt my phone...
I finally gave up, after trying all and everything, and now that my phone is configured, I do have a problem with Titanium Backup : as I couldn't find the file on my PC, I tried to uninstall the app and re-install. Now I only have FCs. Here is the log : https://pastebin.com/mK0ZhA4X
Only if you've time, I do know you're so busy to help others ;)
Thanks!
What happens if you do a clean flash of Oxygen OS and install Titanium Backup from Play Store then? Worked at least for me...
 
  • Like
Reactions: néonaloj

TwinAdk

Senior Member
  • Mar 15, 2011
    955
    324
    OnePlus 6
    @Funk Wizard, a bit out of topic, sorry, but because of all my attempts to decrypt my phone...
    I finally gave up, after trying all and everything, and now that my phone is configured, I do have a problem with Titanium Backup : as I couldn't find the file on my PC, I tried to uninstall the app and re-install. Now I only have FCs. Here is the log : https://pastebin.com/mK0ZhA4X
    Only if you've time, I do know you're so busy to help others ;)
    Thanks!
    Take a look at Magisk, does it work as expected? The last thing happening is Magisk processing a root request..
     
    • Like
    Reactions: néonaloj

    Nomelas

    Senior Member
    Aug 21, 2014
    376
    136
    this guide is not clear on one part. Am I able to flash the dm-verity zip, get root and still stay encrypted? or do I have to give up encryption?

    also, will OTA overwrite recovery & do i need to reflash dm-verify zip each time I update??
     

    néonaloj

    Senior Member
    Dec 29, 2014
    953
    457
    What happens if you do a clean flash of Oxygen OS and install Titanium Backup from Play Store then? Worked at least for me...

    I didn't tried a clean flash yet, has to be done...

    Take a look at Magisk, does it work as expected? The last thing happening is Magisk processing a root request..

    I saw in the log that something was wrong with the su command. I tried uninstall Magisk, dirty flash of the rom + Supersu, with no luck, still FC of titanium
    .. But thank for your reply !
     
    Feb 25, 2017
    11
    6
    I'm thinking for when I get my OP5 in two days, I want to unlock the bootloader almost as soon as I get it to get that out of the way. I plan on flashing ROMs and getting TWRP later on, I just want to unlock the bootloader for now. Can I still get OTA incremental updates with an unlocked bootloader?
     

    tristaoeast

    Senior Member
    Jul 16, 2011
    135
    19
    Lisboa
    I'm thinking for when I get my OP5 in two days, I want to unlock the bootloader almost as soon as I get it to get that out of the way. I plan on flashing ROMs and getting TWRP later on, I just want to unlock the bootloader for now. Can I still get OTA incremental updates with an unlocked bootloader?

    Yes, that's what I'm doing, I only have the bootloader unlocked and am installing the OTAs as soon as they arrive
     

    onirikon

    New member
    Jan 1, 2015
    2
    0
    I'm thinking for when I get my OP5 in two days, I want to unlock the bootloader almost as soon as I get it to get that out of the way. I plan on flashing ROMs and getting TWRP later on, I just want to unlock the bootloader for now. Can I still get OTA incremental updates with an unlocked bootloader?

    Yes with unlocked and unrooted device you can continue to install directly OTA, is what I did, I'm waiting the first wave of updates to stabilize before rooting.

    Sent from my ONEPLUS A5000 using XDA Free mobile app
     

    Giansi

    Senior Member
    Feb 26, 2013
    543
    389
    Somewhere in the centre of Italy
    Thank you very much @Funk Wizard for this useful guide.

    I succesfully unlocked bootloader and installed TWRP.

    But I wasn't able to decrypt.

    I did exactly this:

    For Users who want to Decrypt Data have to Flash DM Verity Zip and Format Data

    1. Boot into TWRP Recovery and allow system modifications.
    2. Swipe right and enable modifications.
    3. Select your preferred Language, Tap “Never show this screen on boot again,” and Swipe allow modification.
    4. Download and transfer the latest no-verity-opt-encrypt zip to your device over MTP and flash it.
    (This will also allow you to use [Format Data] to completely disable your encryption if desired)

    Go to “Wipe” section and tap “Format Data”, and type “yes” (If you want to mount internal storage)

    Transfer Magisk Or SuperSU to the device over MTP to your Oneplus 5
    Swipe to confirm the flash
    Reboot System

    The latest DM verity zip to flash is the 5.1 correct?
    After reeboting to system, in setting > security the last option it says that my OP5 is still encrypted.
    Is that messagge wrong, and in the reality it's decrypted, or not?

    Thanks anyway
     

    néonaloj

    Senior Member
    Dec 29, 2014
    953
    457
    But I wasn't able to decrypt.

    I did exactly this:

    For Users who want to Decrypt Data have to Flash DM Verity Zip and Format Data



    The latest DM verity zip to flash is the 5.1 correct?
    After reeboting to system, in setting > security the last option it says that my OP5 is still encrypted.
    Is that messagge wrong, and in the reality it's decrypted, or not?

    Thanks anyway

    As far as I know, only a few people have succesfully decrypted the OP5 yet (@MartyMan for instance). I tried many ways (this guide, also "fastboot format userdata"), but with no luck...
    Thanks for trying, I think we have to find a workaround for that...
     
    • Like
    Reactions: Giansi

    xXx

    Senior Member
    Jun 14, 2008
    3,423
    18,232
    Munich
    forum.xda-developers.com
    Thank you very much @Funk Wizard for this useful guide.

    I succesfully unlocked bootloader and installed TWRP.

    But I wasn't able to decrypt.

    I did exactly this:

    For Users who want to Decrypt Data have to Flash DM Verity Zip and Format Data



    The latest DM verity zip to flash is the 5.1 correct?
    After reeboting to system, in setting > security the last option it says that my OP5 is still encrypted.
    Is that messagge wrong, and in the reality it's decrypted, or not?

    Thanks anyway
    As far as I know, only a few people have succesfully decrypted the OP5 yet (@MartyMan for instance). I tried many ways (this guide, also "fastboot format userdata"), but with no luck...
    Thanks for trying, I think we have to find a workaround for that...
    If you decrypt your device you will definetly not be able anymore to use Magisk root. Only SuperSu will work.

    Anyway, if this doesn't matter for you just flash the latest v5.1 no verity zip. After that you have Format your data partition. That's it but all your data as well as sdcard content will be deleted. So make sure you backup first.

    DON'T restore a backup of your encrypted data partition as rhis will destroy your decrypted setup.
     

    néonaloj

    Senior Member
    Dec 29, 2014
    953
    457
    Your welcome! ;) Btw you could try the same with OOS, in worst case it won't decrypt, you can try again

    Okay, let me know if it worked or not. Good luck! :fingers-crossed:

    Does not work. I get the no OS installed error then when booting the phone is still encrypted.

    What a hassle it is to decrypt this phone! This was so much easier on the op3. Why does the storage become unusable on op5? I just want stock + magisk + decrypted. Or at this point I would settle for encrypted! Does anyone know a surefire way of doing this?

    If you decrypt your device you will definetly not be able anymore to use Magisk root. Only SuperSu will work.

    Anyway, if this doesn't matter for you just flash the latest v5.1 no verity zip. After that you have Format your data partition. That's it but all your data as well as sdcard content will be deleted. So make sure you backup first.

    DON'T restore a backup of your encrypted data partition as rhis will destroy your decrypted setup.

    So I tried again (because of the following problem), and did not get the phone to be decrypted... I don't know why it's working for you guys, for me it does not.
    My data were lost, but the phone is still encrypted.

    @Funk Wizard, a bit out of topic, sorry, but because of all my attempts to decrypt my phone...
    I finally gave up, after trying all and everything, and now that my phone is configured, I do have a problem with Titanium Backup : as I couldn't find the file on my PC, I tried to uninstall the app and re-install. Now I only have FCs. Here is the log : https://pastebin.com/mK0ZhA4X
    Only if you've time, I do know you're so busy to help others ;)
    Thanks!

    So, to be more accurate, I couldn't find the folder of TB, only a file (see screenshot). So I tried to create the folder, with no luck, TB did not happen to have acces to it (I managed to write the right way!).
    So I tried to unistall/re-install as I said, with no luck.
    Today, before trying to decrypt the phone, I wanted to make a backup of my SMS. But the app "SMS Backup & Restore" refuses to open too!
    Here is a new log, when trying simultaneously the two apps, if someone could have a look, I would really appreciate! Thanks.

    https://pastebin.com/D1Y7ZZYB
     
    Last edited:

    xXx

    Senior Member
    Jun 14, 2008
    3,423
    18,232
    Munich
    forum.xda-developers.com
    Does not work. I get the no OS installed error then when booting the phone is still encrypted.

    What a hassle it is to decrypt this phone! This was so much easier on the op3. Why does the storage become unusable on op5? I just want stock + magisk + decrypted. Or at this point I would settle for encrypted! Does anyone know a surefire way of doing this?



    If you decrypt your device you will definetly not be able anymore to use Magisk root. Only SuperSu will work.

    Anyway, if this doesn't matter for you just flash the latest v5.1 no verity zip. After that you have Format your data partition. That's it but all your data as well as sdcard content will be deleted. So make sure you backup first.

    DON'T restore a backup of your encrypted data partition as rhis will destroy your decrypted setup.

    So I tried again (because of the following problem), and did not get the phone to be decrypted... I don't know why it's working for you guys, for me it does not.
    My data were lost, but the phone is still encrypted.



    So, to be more accurate, I couldn't find the folder of TB, only a file (see screenshot). So I tried to create the folder, with no luck, TB did not happen to have acces to it (I managed to write the right way!).
    So I tried to unistall/re-install as I said, with no luck.
    Today, before trying to decrypt the phone, I wanted to make a backup of my SMS. But the app "SMS Backup & Restore" refuses to open too!
    Here is a new log, if someone could have a look, I would really appreciate! Thanks.

    https://pastebin.com/D1Y7ZZYB
    you most probably experience a sdcard permission issue.
    https://forum.xda-developers.com/on...-optimized-t3627121/post72830365#post72830365
     

    néonaloj

    Senior Member
    Dec 29, 2014
    953
    457

    Thanks for your reply!

    But, when I read, I don't have the same issue! : "[...] File Save Error. Like In Chrome, Download Failed Saying "Missing SD Card", Cam Took Pics But They Vanished From Gallery, No Downloads From Play Store. It Was Like The Storage Has Been Converted To Read Only."

    Because I CAN download a file through Chrome, my pics are saved correctly, I CAN download apps from Playstore etc...
    Should I flash the fix anyway?
    Thanks again!

    Edit : did you look at the log?
     
    Last edited:

    xXx

    Senior Member
    Jun 14, 2008
    3,423
    18,232
    Munich
    forum.xda-developers.com
    Thanks for your reply!

    But, when I read, I don't have the same issue! : "[...] File Save Error. Like In Chrome, Download Failed Saying "Missing SD Card", Cam Took Pics But They Vanished From Gallery, No Downloads From Play Store. It Was Like The Storage Has Been Converted To Read Only."

    Because I CAN download a file through Chrome, my pics are saved correctly, I CAN download apps from Playstore etc...
    Should I flash the fix anyway?
    Thanks again!
    it doesn't hurt to flash the fix. Several users had issues with sdcard storage and fixed it with that.
    Try it and if still have the same issue and TitaniumBackup is really just a file on our sdcard you need to delete this otherwise Titanium can't create a folder with that name.
    Also make sure Titanium really got root access and check under settings>apps if Titanium got all necessary permissions assigned.
     
    • Like
    Reactions: néonaloj

    Top Liked Posts

    • There are no posts matching your filters.
    • 1
      Has anybody rooted the OP5 on Android 10 yet? I'd like to do it, but it didn't work since the 10 update.

      I have a problem : I followed the guide step by step but after flashing Magisk (22.1), swipe cache and restart the phone ... stuck on boot.

      I'm having trouble getting root to work as well. Bought a used OnePlus 5 (OxygenOS 10.0.1), followed the excellent instructions on this post to unlock the bootloader, install TWRP and Magisk (following the "for users who want to remain encrypted" instructions) but with Magisk installed it just never finishes booting. Have even let it run for a whole night but still didn't get past the startup animation of two white circles moving around a red circle.

      Then tried with the more recent Magisk versions, first 22.1, then 23 and that still failed, moved to a newer version of TWRP as well (twrp-3.5.2_9-0-cheeseburger_dumpling.img), sadly to no avail. I'm able to uninstall Magisk via TWRP by renaming the Magisk file to uninstall though, so have always been able to get back into Android, just without root.

      Then I factory-reset from within Android (which kept the bootloader unlocked) and this time installed Magisk following the official instructions, i.e. installed Magisk from within Android (via permitting Chrome-downloaded apks), downloaded the OnePlus 10.0.1 Stock ROM from the official site, unzipped it, found to my delight that the boot.img was directly contained (i.e. not needing payload_dumper.zip), and followed through with the steps as described there. Unfortunately, the subsequent reboot never finished either.

      I haven't seen instructions to wipe the cache here (at least when staying encrypted) and not in the Magisk instructions but in some places got the impression that's a common and potentially helpful thing to do, so I wiped the cache (from within the stock recovery), restarted the phone but it's still booting forever.

      So I had to give up again, uninstall Magisk via a "fastboot boot twrp-3.5.2_9-0-cheeseburger_dumpling.img" and then installing the Magisk 23 version renamed to uninstall. During the uninstall I got a warning message that there was no backup of the patched boot.img. It boots successfully though, but, of course, still without root.

      To be clear, I don't desperately need to root this stock rom, I intend to experiment with a de-googled LineageOS but just wanted to go through these motions and get some confidence and experience with the whole process and also wanted to perform the EFS backup that's suggested here before risking destroying that bit. Any advice much appreciated.
      1
      Same here. TWRP installs, stays, but after installing Magisk, it boots to fastboot. From there I can reboot with the recovery option to TWRP.

      Issue started when Viper wouldn't load the drivers. When removing one version of Viper, it did not actually remove. Then I had 2 when Magisk blew out. Nothing worked so for, manual removal and unSU and tried several different versions. It will boot with the old zip flash Magisk, but it doesn't actually root.
      1
      Magisk 20.4 is working for me. I just realized it had the options on the left side... when I tried it before, it did not show the options on the bottom so I figured it failed.

      Flashed
      twrp-3.5.2_9-0-cheeseburger_dumpling.img
      OxygenOS TWRP Retainer v1.2 (Signed).zip
      unSU (2019-03-10) (Signed).zip
      Magisk-v20.4(20400).zip

      Installed
      Magisk-22.1(22100).apk

      Not updating just yet.
    • 134
      OnePlus 5: Unlock Bootloader | Flash TWRP | Root | Nandroid & EFS Backup & More !!

      qz9h9NZ.jpg



      Q9IP5VP.png



      3RVsG8v.png


      Before you start, OTA up to the latest System Update available.
      Settings > System Updates > Download & Install the latest available
      82
      2a7O1JW.jpg


      Introduction​

      Rooting this device is actually quite a simple and easy process. Before you begin, it is recommended that you at least try to understand what each part of the process will do. Although this guide will elongate each step in order to show all of the details, the method used can be broken up into 3 main steps: ​

      Unlocking the Bootloader
      Installing a Custom Recovery
      Gaining Root Access


      Each new step relies on the previous step so please follow the entire process and a basic summary of each part is described as below:

      Unlocking Bootloader​
      Opens the door to the internal memory of the device to be written on to. This allows you to flash images onto the main partitions of the phone.​

      Installing a Custom Recovery​​
      A custom recovery is flashed onto the recovery partition of the device and overwrites the stock recovery that exists by default. Custom recoveries bring lots of functionality and give you the ability to perform wipes, install flashable zips, create full backups of your device (Nandroid backup), and various other features. An unlocked bootloader is needed to install a custom recovery.

      Gaining Root Access​​
      You can gain root by either flashing via recovery a pre-rooted custom rom, or flashing a zip containing the SuperSU binaries or by Flashing Magisk Zip for a system less root. A custom recovery is necessary to do this.

      After completing these steps your phone will be rooted, the phone will have a custom recovery installed and an unlocked bootloader. This, in my opinion, is the a practical and beneficial method for rooting your phone. It will give you some basic adb/fastboot knowledge, and should hopefully help you have a decent understanding of the entire process. This method will work regardless of any android version on the phone.

      If you are confused by anything in this guide, I highly suggest getting it clarified being before moving on. Ask your question in this thread and I or someone else will likely answer. Also we would suggest that you read over the whole thread a few times before actually doing anything to the phone.​
      78
      Gaining Root Access

      This is a continued post from the above post...


      For Users who want to remain Encrypted: :fingers-crossed:

      1. Boot into TWRP Recovery and allow system modifications.
      2. Swipe right and enable modifications.
      3. Select your preferred Language, Tap “Never show this screen on boot again,” and Swipe allow modification.
      4. Navigate to Install and select Magisk Or SuperSU to root OnePlus 5.
      5. Swipe to confirm the flash
      6. Reboot System

      Keep in mind that the first boot after wiping the phone may take longer than usual, as the phone will need to rebuild the dalvik cache and initialize other first boot and would reboot a few times due to SuperSU Flash.

      For Users who want to Decrypt Data have to Format Data & Flash No Verity OP5 Zip :fingers-crossed:

      1. Boot into TWRP Recovery and allow system modifications.
      2. Swipe right and enable modifications.
      3. Select your preferred Language, Tap “Never show this screen on boot again,” and Swipe allow modification.

      Go to “Wipe” section and tap “Format Data”, and type “yes” to mount internal storage

      4. Download & Transfer no_verity_op5.zip to the device over MTP from here Credits @snowwolf725
      5. Go to “Install” section, select no_verity_op5.zip, and swipe to confirm the flash
      6. Transfer latest Magisk/SuperSU to the device over MTP to your Oneplus 5 & Swipe to confirm the flash
      7. Reboot System

      * MTP, known as Media Transfer Protocol, is the same way you transfer files from your PC to your device when booted into system.

      Congrats! That is all! Your Device now has an unlocked bootloader, a custom recovery installed and is rooted along with your preference of staying encrypted or decrypted.

      Warning: Do not flash partial update OTAs (under 1 GB) on a modified device! If you want to use partial OTAs, you must first flash a full OTA that it applies to, and then flash the partial OTA from stock recovery. Flashing partial OTAs from TWRP will either fail or soft brick your device. You can return to a usable state by flashing full zips in recovery.

      Enjoy :fingers-crossed:
      69
      Setup, Preparation & Prerequisites​​
      Basic tasks that may be referred to throughout this guide:​
      Open Command Prompt: Press Shift + Right Click anywhere on the screen and select Open Command Window here

      Enter Fastboot/Bootloader Mode: Turn the phone off. Hold volume up + power until the "fastboot" screen appears. [Alternatively, if Advanced Reboot is enabled, you can press Reboot > Bootloader from the power menu.]

      Enter Recovery Mode: Turn the phone off. Hold volume down + power until the "OnePlus Logo" screen appears. [Alternatively, if Advanced Reboot is enabled, you can press Reboot -> Recovery from the power menu.]

      ADB and Fastboot Installation​
      1. Download the ADB For Windows from here Credits @Snoop05 his Original XDA Thread Here

      Or You can manually update Fastboot and ADB binaries here Credits @lj50036 his Original XDA Thread Here

      2. Run the .exe file downloaded from above as Administrator.
      3. Press 'Y' every time the installer asks for.
      4. Continue Driver Installation.

      Now, ADB and Fastboot have been installed on your PC and should be Working as desired.

      Things To Remember​
      Show File Extensions :good:
      Open a command prompt window and run "Control folders" (without the quotes). Go to the View tab and uncheck the "Hide extensions for known file types" option. This will help avoid confusion when renaming files.

      Battery :good:
      Ensure that your phone has at least 60% battery remaining, and that your PC is plugged in and wont shut down spontaneously during the process. The procedure doesn't take very long , but its best to have enough charge in case something goes wrong.

      Backup (Optional) :good:
      Unlocking the bootloader will/should completely wipe all data from the device. This includes apps, settings and even the contents of the internal sdcard (pictures, music, etc.). Copy all important files off the phone onto a PC or upload them to a cloud.

      USB Debugging :good:
      On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging

      Enable OEM Unlocking :good:
      On your phone go to Settings > Developer options. Then enable the 'OEM Unlocking' option. Also make sure that from now on, OEM unlocking option is enabled before you reboot as sometimes, it might get disabled itself.

      Enable Advanced Reboot :good:
      On your phone go to Settings > Developer options. Then enable the 'Advanced Reboot' option.
      69
      Unlocking Bootloader


      Turn the phone off. Then boot it into fastboot mode by holding volume up + power or select reboot to bootloader if advanced reboot is activated via developer options. The phone will display "fastboot" text indicating that it has successfully entered fastboot mode.

      Plug the phone into your PC, then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here) and type:

      Code:
      fastboot devices

      This command will list the connected devices. If your phones serial number shows up you are good to go and may continue. If the phone is NOT listed this indicates that your drivers are not installed correctly. In order for you to continue you must fix your drivers so that your phone is listed under fastboot devices.

      If the phone has been recognized by the command above, proceed to unlocking the bootloader with the following command:

      Remember this Step will WIPE EVERYTHING off the phone so Backup all your Data

      Code:
      fastboot oem unlock

      x6hqaHU.jpg


      You would be greeted with a Unlock Bootloader Warning page, Hit the Vol button to select Yes and turn it Blue and Hit the Power Button to Execute the selection

      R9phbUg.jpg


      Your device will reboot, show you a Secure boot warning, reboot into stock recovery and wipe all data. Once done, your phone will reboot into the OS.

      Please continue and follow the next post to install Custom Recovery