{Guide} Return your OP3T to stock and lock Bootloader using ADB/Fastboot

Search This thread

the_rooter

Senior Member
Aug 3, 2014
2,075
525
Olean
Disclaimer: I have done these steps multiple times and haven't come across any issues, but before you continue please read this fully, and follow the steps completely. Any issues or damage to your phone that occurs while doing this I am not responsible.​

That being said below will be everything you need to make sure this all goes smoothly:

  1. Windows or Linux Laptop/PC
  2. Atleast 50% battery on OP3T
  3. Usb Cable for OP3T
  4. Internet Access
  5. Patience :)

Now to Begin the process to return to stock:

Step 1: Go to http://downloads.oneplus.net/devices/oneplus-3t/ , and download the 4.0.2 version. Again these are the steps I do so that I can make sure the process is done correctly and also that I can get rid of the annoying dm-verity warning. Don't worry at the end of this you will have the latest version for you're device.

Step 2: Go to your phone and reboot to twrp, once in twrp go to wipe>Advance Wipe> Tick everything but usb otg (I do this to make sure my phone starts out in a completely clean state>then swipe to wipe. Once it's finished press back twice to get back to the main screen for twrp.

Step 3: Please reboot device back to twrp. (I found the best way to do this without issues is on the main screen for twrp go to reboot>power off>when the unlocked bootloader warning comes on click the volume up button quickly>use the volume down button when another menu comes on and go to recovery. Again I did it this way because the with twrp version 3.0.4-1 gave me issues when trying to reboot twrp within twrp. Also you will get an No OS installed this is normal as you wiped the system completely. Don't worry just reboot back to twrp.)

Step 4: Once back to twrp you will get the screen where is says to allow modification. Please swipe to allow. Next please connect phone to pc/laptop, and transfer the 4.0.2 you downloaded to your phone. One completed go back to phone and click install and click on the file you just transferred and swipe to install. Once completed reboot device. (Warning: at this time you will get the Dm-verity warning, but dont be alarmed we will take care of that in the up-coming steps.

Step 5: Once the phone reboots and comes to the setup screen don't go through and add your accounts because we will be doing another reset. Quickly get to the home screen of your phone and go to settings>about phone>tap build number 7-10 times>back once>developer options>make sure oem unlocking is ticked, advance reboot is ticked, and usb debugging is ticked(If none of them are please tick them). Since your phone is connected to the pc/laptop after you turn on usb debugging a allow authorization box will show on your phone. Please allow that for this to work.

Step 6: Next go to this link: http://downloads.oneplus.net/oneplus-3t/oneplus_3t_oxygenos_4.0.3/ , and go all the way to the bottom where it says download Oxygen Recovery (optional), and download that file, and place it on desktop.

Step 7: Now this is assuming you have adb/fastboot setup on you're pc/laptop. Please open up a Command prompt window with phone connected and type these commands in:

1) adb devices ( this will show your device ID Number). If it shows it please continue, if not there is an issue with adb/fastboot set up on your computer, or you typed that command in wrong. Once u get the issue resolved try the command again.​

2) adb reboot bootloader (this will reboot your device to bootloader mode)​

3) fastboot devices ( again this will show your device ID number as from before)​

4) fastboot flash recovery [click and drag the recovery file you downloaded from oneplus website and saved to the desktop here, press enter, and once completed go to your phone and use either the volume up or down button till u see the word Start in green and then press the power button. This will reboot your device, and again you will still have the dm-verity warning on. We are almost done.​

Step 8: Once your device is rebooted we need to get rid of all traces of twrp so go to your computer>file explorer>this PC tab>your device should be listed there since its still connected to pc> internal storage>locate twrp folder and delete. Now after you are done with this and you want to lock bootloader go to step 9, but if u don't want to relock the bootloader please just factory reset device, setup your device and then go back to oneplus.net and download the 4.03 version and adb sideload it, and dm verity is gone.

Step 9 Relocking bootloader is easy, and will reset your device. While on your phone go to settings>about phone>tap build number 7-10 times>back once>developer options> make sure that OEM unlocking is ticked, advance reboot is ticked, and usb debugging is ticked (again u may get the allow authorization pop up on your phone please allow). Go to command prompt for adb/fastboot and type in these commands:

1) adb devices ( this will show your device ID Number). If it shows it please continue, if not there is an issue with adb/fastboot set up on you're computer, or you typed that command in wrong. Once u get the issue resolved try the command again.​

2) adb reboot bootloader (this will reboot your device to bootloader mode)​

3) fastboot devices ( again this will show you're device ID number as from before)​

4) fastboot oem lock; once you click enter go to your phone, and use your volume up or down buttons to click on lock bootloader. Let finish. This will reset your device again. Once this is all completed and reboot you have gotten rid of all the warning screens, and your device is like it was when you first got it. Set up device with your accounts and you will get a notification of a update. Download and install.​

