Restore OnePlus 8 8T Pro Stock oxygebos rom via Fastboot Commands

Restore OnePlus 8/8T/8 Pro to Stock via Fastboot Commands

In this comprehensive guide, we will show you how to restore OnePlus 8/8T/8 Pro to Stock OxygenOS via Fastboot Commands. The entire tutorial will go as follows. We will start by downloading the stock OxygenOS ROM for your device. This ROM will then be extracted to get the payload.bin file. After this, we will extract this payload.bin file to get all the partition IMG files (boot.img, vendor.img, system.img).

Finally, all these IMG files will be flashed to their respective partitions. Your device will then boot to stock OxygenOS in its original state. It wouldn’t have custom recovery, mod installed nor will it be rooted. Along the same lines, you could use this guide to fix a boot-looped or soft-bricked OnePlus device.

If there is one OEM that has made full use of Android’s ecosystem, it’s got to be OnePlus. It has always been among the most active layers in the custom development picture. Right from flashing tons of custom ROMs to replacing the device’s stock recovery with TWRP, the options are endless. Likewise, you could also root your device with TWRP or without TWRP.

The former is simply done by flashing the Magisk Installer ZIP via TWRP. The latter method requires patching and flashing the boot.img file. Once rooted, you could then flash Magisk Modules, Xposed Frameworks, Substratum Themes, and other mods. But there are two sides two each coin, and the same is the case here as well. If you end up flashing an incorrect binary or miss any step during the flashing process, it might be a cause of concern.

More often than not, your device will go to a continuous bootloop or get soft-bricked. if that ever happens, then this guide is here to help you out. Today, we will show you how to restore OnePlus 8/8T/8 Pro to Stock OxygenOS via Fastboot Commands. Follow along for the detailed instruction set.



Restore OnePlus 8/8T/8 Pro to Stock via Fastboot Commands

Before we list out the instructions, there are a few requirements that you need to qualify. Make sure to go through them and only then proceed with the unbrick steps. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.

Prerequisites

  • Create a complete device backup, if possible. This is because we will have to wipe off all the data from your device via the fastboot-w command later on. So a backup beforehand is of utmost importance. Since most of you might be stuck in fastboot, it might be a tough job to do. But if your device is up and running, then please create a backup beforehand.
  • Next up, install the Android SDK Platform Tools on your PC. This will provide you with the necessary ADB and Fastboot binary files.Delete COW Partitions in Android

These were the required files. You may now proceed ahead with the steps to restore your OnePlus 8/8T/8 Pro device to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

STEP 1: Boot OnePlus 8/8T/8 Pro to Fastboot Methods [3 Methods]

First and foremost, you will have to boot your OnePlus 8 series device to Fastboot Mode. This could be done via 3 different methods, depending on the scenario you are facing as of now:

fastboot mode oneplus
Fastboot Mode OnePlus [Reference Image]
  • If your device is soft-bricked, well then it might already be booted to Fastboot.
  • If it is in a continuous boot-loop, then wait for the battery to dry out so that it powers off. Then plug in the charger and at the same time press and hold the Volume Up, Volume Down, and Power buttons together. The timing is extremely important in this, if done at the right time, then you should have no issues in booting to Fastboot or Bootloader Mode.
  • On the other hand, if your device is perfectly working then use the Advanced Reboot menu under Developer Options and access the Fastboot Mode option. Or you could also enable USB Debugging from Developer options and then use the adb reboot bootloader command. Anyways, once your device is booted to Fastboot Mode, head over to the next set of instructions. to restore your OnePlus 8/8T/8 Pro to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

STEP 2: Download OnePlus 8/8T/8 Pro Stock OxygenOS ROM

oneplus 8 8t pro stock rom extracted

Now head over to the OnePlus Support Forum and download the latest OxygenOS for your OnePlus 8 series device. The firmware would be in ZIP format. If you see the firmware in JAR format, then simply use the 7 ZIP, WinZIP, WinRAR extraction tool to extract its content.

STEP 3: Extract OnePlus 8/8T/8 Pro Payload.Bin File

After extraction, you would notice that there aren’t any partition files. Rather you would see a payload.bin file. It is this file that is holding all the partition IMG files. So you will need to extract this patload.bin file to get hold of all the other files. In this regard, this guide should help you out: How to Extract Stock Boot. img from OnePlus OxygenOS Stock ROM.

oneplus 8 8t pro extracted payload.bin fastboot rom

