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

Search This thread

Crazy32

Senior Member
Dec 12, 2012
493
175
Bückeburg
Google Pixel 6
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.

There is no 4.0.2. Does it work with the 5.0.4 too?
 

sandeep_kumar

Senior Member
Feb 21, 2017
513
128
Indore
You can use the latest 5.0.6 after wiping everything without any magisk or mode and check DM-verity should not trigger after booting.
If DM-verity triggers as was in my case too, then sideload the same 5.0.6 zip through fastboot which will remove DM-verity.
After that you can lock bootloader after again wiping everything from stock recovery.
Make sure before locking the bootloader, you have stock recovery.
 

L.P.

Member
Feb 18, 2013
18
1
Thank you most of you for pointing out all the issue one can face.

I facing a strange issue where in my device is stuck in a reboot loop and cant seem to do anything. It just vibrates and turns off and back on and so on and so forth.

Please note - i have read all the 7 pages of the thread, no one seem to come across the issue and I seem to be the only dumb*** who is stuck , LOL

Any help will be greatly apprecaited.
 

vinoxflame

Senior Member
Aug 3, 2014
532
241
Manila
Thank you most of you for pointing out all the issue one can face.

I facing a strange issue where in my device is stuck in a reboot loop and cant seem to do anything. It just vibrates and turns off and back on and so on and so forth.

Please note - i have read all the 7 pages of the thread, no one seem to come across the issue and I seem to be the only dumb*** who is stuck , LOL

Any help will be greatly apprecaited.
https://forums.oneplus.com/threads/...-3-3t-and-go-back-completely-to-stock.456232/
 

Degru01

Member
Oct 23, 2016
7
0
So, I'm currently running just Lineage with TWRP recovery on my OP3. I would like to go back to *full* stock with OTA updates and Google Pay etc. all working properly, because Google Pay isn't working with Magisk any more. Will following this guide get me there with the latest ROM and image available on the OnePlus site? I specifically want to make sure OTA and Google Pay will all work because I had a previous phone where "just" flashing the stock ROM and recovery wouldn't get it back to that state.
 

sandeep_kumar

Senior Member
Feb 21, 2017
513
128
Indore
So, I'm currently running just Lineage with TWRP recovery on my OP3. I would like to go back to *full* stock with OTA updates and Google Pay etc. all working properly, because Google Pay isn't working with Magisk any more. Will following this guide get me there with the latest ROM and image available on the OnePlus site? I specifically want to make sure OTA and Google Pay will all work because I had a previous phone where "just" flashing the stock ROM and recovery wouldn't get it back to that state.

Recently I returned back to stock completely.
I did:
1) Flashed the full zip of 5.0.8 after wiping all partition except internal storage(We can do factory reset from stock recovery thereafter).
2)Now after hitting reboot, make sure that you must not have DM-verity problem and if it exists than you will have to use adb sideload method to flash 5.0.8.zip again so that DM-verity is completely gone as stated in the OP.
3) After removing DM-verity problem, you can reset the device completely from stock recovery just for safety to make sure the device is safe and clean.
4) After that you can enter the command fastboot oem lock.

Enjoy the stock with OTA update
 
Last edited:

Degru01

Member
Oct 23, 2016
7
0
Recently I returned back to stock completely.
I did:
1) Flashed the full zip of 5.0.8 after wiping all partition except internal storage(We can do factory reset from stock recovery thereafter).
2)Now after hitting reboot, make sure that you must not have DM-verity problem and if it exists than you will have to use adb sideload method to flash 5.0.8.zip again so that DM-verity is completely gone as stated in the OP.
3) After removing DM-verity problem, you can reset the device completely from stock recovery just for safety to make sure the device is safe and clean.
4) After that you can enter the command fastboot oem lock.

Enjoy the stock with OTA update

Are you able to set up Google Pay and other apps that require stock/locked device?
 

sandeep_kumar

Senior Member
Feb 21, 2017
513
128
Indore
I do not use Google pay.
I confirm THAT my bootloader is locked with oxygen os 5.0.8 and after that I have taken the local update of community beta of android 9.0 successfully.
 

Ricky_Karmator

Senior Member
Jul 25, 2012
164
22
Brescia
Hello guys, can I flash the latest stable through TWRP following this guide even if I am on a decrypted device? And after I flash it and flash the official recovery, locked the bootloader and back to be encrypted,can I update to the community beta based on Pie? Thanks
 

sandeep_kumar

Senior Member
Feb 21, 2017
513
128
Indore
Hello guys, can I flash the latest stable through TWRP following this guide even if I am on a decrypted device? And after I flash it and flash the official recovery, locked the bootloader and back to be encrypted,can I update to the community beta based on Pie? Thanks

You can flash the latest stable 5.0.8 even if your decrypted afaik.
After installing stock recovery, after factory reset from the recovery menu of stock recovery your data partition will be changed to F2FS. Make sure that you have stock recovery and no-DM verity triggering before locking the bootloader.
After that you can flash local update of community beta of pie.
 
  • Like
Reactions: Ricky_Karmator

hrockh

Senior Member
Aug 25, 2009
456
96
Bristol
I installed the latest Pie stable (9.0.2) and while I can send the command "fastboot oem lock" to the device, the bootloader does not lock.
Downloading now OOS 5.0.8 to see if it works. I will report back.

UPDATE
Yup, downgrading to 5.0.8 did the job.
 
Last edited:

Xidroid

Senior Member
Aug 24, 2009
81
2
This guide was great, thanks! I had difficulty getting rid of the DM-Verity warning on boot using the Fastboot commands while OOS 5.0.8 was installed. After completing this guide, while still locked I started up the system and re-enabled Developer Options and got ADB running. This command: adb reboot "dm-verity enforcing" fixed the DM-Verity warning and the screen didn't come up during boot. I used the stock Recovery to wipe all data and reset to factory wipe the device.. Anyone having trouble with the DM-Verity should try this.
 
  • Like
Reactions: BillGoss

mrsim

Senior Member
Mar 10, 2014
819
224
london
www.china-devices.com
hello there the dev

there seems to be no option in the link in instruction "Step 6: Next go to this link: http://downloads.oneplus.net/oneplus...xygenos_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" to download a recovery....there are just options to choose which device rom you require,after you choose the OP3T there is still no option at the bottom of the page to download a stock recovery...???

ok odd you have to copy'n'paste the listed link into your browser and the download pops up but i managed to get it...thank you

maybe you should update the OP here is the image we receive at the link i mentioned above

https://imgur.com/MpBXt82

pps
i also noticed in the OP at step 7 that you do not mention to put the device into bootloader mode before connecting to ADB/fastboot on the PC i do not think i have ever in my life gone through ADB to access fastboot in order to flash any recovery....maybe years gone by this was a thing but now'a'days is this needed...??? and also isn't the command 'fastboot flash recovery recovery.img'

"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. "
 
Last edited:

diegogero

Senior Member
Jun 21, 2014
64
7
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:
 

diegogero

Senior Member
Jun 21, 2014
64
7
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
 

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....