Congrats your phone is back to stock. If anyone has questions please pm me.

Again these steps are longer than what most of you may do. A few others including myself have done this multiple times to confirm. None of us had issues. It works

**Special Thanks**

The guys that tested this with me to confirm my steps are accurate
Google for well google :)
Oneplus for yet another awesome device and software.

***UPDATE***
Thanks to @ashokmor007 he made the video below on the steps.
https://www.youtube.com/shared?ci=xDFI-287K-Q
 
Last edited:

8NEW

Member
Apr 1, 2015
6
0
TWRP - Mount Decrypt Data?

Good afternoon, the_rooter... Thanks for posting this. I'm trying to get back to stock and found this. I'll explain from the beginning... :)

My 3T will not boot now. Stuck on “Powered by Android” Screen. Here’s the sequence of events that led to this:

1. Flashed TWRP 3.1.0-1
2. Did a backup of phone (Orig OS… Just got phone a few days ago)
2. Flashed Sultan’s ROM
3. Installed Xposed.

At this point… Everything was working just fine… This morning I decided to install the Xprivacy Module and then I rebooted phone. When I did that, the phone just hung at the “blue android” start screen. I then did the following:

1. Held power button until shutdown
1. It took a while, but I was finally able to boot into TWRP.
2. Did a Wipe – The regular one
3. Restored my backup and rebooted. (Would not boot into the OS)

This is where I think I screwed it up even further… :D … Here’s what I did… I grabbed a shotgun and… LOL… No… but I was thinkin’ it… LOL… I did this:

1. Booted into TWRP
2. Did the Advanced Wipe and just wiped Everything(Internal Storage as well) except USB OTG

Also getting "Mount Decrypt Data" message when I boot to TWRP... Not sure why that's happening...

Now I can’t copy any files to the phone… Tried with Linux(Ubuntu) and a Windows system... Before all of this I could copy to the phone just fine. I tried disabling MTP in TWRP but that didn't work either. So I'm stuck on copying things to the phone at this point...

Can you set me straight? :)

Edit: Crisis over... Was able to load ADB drivers on a Windows Box and copy ROM back to phone... :) I'm back and smiling again.
 
Last edited:

zevim2005

Senior Member
Dec 25, 2007
519
69
Jerusalem
Just use these tutorial for return 100% stock,it worked very good but the last dm verity message only dissappeard for me after step 9 updating to last 7.1.1 using adb sideload.
Thank You very much!!!!!
 
Last edited:

eghrjnd

New member
Mar 18, 2017
1
0
Is there a reason why you have to swipe to allow modifications? Can't you just keep TWRP read only and then the stock recovery will automatically be flashed so you don't have to do it manually? Also there will be no dm-verity warning.
 

drolll

Member
Jan 12, 2011
9
0
Thanks for this guide, it worked great.

When you flash the downloaded 4.0.3, the ota of 4.1.0 will fail because somehow a partial ota is for some reason not possible. Anyway this is no problem because the phone will perform an automatic retry and downloads the full ota which worked for me and let the dm-verity warning disappear. I imagine future partial otas will work.

Therefore I think it is important to start with a version that is not the newest version (but e.g. with newest version - 1) or otherwise use some other way to get rid of the dm-verity warning.
 

RocKKer

Member
Jul 15, 2010
7
0
Northern CA
Took the 4.0.3 update OTA but other than that followed exactly. Worked beautifully!
I didn't relock bootloader.
I also removed the default encryption.
 

Kind3r32

Member
Jul 13, 2014
20
2
I've followed all the steps, but dm-verity warning is still showing. I'm still on OOS 4.0.2 though. Someone with simmilar experience? How to get rid of that dm-verity warning?

Edit:

Manually upgraded to OOS 4.0.3 and dm-verity warning gone! Not sure why I was not receiving OTA update though.
 
Last edited:

Korov

Member
Dec 24, 2010
40
7
I was coming from the beta channel, and after the initial wipe I was unable to boot into either recovery or the software. I had to reflash TWRP, and then I was able to install 4.02.
After unlocking, I was still getting the dm verity warning. The software attempted an OTA, but it failed. After this it downloaded the complete 4.1.3 via OTA, which worked and got rid of the dm verity warning.

Thanks for the guide!
 

Sonanio

New member
Jul 22, 2016
4
0
Followed Tutorial 100% :/, Didn't get any error doing Flashing, Worked perfectly but still the DM-Verity warning.
 

arvindgr

Senior Member
Nov 8, 2013
935
342
Tamilan
OnePlus 7T
Redmi 9 Power
That official TWRP 3.x is prone to cause dm-verify error and due to that I even has many files in /data lost! Better use TWRP 3.1 bluspark version. Though it's Unofficial its work best.. I also upgraded from 3.0 to 3.1 TWRP without getting the dm-verify error back..
 