Follow the steps given in this linked guide and you should all the files inside the Python output folder (again refer to the linked guide). For example, the above image shows all the files that I got after extracting the OnePlus 8 payload.bin file. Let’s now proceed to the next step to restore your OnePlus 8/8T/8 Pro to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

oneplus 8 8t pro extracted payload fastboot files

STEP 4: Flash OnePlus OnePlus 8/8T/8 Pro Stock ROM- The Initial Setup

Once you have got all the OxygenOS ROM extracted files, transfer them to the platform-tools folder. Inside the same folder, type in CMD in its address bar and hit Enter (see below image). This will launch the Command Prompt window. Now connect your device to the PC via USB cable. Make sure that is booted to Fastboot. Finally, you may now flash all the OnePlus Fastboot ROM files via Fastboot Commands.

command-prompt-adb

As given below in STEP 5 we have listed all the commands for the same. Copy-paste the first command in the CMD window, hit Enter, then do so for the next one, and so on. Furthermore, some commands like when the system.img file is being flashed, will take up quite a lot of time. This is completely normal. Along the same lines, you might also get an “Invalid sparse file format at header magic” message. Well then it is not an error, just wait for a few seconds and it will automatically be gone.

STEP 5: Restore OnePlus 8/8T/8 Pro Stock ROM via Fastboot Commands

So here are the required Fastboot commands to restore your OnePlus 8/8T/8 Pro to stock OxygenOS by flashing the Stock ROM. The first command (fastboot -w) will completely wipe off all the data from your device, so make sure to have a backup beforehand. Then the last command at the end (fastboot reboot bootloader) will reboot your device back to Fastboot Mode.

After this, you may easily reboot to the OS from Fastboot either by bringing up the Reboot option via Volume Keys and then pressing the Power button to confirm the decision. You could also execute the fastboot reboot command (only do so after all the files have been flashed and your device has been rebooted to Fastboot). And this time, you no longer have to flash these files to both these slots as opposed to OnePlus 6 or OnePlus 7. As a result, you will definitely end up saving a lot of manual effort, and your precious time as well.

fastboot -w
fastboot flash aop aop.img
fastboot flash bluetooth bluetooth.img
fastboot flash boot boot.img
fastboot flash dsp dsp.img
fastboot flash dtbo dtbo.img
fastboot flash LOGO LOGO.img
fastboot flash modem modem.img
fastboot flash oem_stanvbk oem_stanvbk.img
fastboot flash qupfw qupfw.img
fastboot flash storsec storsec.img
fastboot flash multiimgoem multiimgoem.img
fastboot flash uefisecapp uefisecapp.img
fastboot flash recovery recovery.img
fastboot –disable-verity flash vbmeta vbmeta.img
fastboot –disable-verity flash vbmeta_system vbmeta_system.img
fastboot flash opproduct opproduct.img
fastboot reboot fastboot
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash product product.img
fastboot reboot bootloader

As mentioned before, your device will be booted to Fastboot mode due to the fastboot reboot bootloader command. You may now boot it to the OS right from the Fastboot Mode itself or use the fastboot reboot command. Do keep in mind that the first boot might take up some time. It is completely normal. Furthermore, you might have to set up your device from scratch as a complete device wipe has taken place.

Unbrick OnePlus 8/8T/8 Pro via Fastboot Commands

To begin with, carry out STEPS 1 to 4 listed above. Then flash the firmware partition files using the below commands: [your device will reboot to the FastbootD Mode after the execution of the fourth command]

fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot reboot fastboot
fastboot flash --slot=all recovery recovery.img
fastboot flash --slot=all boot boot.img
fastboot flash --slot=all dtbo dtbo.img
fastboot flash --slot=all abl abl.img
fastboot flash --slot=all aop aop.img
fastboot flash --slot=all bluetooth bluetooth.img
fastboot flash --slot=all cmnlib64 cmnlib64.img
fastboot flash --slot=all cmnlib cmnlib.img
fastboot flash --slot=all devcfg devcfg.img
fastboot flash --slot=all dsp dsp.img
fastboot flash --slot=all featenabler featenabler.img
fastboot flash --slot=all hyp hyp.img
fastboot flash --slot=all imagefv imagefv.img
fastboot flash --slot=all keymaster keymaster.img
fastboot flash --slot=all logo logo.img
fastboot flash --slot=all mdm_oem_stanvbk mdm_oem_stanvbk.img
fastboot flash --slot=all modem modem.img
fastboot flash --slot=all multiimgoem multiimgoem.img
fastboot flash --slot=all qupfw qupfw.img
fastboot flash --slot=all spunvm spunvm.img
fastboot flash --slot=all storsec storsec.img
fastboot flash --slot=all tz tz.img
fastboot flash --slot=all uefisecapp uefisecapp.img
fastboot flash --slot=all xbl_config xbl_config.img
fastboot flash --slot=all xbl xbl.img
fastboot flash odm odm.img
fastboot flash system system.img
fastboot flash system_ext system_ext.img
fastboot flash product product.img
fastboot flash vendor vendor.img
fastboot flash --slot=all vbmeta vbmeta.img
fastboot flash --slot=all vbmeta_system vbmeta_system.img
fastboot reboot

