[Easiest Method] Tutorial to Unlock Bootloader | Install Twrp | Root | Decrypt Data

Search This thread

HatRiGt

Senior Member
May 28, 2013
976
605
Chennai
Hi All :cool: ,

Steps To Unlock Bootloader
1. At First, open About phone on setting menu , then tap 4 times on Build Number. Now Developer Mode is enabled.
2. Open developer Mode menu and set oem unlock and usb debugging to ON. [Important Step]
3. Download and Extract the zip file which you have downloaded from the link given below.
4. Now enter into fastboot mode :

Press volume + power button and then phone will boot into fastboot interface.

5. Now connect the phone to computer and then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:

Code:
 fastboot devices

The list of devices connected will be displayed.
Then enter the command :
Code:
fastboot oem unlock
6. Now you will see a Unlock Bootloader Warning page. Hit the Vol button to select Yes and turn it Blue and Hit Power Button to confirm the selection.
7. Thats it . Now your Bootloader is unlocked.

Steps To Install TWRP Recovery
1. After you have successfully unlocked the bootloader, now enter into the fastboot mode and connect the phone to pc.
2. Now navigate to the folder where you have extracted the downloaded zip file and open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
Code:
 fastboot devices
3. The list of devices connected will be displayed.
4. Then enter the command :
Code:
fastboot flash recovery twrp-3.1.1-0-oneplus5.img
or
Code:
fastboot flash recovery (name of the twrp file).img
5. When the file is flashed successfully , unplug your phone from pc and manually boot the phone into recovery by pressing Power + Volume Down button.
6. Now the TWRP Recovery will be opened .

For the Users who face Max download error while flashing Twrp, Kindly check the post here

Steps To Disable Forced Encryption i.e, Decrypt Data
1. At first time when you open twrp, it will ask you to allow system modification.
2. Allow it and then flash the no-verity-opt-encrypt.zip file .
3. Then Go to Wipe-->Format Data.
4. Type Yes to confirm wiping of Internal Storage.
5. Now you have decrypted the data sucessfully.
Note: Dont try to restore the nanodroid backup which you have taken before. It may end in bootloop.

Steps To Root Your Phone
1. Download the SuperSu SR1 flashable zip from here and copy that zip file into internal storage.
2. Now Enter into the TWRP Recovery.
3. Now navigate to the downloaded SuperSu Zip file and Swipe to install SuperSu.
4. Reboot your device.
5. Now your device is rooted successfully. :D :fingers-crossed:

Steps To Backup IMEI [Important]:
For some cases you may lead to lose your device's Imei. It will lead to loose of network signals etc.
So we have to take backup of Imei and we can restore it on any such case. ;)
There are two method to backup imei.
Method 1 :
Boot the phone to Twrp , take Backup of EFS partition to internal storage and copy the backup files to PC . In case , if you have lost your IMEI, this backup will help you to restore imei back.

Method 2 :
1. This method works on the Terminal window. So download any Terminal App .
2. Open the app and type su , then grant SuperUser permission when you are prompted to do so.
When you see the Terminal Emulator box, type the following command:
Code:
dd if=/dev/block/sdf1 of=/sdcard/modemst1.bin bs=512
Code:
dd if=/dev/block/sdf1 of=/sdcard/modemst2.bin bs=512

Please note that all commands are case sensitive and even a minor mistake will hider the successful backup. Type the command line carefully.
Now you have successfully took backup of imei to you internal storage . Copy that to your pc . :)
To Restore
Enter the following commands in Terminal Emulator Box:
Code:
dd if=/sdcard/modemst1.bin of=/dev/block/sdf1 bs=512
Code:
dd if=/sdcard/modemst2.bin of=/dev/block/sdf1 bs=512

Thats it your imei is restored :) :fingers-crossed:

Download Section
For TWRP recovery and other files Download Here :D
If u need Only twrp, Den click here
1. twrp-3.1.1-1-cheeseburger.img[official]
2. twrp-3.1.1-0-oneplus5.img [chinese]
3. Twrp latest by xdvs23
 
Last edited:

matssa

Senior Member
Jan 8, 2015
1,817
1,898
Hi All,

