As soon as you have executed all the commands, your device will boot up to stock OxygenOS without any modifications. That is, it will be in its clean stock state without any TWRP, root, or other custom mods. Likewise, you could also use the instructions given here to fix the bootloop or soft brick on your OnePlus device[For hard Bricked devices, refer to our separate guide: How to Unbrick OnePlus 7 and bring it back from a Dead State | 7 Pro | 7T |  7T Pro]. OnePlus devices have always been the front runners when it comes to setting their feet in custom development. From flashing custom binaries to trying out tons of mods, there are a plethora of things to try out. These include flashing custom ROMS such as Pixel Experience, Havoc, or something along the AOSP lines. Likewise, you could also replace the device’s stock recovery with a custom one. This in turn will allow you to create and restore Nandroid backup, flash ZIP and IMG files, wipe device partitions, etc. Then you could also gain access to the system partition by rooting your device via TWRP or without TWRP, by flashing the patched boot.img file. After rooting, you could try out Substratum Themes, Xposed Frameworks, Magisk Modules, etc. However, these tweaks sometimes prove to be risky, if not done correctly or if you end up flashing an incorrect file. In that case, your device will go to a bootloop or might get soft-bricked. If that ever happens to your device, then this guide is always here to help you out. Today, we will show you how to restore the OnePlus 7/7T/7T Pro to Stock OxygenOS ROM via Fastboot Commands. Follow along for the detailed steps.

How to Install OxygenOS OTA on Rooted OnePlus devicesDownload Stable Android 11 OxygenOS 11 for OnePlus 8/ 8 ProHow to Extract Stock Boot.img from OnePlus OxygenOS Stock ROMFix Sahara communication failed error in MSM Download Tool

Unbrick | Restore: OnePlus 7/7T/7T 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.

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.

These were the required files. You may now proceed ahead with the steps to restore your OnePlus 7/7T/7T Pro to stock OxygenOS by flashing the Stock ROM via Fastboot Commands. 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 by performing the below steps.

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

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

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 and Power button 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 7/7T/7T Pro to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

STEP 2: Unlock Critical Partitions on OnePlus

For flashing IMG files to their respective partitions, you will first have to unlock those partitions. This could be done by executing the below command: [Read this for a more detailed explanation: How to Fix FAILED (remote: Partition flashing is not allowed)].

STEP 3: Download OnePlus 7/7T/7T Pro Stock OxygenOS ROM

Now head over to the OnePlus Support Forum and download the latest OxygenOS for your OnePlus 7 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.

[GUIDE] Flash ROMs/Magisk/TWRP/Kernels on A/B Partition DevicesEverything About Magisk- Manager, Modules and MoreBest Magisk Modules of 2020 [PART-1]Fix Magisk Module Bootloop without TWRP Recovery

STEP 4: Extract OnePlus 7/7T/7T 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.

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 7 payload.bin file. Let’s now proceed to the next step to restore your OnePlus 7/7T/7T Pro device to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

STEP 5: Flash OnePlus 7/7T/7T 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.

Given below in STEP 6 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.

How to Fix TWRP Error 70 [With Screenshots]How to Fix TWRP Error 20 GApps after flashing LineageOSFix TWRP Error 7 (While Flashing Custom ROM via TWRP)How to Boot into Recovery (TWRP/Stock) from Fastboot Mode

STEP 6: Restore OnePlus 7/7T/7T Pro Stock ROM via Fastboot Commands

So here are the required Fastboot commands to restore your OnePlus 7/7T/7T Pro device 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). 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. Alternate Commands: If the above commands didn’t work out for you, then you may also try out the below commands. Thanks to user Deep Lathia for bringing it to our notice and of course, to the XDA Recognized Contributor mauronofrio for these commands. Again, try again at your own risk, and the first command, fastboot- w will wipe off all the data on your device. So make sure to have a backup beforehand. The difference between mine (above command) and the below command is that I have provided the commands to flash the partition files to both the slots (since these are the A/B partition) devices. But it seems flashing the files to just the single partition seems to do the j0b for some, at least for the OnePlus 7T users. For me, though, the above commands that instruct to flash files to both the slots worked out. I haven’t tried out the below command on my deivce and hence cannot comment much on that. With that said, I would continue to update this guide as and when I find more useful information about the same. In the meantime, you could try out the below commands to Restore OnePlus 7/7T/7T Pro Stock ROM via Fastboot Commands. 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. On that note, let us know in the comments if you have any other queries related to the aforementioned steps. On that note, we conclude this guide to how to restore your OnePlus 7/7T/7T Pro device to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

Unbrick OnePlus 7/7T/7T 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!

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

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.

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

STEP 5: Boot to Fastboot Mode

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

How to Update Magisk ZIP and Magisk Manager (without TWRP)Disable DM-Verity or Android Verified Boot without TWRPFix Magisk Module Bootloop without TWRP RecoveryHow to Root Android Devices Without TWRP Recovery

About Chief Editor

Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 31Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 69Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 10Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 66Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 96Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 70Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 88Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 30Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 44Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 49Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 85Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 70Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 46Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 58Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 53Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 20Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 19Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 13Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 28Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 90Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 20Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 26Restore OnePlus 7 7T 7T Pro to Stock via Fastboot Commands - 14