The last command will automatically reboot your device to the OS. So on that note, we conclude this guide on how to restore or unbrick your OnePlus 8/8T/8 Pro to stock OxygenOS by flashing the Stock ROM via Fastboot Commands. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.

Unbrick OnePlus 8/8T/8 Pro via Fastboot Enhance

This is a tool created by XDA Senior Member xzr467706992 and beholds a slew of intriguing features, including the ability to directly flash the payload.bin file, without the need to even manually extract it first. Do note that even though this tool was created for OnePlus 8T but it should work across other OnePlus devices too. [Well, I have personally tested it on OnePlus 7T and OnePlus 10 Pro, it works well and good even on those devices].

STEP 1: Download Fastboot Enhance Tool

Download the Fastboot Enhance Tool from GitHub [direct link]. Once downloaded, extract it to any convenient location on your PC. The biggest advantage of this tool is that you could directory flash the payload.bin file, there is no need to extract it and get the resultant IMG files!

fastboot enhance unbrick oneplus 8 pro

STEP 2: Download OnePlus OnePlus 8/8T/8 Pro ROM

  1. Next up, get hold of the firmware for your device from below:
    OnePlus 8/8T/8 Pro Stock Firmware
  2. Once downloaded, extract it and transfer the resultant payload.bin file to the Fastboot Enhance Tool folder.
    fastboot enhance unbrick oneplus 8 pro

STEP 3: Install Android SDK

Next up, install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform tools folder, which will be used throughout this guide.

install adb platform tools windows

STEP 4: Install Fastboot Drivers

The tool doesn’t come with the Fastboot Drivers, so you will manually have to install it on your PC. For that, please refer to our guide on How to Install Fastboot Drivers in Windows 11. Likewise, make sure to install the OnePlus USB Drivers as well [they are usually automatically installed as soon as you connect your device to the Windows PC for the first time].

fastboot enhance unbrick oneplus 8 pro

STEP 5: Boot to Fastboot Mode

  1. Since your device is currently in a brick state, you wouldn’t be able to use the adb reboot bootloader command to boot your device to Fastboot Mode. Rather, you will have to take the help of the Hardware key combinations to get this job done.
    fastboot enhance unbrick oneplus 8 pro
  2. Once booted, type in the below command and you should get back the device ID. This signifies that the Fastboot connection stands successful.
    fastboot devices

    oneplus 7 pro android 13

STEP 6: Flash Downgrade Firmware on OnePlus 8/8T/8 Pro via Fastboot

  1. To begin with, launch the Fastboot Enhance Tool via its EXE file.
    fastboot enhance unbrick oneplus 8 pro
  2. Your device should be listed under the Fastboot Virtualization tab,  select it.
    fastboot enhance unbrick oneplus 8 pro
  3. After that, click on the Reboot to FastbootD button.fastboot enhance unbrick oneplus 8 pro
  4. Your device will boot to FastbootD Mode.fastboot enhance unbrick oneplus 8 pro
  5. Now go to the Payload Dumper tab and click on Browse.
    fastboot enhance unbrick oneplus 8 pro
  6. Navigate to the payload.bin file, select it and click Open.fastboot enhance unbrick oneplus 8 pro
  7. The file will now be loaded in the tool, displaying the resultant information.
    fastboot enhance unbrick oneplus 8 pro
  8. Now go to the Fastboot Virtualization tab and click on Flash payload.bin. If the flashing starts, well and good.
    fastboot enhance unbrick oneplus 8 pro
  9. However, if you get the ‘Virtual A/B temporary partitions exist’ popup, then click on No.
    fastboot enhance unbrick oneplus 8 pro
  10. After that, go to the Partitions tab and type in cow in the Filter by name box.
    fastboot enhance unbrick oneplus 8 pro
  11. Select all the partitions from the results that have cow in their name and hit the Delete button.
  12. Once done, click on Flash payload.bin. This time the flashing will start without any issues.
    fastboot enhance unbrick oneplus 8 pro
  13. Once complete, you will be notified of the same. You may now boot to the OS by clicking on Reboot to System.
    fastboot enhance unbrick oneplus 8 pro