Last edited:

diego97yey

Member
Aug 11, 2014
47
6
That official TWRP 3.x is prone to cause dm-verify error and due to that I even has many files in /data lost! Better use TWRP 3.1 bluspark version. Though it's Unofficial its work best.. I also upgraded from 3.0 to 3.1 TWRP without getting the dm-verify error back..
How can I upgrade to the 3.1 version?
 

x10000

Member
Aug 29, 2009
6
1
To return it to stock I just
1.flash the oneplus's Oxygen Recovery
2. full wipe in Oxygen Recovery
3. ADB sideload 4.0.3
4. lock oem in fastboot
and all the warning would disappear and every return to stock
 
  • Like
Reactions: enoooo

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    Disclaimer: I have done these steps multiple times and haven't come across any issues, but before you continue please read this fully, and follow the steps completely. Any issues or damage to your phone that occurs while doing this I am not responsible.​

    That being said below will be everything you need to make sure this all goes smoothly:

    1. Windows or Linux Laptop/PC
    2. Atleast 50% battery on OP3T
    3. Usb Cable for OP3T
    4. Internet Access
    5. Patience :)

    Now to Begin the process to return to stock:

    Step 1: Go to http://downloads.oneplus.net/devices/oneplus-3t/ , and download the 4.0.2 version. Again these are the steps I do so that I can make sure the process is done correctly and also that I can get rid of the annoying dm-verity warning. Don't worry at the end of this you will have the latest version for you're device.

    Step 2: Go to your phone and reboot to twrp, once in twrp go to wipe>Advance Wipe> Tick everything but usb otg (I do this to make sure my phone starts out in a completely clean state>then swipe to wipe. Once it's finished press back twice to get back to the main screen for twrp.

    Step 3: Please reboot device back to twrp. (I found the best way to do this without issues is on the main screen for twrp go to reboot>power off>when the unlocked bootloader warning comes on click the volume up button quickly>use the volume down button when another menu comes on and go to recovery. Again I did it this way because the with twrp version 3.0.4-1 gave me issues when trying to reboot twrp within twrp. Also you will get an No OS installed this is normal as you wiped the system completely. Don't worry just reboot back to twrp.)

    Step 4: Once back to twrp you will get the screen where is says to allow modification. Please swipe to allow. Next please connect phone to pc/laptop, and transfer the 4.0.2 you downloaded to your phone. One completed go back to phone and click install and click on the file you just transferred and swipe to install. Once completed reboot device. (Warning: at this time you will get the Dm-verity warning, but dont be alarmed we will take care of that in the up-coming steps.

    Step 5: Once the phone reboots and comes to the setup screen don't go through and add your accounts because we will be doing another reset. Quickly get to the home screen of your phone and go to settings>about phone>tap build number 7-10 times>back once>developer options>make sure oem unlocking is ticked, advance reboot is ticked, and usb debugging is ticked(If none of them are please tick them). Since your phone is connected to the pc/laptop after you turn on usb debugging a allow authorization box will show on your phone. Please allow that for this to work.

    Step 6: Next go to this link: http://downloads.oneplus.net/oneplus-3t/oneplus_3t_oxygenos_4.0.3/ , and go all the way to the bottom where it says download Oxygen Recovery (optional), and download that file, and place it on desktop.

    Step 7: Now this is assuming you have adb/fastboot setup on you're pc/laptop. Please open up a Command prompt window with phone connected and type these commands in:

    1) adb devices ( this will show your device ID Number). If it shows it please continue, if not there is an issue with adb/fastboot set up on your computer, or you typed that command in wrong. Once u get the issue resolved try the command again.​

    2) adb reboot bootloader (this will reboot your device to bootloader mode)​

    3) fastboot devices ( again this will show your device ID number as from before)​

    4) fastboot flash recovery [click and drag the recovery file you downloaded from oneplus website and saved to the desktop here, press enter, and once completed go to your phone and use either the volume up or down button till u see the word Start in green and then press the power button. This will reboot your device, and again you will still have the dm-verity warning on. We are almost done.​

    Step 8: Once your device is rebooted we need to get rid of all traces of twrp so go to your computer>file explorer>this PC tab>your device should be listed there since its still connected to pc> internal storage>locate twrp folder and delete. Now after you are done with this and you want to lock bootloader go to step 9, but if u don't want to relock the bootloader please just factory reset device, setup your device and then go back to oneplus.net and download the 4.03 version and adb sideload it, and dm verity is gone.

    Step 9 Relocking bootloader is easy, and will reset your device. While on your phone go to settings>about phone>tap build number 7-10 times>back once>developer options> make sure that OEM unlocking is ticked, advance reboot is ticked, and usb debugging is ticked (again u may get the allow authorization pop up on your phone please allow). Go to command prompt for adb/fastboot and type in these commands:

    1) adb devices ( this will show your device ID Number). If it shows it please continue, if not there is an issue with adb/fastboot set up on you're computer, or you typed that command in wrong. Once u get the issue resolved try the command again.​

    2) adb reboot bootloader (this will reboot your device to bootloader mode)​

    3) fastboot devices ( again this will show you're device ID number as from before)​

    4) fastboot oem lock; once you click enter go to your phone, and use your volume up or down buttons to click on lock bootloader. Let finish. This will reset your device again. Once this is all completed and reboot you have gotten rid of all the warning screens, and your device is like it was when you first got it. Set up device with your accounts and you will get a notification of a update. Download and install.​

    Congrats your phone is back to stock. If anyone has questions please pm me.

    Again these steps are longer than what most of you may do. A few others including myself have done this multiple times to confirm. None of us had issues. It works

    **Special Thanks**

    The guys that tested this with me to confirm my steps are accurate
    Google for well google :)
    Oneplus for yet another awesome device and software.

    ***UPDATE***
    Thanks to @ashokmor007 he made the video below on the steps.
    https://www.youtube.com/shared?ci=xDFI-287K-Q
    4
    If there is anything else that someone may want a guide on how to do and there isn't one currently on xda. let me know and i can get a guide out. We are currently figuring out if this will work on the oneplus 3.
    2
    Nice guides! However, I think of another method, I still don't know if it would work or not, here they are:
    1. From TWRP, flash Full ROM of OOS 4.1.6 (the latest version as I'm writing this post)
    2. Let it boot to desktop
    3. Usually, after this, TWRP will be replaced with OOS stock recovery from the Full ROM 4.1.6 (CMIIW)
    4. Reboot your OP3T to Fastboot mode, connect it to laptop and relock the bootloader with fastboot oem lock command
    5. With this command, your bootloader will be relocked and all of your internal storage data will be wiped

    Do you think these steps are correct? If so, I think this is way faster compared to steps explained by OP.
    2
    Guide to revert oneplus 3t to stock and lock bootloader

    Nice guides! However, I think of another method, I still don't know if it would work or not, here they are:
    1. From TWRP, flash Full ROM of OOS 4.1.6 (the latest version as I'm writing this post)
    2. Let it boot to desktop
    3. Usually, after this, TWRP will be replaced with OOS stock recovery from the Full ROM 4.1.6 (CMIIW)
    4. Reboot your OP3T to Fastboot mode, connect it to laptop and relock the bootloader with fastboot oem lock command
    5. With this command, your bootloader will be relocked and all of your internal storage data will be wiped

    Do you think these steps are correct? If so, I think this is way faster compared to steps explained by OP.

    Hello Friends,
    I have unrooted my oneplus 3t to stock completely. I was using paranoid android(No matter what OS you are using) and took the following steps:
    1) I flashed Oxygen OS 4.1.6 through latest TWRP 3.1.1.2 . After booting successfully I noticed that stock recovery is installed automatically so I did not flash stock recovery manually through fastboot method.
    "But note that before flashing any other OS in TWRP, always perform clean flash i.e. wipe system, data, delvic cache and cache excluding internal storage and USB OTG because internal storage will be having the OS file which you are going to flash."
    2) Now my oneplus 3t is having Oxygen OS 4.1.6 with stock recovery but having DM verity issue. Then I full wiped ( select erase everything) in stock recovery.
    3)After complete wipe, check your phone must not have any traces of TWRP folder or substratum folder which all these have in a rooted device. Now, I sideloaded the same file i.e. oxygen OS 4.1.6 through the following command:
    adb sideload OTA.zip where OTA is zip file downloaded from oneplus site for oneplus 3t and renamed it as OTA
    (For this, you will have to go to stock recovery and select the option of "install from ADB" then a pop up screen will show you that you are in sideload mode. But remember that sideloading the OS is a slow process; so keep patience and do not remove cable in the middle of installation otherwise your device will be bricked.)
    4) Still DM-verity issue was not resolved, then locked the bootloader with following command:
    fastboot oem lock
    5) Now,My devices is running Oxygen OS 4.1.6 with stock recovery and locked bootloader and-and and
    NO DM verity.
    Now wait for the next update by oneplus as your phone is completely stock.

    Please note that if you follow these steps, you will not have any issues but I do not take any responsibility of bricked devices.
    Perform at your own risk.
    2
    Where can i find the 4.0.2 version? on the oneplus website I can only find the new version, which is the 5.0.8 :confused:
    I can't find the rom nowhere. I could find a modified one, but the original? there must be some way to find it... I am sure i am not seing something
    https://mega.nz/#!w0VREYbZ!VGzp2GcJPnfbzy6ShtOL7Mo3ypmrFbs49tlaqu9hLi0

    This is my Mirror

    Taaaak....