Steps To Unlock Bootloader
1. At First, open About phone on setting menu , then tap 4 times on Build Number. Now Developer Mode is enabled.
2. Open developer Mode menu and set oem unlock and usb debugging to ON. [Important Step]
3. Download and Extract the zip file which you have downloaded from the link given below.
4. Now enter into fastboot mode :
Press volume + power button and then phone will boot into fastboot interface.
5. Now connect the phone to computer and then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
The list of devices connected will be displayed.
Then enter the command :
6. Now you will see a Unlock Bootloader Warning page. Hit the Vol button to select Yes and turn it Blue and Hit Power Button to confirm the selection.
7. Thats it . Now your Bootloader is unlocked.

Steps To Install TWRP Recovery
1. After you have successfully unlocked the bootloader, now enter into the fastboot mode and connect the phone to pc.
2. Now navigate to the folder where you have extracted the downloaded zip file and open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:

3. The list of devices connected will be displayed.
4. Then enter the command :

5. When the file is flashed successfully , unplug your phone from pc and manually boot the phone into recovery by pressing Power + Volume Down button.
6. Now the TWRP Recovery will be opened .

Steps To Root Your Phone
1. Download the SuperSu flashable zip from here and copy that zip file into internal storage.
2. Now Enter into the TWRP Recovery.
3. Now navigate to the downloaded SuperSu Zip file and Swipe to install SuperSu.
4. Reboot your device.
5. Now your device is rooted successfully.

Download Section
Download the required zip file from Here


Credits : Thanks to chinese Dev for Twrp

Hey,

Thanks for the guide. However, where does the TWRP comme from? I'm a bit afraid of this, truth to be told ^^'
 
  • Like
Reactions: [email protected]

matssa

Senior Member
Jan 8, 2015
1,817
1,898
source link added . check bro.

Erm, "Chinese dev" doesn't mean anything really. Don't you have a thread link, a github link, or anything in particular? It's almost like saying "Here an app", without really saying where it comes from. Kinda risky... Especially if it isn't the "Chinese dev" that shares it.

EDIT/// NVM, just was the source link... Sorry for that, was refreshing the wrong one...
 
Last edited:

HatRiGt

Senior Member
May 28, 2013
976
605
Chennai
Erm, "Chinese dev" doesn't mean anything really. Don't you have a thread link, a github link, or anything in particular? It's almost like saying "Here an app", without really saying where it comes from. Kinda risky... Especially if it isn't the "Chinese dev" that shares it.

kindly check the source link i.e, thread link
-----
Tested by me. Works fine.
 
Last edited:

Kyrluckechuck

Member
May 17, 2017
30
15
OnePlus 6
OnePlus 9 Pro
Yeah just edited my comment, wasn't looking at the correct page... Gonna take a look, might wait a bit before testing.

I'm in the same boat, I like that it's done but the fact it isn't open-sourced and is provided by a sketchy Chinese version of a fake Oneplus site (take a look at the lack of SSL for example), I think I may hold off..

Thanks for sharing though OP, hope this might spark what we need to get the official version!
 

matssa

Senior Member
Jan 8, 2015
1,817
1,898
I went to the source OP provided. It's 30 pages of people saying thanks...so I bit the bullet (after unlocking bootloader).

It works. Just flashed Magisk 13 beta using TWRP provided by OP.

SafetyNet passes with Magisk Hide. Cheers!

it work for me, thanks

How did you make this work? Tried flashing in fastboot using
fastboot flash recovery twrp.....
However, doesn't work, still on OP recovery

EDIT/// Apparently worked :) Can't wait for a more open and official one ;)
 

bretzelpopo

Senior Member
May 24, 2010
140
19
did you restore your backup, after reboot . If yes, just uncheck boot when you restore and you dont need to format anything when flash recovery or kernel because these thing boot before system . For me twrp work good for me, the only thing is that i have flash supersu and when i want to switch to magisk, i delete all root on supersu app, and then impossible to boot on twrp, even after flash it with bootloader . The trick is to flash stock recovery from folder and then flash twrp .
 
  • Like
