This guide shows how to restore the stock Oxygen OS from any custom ROM in OnePlus 7 and latest OnePlus devices. This may work in 7 and below version of devices. But this worked 100% in my 7T device and this how I reverted back my device.
Important: Please read through the instructions at least once before actually following them, so as to avoid any problems due to any missed steps. Also take the backup of your data.
Preparation
Before we proceed, let’s get all the required files downloaded.
Hope that adb and fastboot is already installed. If it is not installed, follow this guide to install it in your computer.
Let’s create a folder named “android” in C: drive and move the downloaded files in this folder.
Now extract the payload-dumper-go zip file and move the payload-dumper-go.exe into the android folder, where the Oxygen OS zip file is available.
Now open the cmd/powershell and change the directory to c:/android
Use the payload-dumper to extract the image files from Oxygen OS. Run the command below.
PS C:/android> .\payload-dumper-go.exe .\OnePlusXXXX_...._XXXX.zip
Change the OnePlusXXXX\_....\_XXXX.zip to match your Oxygen OS zip file name.
After the extracting process is done. We could find a new folder extracted_XXXXXXXX_XXXXX.
Now change the command line to newly created folder.
PS C:/android> cd extracted_XXXXXXXX_XXXXX
Change the directory name extracted_XXXXXXXX_XXXXX with your matching name.
Flashing
With the device powered off, hold Volume Up + Volume Down + Power
Once the device is in fastboot mode, verify your PC finds it by typing
fastboot devices
Now flash the stock boot and recovery images
fastboot flash --slot=all boot boot.img fastboot flash --slot=all recovery recovery.img
Then reboot system into fastbootd mode
fastboot reboot fastboot
Now let’s start the flashing by wiping the device first.
fastboot -wfastboot flash --slot=all abl abl.imgfastboot flash --slot=all aop aop.imgfastboot flash --slot=all bluetooth bluetooth.imgfastboot flash --slot=all boot boot.imgfastboot flash --slot=all cmnlib64 cmnlib64.imgfastboot flash --slot=all cmnlib cmnlib.imgfastboot flash --slot=all devcfg devcfg.imgfastboot flash --slot=all dsp dsp.imgfastboot flash --slot=all dtbo dtbo.imgfastboot flash --slot=all hyp hyp.imgfastboot flash --slot=all imagefv imagefv.imgfastboot flash --slot=all keymaster keymaster.imgfastboot flash --slot=all LOGO LOGO.imgfastboot flash --slot=all modem modem.imgfastboot flash --slot=all multiimgoem multiimgoem.imgfastboot flash --slot=all odm odm.imgfastboot flash --slot=all oem_stanvbk oem_stanvbk.imgfastboot flash --slot=all opproduct opproduct.imgfastboot flash --slot=all qupfw qupfw.imgfastboot flash --slot=all recovery recovery.imgfastboot flash --slot=all storsec storsec.imgfastboot flash --slot=all tz tz.imgfastboot flash --slot=all uefisecapp uefisecapp.imgfastboot flash --slot=all vbmeta vbmeta.imgfastboot flash --slot=all vbmeta_system vbmeta_system.imgfastboot flash --slot=all xbl_config xbl_config.imgfastboot flash --slot=all xbl xbl.imgfastboot reboot fastbootfastboot flash --slot=all system system.imgfastboot flash --slot=all system_ext system_ext.imgfastboot flash --slot=all vendor vendor.imgfastboot flash --slot=all product product.imgNow the flashing process is done. If you wanted to lock the bootloader follow the below commands else reboot the device by entering the command fastboot reboot.
To lock the bootloader.
fastboot reboot bootloaderfastboot oem lockNow follow the onscreen steps to complete the lock process. Once it is done enter the command fastboot reboot to boot into the phone.
Hope this guide helped you to restore the stock Oxygen OS in your device.
You can support by buying a coffee ☕️ here - https://www.buymeacoffee.com/vinothvkr