About Chief Editor

24 thoughts on “Restore OnePlus 8/8T/8 Pro to Stock via Fastboot Commands”

  1. Been getting a ‘Flashing is not allowed for Critical Partitions’ error, not sure how to proceed. Looking online I found ‘fastboot flashing unlock_critical’ but it seems to not register as a command so I’m stuck :/

    1. Well, Evan the fix you have mentioned is exactly what is required (fastboot flashing unlock_critical). Could you please let me know what error message is that command giving?

      1. Hi i also got that error

        the error is

        C:\Users\Admin\Desktop\Root\platform-tools>fastboot flash storsec storsec.img
        Sending ‘storsec’ (20 KB) OKAY [ 0.047s]
        Writing ‘storsec’ FAILED (remote: ‘Flashing is not allowed for Critical Partitions
        ‘)
        fastboot: error: Command failed

        and this also applies to other imgs that are trying to flash into phone

        1. Hi Auzaie, is your device’s critical partition unlocked? If not, you could do so via fastboot flashing unlock_critical command (it will wipe all your data)

  2. What do i do

    C:\platform-tools>fastboot flash aop aop.img
    Sending ‘aop’ (200 KB) OKAY [ 0.011s]
    Writing ‘aop’ FAILED (remote: ‘Flashing is not allowed for Critical Partitions
    ‘)
    fastboot: error: Command failed

    C:\platform-tools>fastboot flashing unlock_critical
    FAILED (remote: ‘ Device already : unlocked!’)
    fastboot: error: Command failed

  3. WARNING: You are using pip version 21.1.3; however, version 21.2.3 is available.
    You should consider upgrading via the ‘C:\Users\username\AppData\Local\Programs\Python\Python39\python.exe -m pip install –upgrade pip’ command.

    1. Well, you could consider updating it via the given command. But it should work without any issues in the current version as well.

  4. Sir my phone rooted with Magisk ,TWRP installed and bootloader unlocked can I follow the above method,…and sir when I extracted my stock rom with payload dumper with payload file it doesn’t give all imj files what sould I do next…

  5. Can this method be used to directly convert OP 8 Tmobile version to Global firmware?

    Currently I have A11.0.6 (latest with Dec sec patch) on the OP 8 Tmo. Can I download latest OP global Rom and follow the steps in this article and convert Tmo to Global?

  6. my device is oneplus 7t pro, can this method also be used for the same with the method? ofcource by using the appropriate rom file?

  7. Hi I have oneplus 8t 5g I think I have flashed my Stock recovery and also rom and now I I am bootloader mode. I have oneplus 8t 5g KB23007.

    I have tried MSM tool but it always give error Param load error
    on system I can seey that Qualcomm drivers are installed.

    Please guide the right way so I can do that.

  8. Hey, this method worked well but there’s error shows is ( flashing not allowed for critical partiton ?
    flashing unlock commadhasbeen used already but same proplem !

  9. “flashing is not allowed for critical partitions” is showing after the fastboot flashing aop aop.img
    How to allow it??

  10. My device got stuck on the list of fastboots .. 3 days ago and I tried and tried all the methods that I found and did not find a solution. Did I lose my device permanently? Your method I feel it should work but I don’t know what’s wrong I did it right step by step as you explained but every time it comes the last commands and they all fail all these commands fail I give up
    These commands all fail
    fastboot flash odm odm.img
    fastboot flash system system.img
    fastboot flash system_ext system_ext.img
    fastboot flash product product.img
    fastboot flash vendor.img
    fastboot flash –slot=all vbmeta vbmeta.img
    fastboot flash –slot=all vbmeta_system vbmeta_system.img
    fastboot reboot

      1. I’ve tried everything and every way I don’t know what to do wrong I really gave up
        can i contact you Telegram or anything or you can see it through team vewer for example and help me!

  11. I’ve been following the procedures to return my kb2007 to stock but I’m stuck at fastboot flash –slot=all dsp dsp.img

    every other command was working, got the payload bin from the official oneplus site.

    “Sending ‘dsp_a’ (65536 KB) FAILED (Write to device failed in SendBuffer() (no link))
    fastboot: error: Command failed”

    any idea what might be wrong with that one? I’m doing it from fastbootD and up until that point, everything was operating smoothly. Original cable that came with phone, tested with other cables and ports. Intel processor windows 10

  12. All run correctly, but after last reboot….. Nothing. Not even getting detected by pc. No charging screen nothing…. Totally bricked

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.