Reactions: sontjer

Top Liked Posts

  • There are no posts matching your filters.
  • 38
    Hi All :cool: ,

    Steps To Unlock Bootloader
    1. At First, open About phone on setting menu , then tap 4 times on Build Number. Now Developer Mode is enabled.
    2. Open developer Mode menu and set oem unlock and usb debugging to ON. [Important Step]
    3. Download and Extract the zip file which you have downloaded from the link given below.
    4. Now enter into fastboot mode :

    Press volume + power button and then phone will boot into fastboot interface.

    5. Now connect the phone to computer and then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
    Now type:

    Code:
     fastboot devices

    The list of devices connected will be displayed.
    Then enter the command :
    Code:
    fastboot oem unlock
    6. Now you will see a Unlock Bootloader Warning page. Hit the Vol button to select Yes and turn it Blue and Hit Power Button to confirm the selection.
    7. Thats it . Now your Bootloader is unlocked.

    Steps To Install TWRP Recovery
    1. After you have successfully unlocked the bootloader, now enter into the fastboot mode and connect the phone to pc.
    2. Now navigate to the folder where you have extracted the downloaded zip file and open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
    Now type:
    Code:
     fastboot devices
    3. The list of devices connected will be displayed.
    4. Then enter the command :
    Code:
    fastboot flash recovery twrp-3.1.1-0-oneplus5.img
    or
    Code:
    fastboot flash recovery (name of the twrp file).img
    5. When the file is flashed successfully , unplug your phone from pc and manually boot the phone into recovery by pressing Power + Volume Down button.
    6. Now the TWRP Recovery will be opened .

    For the Users who face Max download error while flashing Twrp, Kindly check the post here

    Steps To Disable Forced Encryption i.e, Decrypt Data
    1. At first time when you open twrp, it will ask you to allow system modification.
    2. Allow it and then flash the no-verity-opt-encrypt.zip file .
    3. Then Go to Wipe-->Format Data.
    4. Type Yes to confirm wiping of Internal Storage.
    5. Now you have decrypted the data sucessfully.
    Note: Dont try to restore the nanodroid backup which you have taken before. It may end in bootloop.

    Steps To Root Your Phone
    1. Download the SuperSu SR1 flashable zip from here and copy that zip file into internal storage.
    2. Now Enter into the TWRP Recovery.
    3. Now navigate to the downloaded SuperSu Zip file and Swipe to install SuperSu.
    4. Reboot your device.
    5. Now your device is rooted successfully. :D :fingers-crossed:

    Steps To Backup IMEI [Important]:
    For some cases you may lead to lose your device's Imei. It will lead to loose of network signals etc.
    So we have to take backup of Imei and we can restore it on any such case. ;)
    There are two method to backup imei.
    Method 1 :
    Boot the phone to Twrp , take Backup of EFS partition to internal storage and copy the backup files to PC . In case , if you have lost your IMEI, this backup will help you to restore imei back.

    Method 2 :
    1. This method works on the Terminal window. So download any Terminal App .
    2. Open the app and type su , then grant SuperUser permission when you are prompted to do so.
    When you see the Terminal Emulator box, type the following command:
    Code:
    dd if=/dev/block/sdf1 of=/sdcard/modemst1.bin bs=512
    Code:
    dd if=/dev/block/sdf1 of=/sdcard/modemst2.bin bs=512

    Please note that all commands are case sensitive and even a minor mistake will hider the successful backup. Type the command line carefully.
    Now you have successfully took backup of imei to you internal storage . Copy that to your pc . :)
    To Restore
    Enter the following commands in Terminal Emulator Box:
    Code:
    dd if=/sdcard/modemst1.bin of=/dev/block/sdf1 bs=512
    Code:
    dd if=/sdcard/modemst2.bin of=/dev/block/sdf1 bs=512

    Thats it your imei is restored :) :fingers-crossed:

    Download Section
    For TWRP recovery and other files Download Here :D
    If u need Only twrp, Den click here
    1. twrp-3.1.1-1-cheeseburger.img[official]
    2. twrp-3.1.1-0-oneplus5.img [chinese]
    3. Twrp latest by xdvs23
    5
    I went to the source OP provided. It's 30 pages of people saying thanks...so I bit the bullet (after unlocking bootloader).

    It works. Just flashed Magisk 13 beta using TWRP provided by OP.

    SafetyNet passes with Magisk Hide. Cheers!
    3
    Where we can find "entire ROM"?
    https://forum.xda-developers.com/oneplus-5/how-to/oneplus-5-mirrors-official-oxygen-os-t3628190
    ´re welcome ;)

    ---------- Post added at 10:13 PM ---------- Previous post was at 10:10 PM ----------

    That it? Seems like opening much more vulnerability by decrypting but I'm not entirely sure what data is being decrypted.
    think this is the only way to make TWRP working, at least concerning restore data. Also, while encrypting, I was not able to flash custom roms - always confronted with bootloops. After decrypting data, no problems anymore. Only magisk doesn't´t work now..

    ---------- Post added at 10:17 PM ---------- Previous post was at 10:13 PM ----------

    [/COLOR @xXx brings it to the point:
    guys, being new to the OP5 its more important than ever to read through several threads before starting to root and flash custom stuff. But let's start to get back to normal.

    Currently we have several issues you need to be aware to find your way around.

    First, TWRP is available and basically working but be prepared that you can't restore your data backup yet. xdvs23 is working hard to find a solution for this. Obviously the is a new encryption method in OP5 which needs to be handled differently than on other devices before.
    Also, when your device is encrypted (default) and you defined a password to enter android, this password is also required now at each TWRP start. A bit annoying but I got used to.

    Second, you could decrypt your device but this can't be handled by aby version of Magisk yet. So if you are decrypted and flash Magisk you will not even reach the boot animation but straight sent back to TWRP which is running around in circles then. Could be solved by entering Fastboot and delete and format userdata.

    Third, for some reason after you recovered for some reason you might experience sdcard access issues. In this case download the following flashable sdcard fix by osm0sis flash it and then try again.
    https://forum.xda-developers.com/on...-optimized-t3627121/post72830365#post72830365

    I also tried to run decrypted using SuperSu and in the first place everything seemed to be fine but then I came to some apps which didn't start through. Just keep hanging. I suppose these are apps which was looking for some kind of security in place.

    My personal preference right now is to stay encrypted. This means Magisk is working and all apps which didn't start on my decrypted device as well.
    The only issue which are currently left for me is that I need to enter the password every time I start TWRP which is no big deal for me and that I can't restore with TWRP. But at least backups are OK and I can restore my apps from this Nandroid backup using Titanium backup after a clean install.

    So for all of you who can't get back and forth anymore. Just boot in Fastboot mode and format user data which will also bring you back to an encrypted device but erase all sdcard data as well. So be sure you backup that before doing the following.

    fastboot erase userdata
    fastboot format userdata

    if you want to flash the latest recovery again

    fastboot flash recovery yourrecoveryfilename.img

    Now boot into TWRP. Wipe system, cache and data and flash the sdcard fix.

    Now you are ready to flash xXx NoLimits again with either SuperSu or Magisk selected.

    If your device is working again, welcome back to the fastest device user experience I ever experienced on any Android device.

    So any "thanks" belong to @xXx
    2
    Hi all! First off, great guide! Thanks :)

    To those of you suffering from the Max Download size issue, this is from the adb.exe not being large address aware.
    I have NO clue as to WHY this actually happens on some adb installs, but i does. And this fixes it.

    First, download this zip, run the executable, and then follow the guide here.
    Remember to 'adb kill-server' before doing this.

    1) Open adb.exe to modify (click on the "..." button to browse). Alternatively, you can drag and drop a file on the gray text box.
    2) Check or uncheck the box specifying whether or not you want to make it large address aware.
    3) Click on save to commit the changes.

    Donski! Now try flashing again :)
    I hope this helps!
    2


    If I had OnePlus 5 I would have resolved the problem inside the twrp, but no device is impossible for me. A complete recovery will soon be released.
    The recovery-from-boot.p is the file that restore stock recovery when you reboot your phone (It is in all android firmware)