OnePlus devices have always to be stand out among the crowds when it comes to custom development. However, it is with its sixth iteration that the OEM was well and truly highlighted. Up to this date, the device is receiving quite active support in custom development. With tons of custom ROMs, the ability to flash custom kernels, or a custom recovery like TWRP, well goodies are in order. Along the same lines, you could also root your device. This could be done directly via TWRP or without TWRP– by flashing the patched boot,img file. Once you do so, you could then flash Magisk Modules, Xposed Frameworks, Substratum Themes, among others. However, all these tweaks do bring in some associated risks as well. If not done correctly, then it might lead to a few issues. The most general ones include the device getting into a boot-looped or a soft-brick. If that ever happens to your device, then you have landed at the right place. Given here are the detailed instructions to restore your OnePlus 6/6T device to stock OxygenOS by flashing the Stock ROM via Fastboot Commands. Follow along for the detailed instructions.

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 6/6T 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 6/6T device to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

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

First and foremost, you will have to boot your OnePlus 6 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 6/6T device to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

STEP 2: Download OnePlus 6/6T Stock OxygenOS ROM

Now head over to the OnePlus Support Forum and download the latest OxygenOS for your OnePlus 6. The firmware would be in ZIP format. If you see the firmware in JAR format, then simply use the 7 ZIP, WinZIP, WinRAR, etc 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 3: Extract OnePlus 6 /6T 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 6 payload.bin file. Let’s now proceed to the next step to restore your OnePlus 6/6T device to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

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

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 5: Restore OnePlus 6 Stock ROM via Fastboot Commands

Here are the required Fastboot commands to restore your OnePlus 6/6T 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. If you are doing just a normal upgrade, then you could skip this command. On the other hand, if you are fixing bootloop/softbrick or are coming from a custom ROM, then you will have to execute this command. Then the 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. Or you could also execute the fastboot reboot command to boot to the OS (only do so after all the files have been flashed and your device has been rebooted to Fastboot).

Android 10 Commands

Android 11 Commands

Upon downloading and extracting the OnePlus 6 Android 11 (OxygenOS 11) firmware, here are the files that you will get, as shown in the below image. We will be flashing these files onto your device via Fastboot Commands to restore your OnePlus 6/6T device to stock OxygenOS. So without any further ado, let’s get started.

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. 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 6/6T device to stock OxygenOS by flashing the Stock ROM via Fastboot Commands.

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 6 6T to Stock via Fastboot Commands - 14Restore OnePlus 6 6T to Stock via Fastboot Commands - 92Restore OnePlus 6 6T to Stock via Fastboot Commands - 62Restore OnePlus 6 6T to Stock via Fastboot Commands - 75Restore OnePlus 6 6T to Stock via Fastboot Commands - 81Restore OnePlus 6 6T to Stock via Fastboot Commands - 49