This comprehensive guide walks you through the process of restoring the stock Oxygen OS from any custom ROM on OnePlus 7 and newer devices. While this method may work on OnePlus 7 and earlier versions, it has been verified to work flawlessly on the OnePlus 7T.
Warning
Important: Please read through the entire guide at least once before following the steps to avoid issues from missed instructions. Additionally, backup all your data before proceeding, as this process will wipe your device.
Requirements
Before you begin, make sure you have the following:
- ADB and Fastboot - If not already installed, follow this setup guide
- Oxygen OS ROM - Download from OnePlus Support (select your device model)
- payload-dumper-go - Download from GitHub Releases
- Windows PC - This guide uses Windows commands
- USB Cable - To connect your OnePlus device
Preparation
Step 1: Organize Files
- Create a folder named
androidin your C: drive (C:\android) - Download the Oxygen OS ROM file and place it in the
androidfolder - Extract the
payload-dumper-gozip file - Move
payload-dumper-go.exeto theC:\androidfolder
Step 2: Extract ROM Files
-
Open PowerShell or Command Prompt and navigate to your android folder:
cd C:\android -
Extract the ROM using payload-dumper-go:
.\payload-dumper-go.exe .\OnePlusXXXX_...._XXXX.zip(Replace
OnePlusXXXX_...._XXXX.zipwith your actual ROM filename) -
Wait for the extraction to complete. You’ll see a new folder named
extracted_XXXXXXXX_XXXXX -
Navigate to the extracted folder:
cd extracted_XXXXXXXX_XXXXX(Replace with your actual extracted folder name)
Flashing Process
Warning
Warning: The flashing process will erase all data on your device. Ensure you have backed up everything important before proceeding.
Step 1: Boot into Fastboot Mode
- Power off your OnePlus device completely
- Hold
Volume Up+Volume Down+Powersimultaneously until the fastboot menu appears - In your PowerShell window, verify the device is detected:
You should see your device listed with a serial numberfastboot devices
Step 2: Flash Boot and Recovery
-
Flash the boot and recovery images:
fastboot flash --slot=all boot boot.imgfastboot flash --slot=all recovery recovery.img -
Reboot into fastbootd mode:
fastboot reboot fastbootWait a few seconds for the device to reboot into fastbootd mode.
Step 3: Complete Flash Process
-
Start by wiping the device and then run all the flashing commands in sequence. This may take several minutes:
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.img
Note
The flashing process may take 10-15 minutes. Do not disconnect your device or interrupt the process. Wait for all commands to complete successfully.
Post-Flash Steps
Option 1: Reboot Device (Recommended)
If you want to keep the bootloader unlocked:
fastboot rebootYour device will boot into the stock Oxygen OS with a fresh installation.
Option 2: Lock the Bootloader
If you want to restore the bootloader lock:
-
Reboot to bootloader:
fastboot reboot bootloader -
Lock the bootloader:
fastboot oem lock -
Follow the on-screen prompts on your device to confirm the lock
-
After the lock completes, reboot:
fastboot reboot
Troubleshooting
- Device not detected: Ensure USB debugging is enabled and try a different USB port
- Flashing errors: Make sure all image files are in the correct directory
- Slow flashing: This is normal; do not interrupt the process
- Device stuck: Hold the power button for 10 seconds to force restart
Conclusion
Congratulations! You have successfully restored the stock Oxygen OS on your OnePlus device. Your phone should now run the official Oxygen OS with a clean slate. If you encounter any issues, please check the troubleshooting section or consult the OnePlus community forums.
If this guide helped you, consider supporting my work by buying me a coffee ☕