[Solved] Revert OnePlus 7 Pro to official stock ROM

Hi all,

I’m selling my OnePlus 7 Pro and would like to revert it back to the factory state.

I’ve got the european model a.k.a. GM1913 or GM21BA.

However, I haven’t been able to flash the official stock ROM that can be downloaded from oneplus.com.

I’ve followed similar steps like I did when I installed /e/ and I also read thru another topic in this category.

I get error 7, error code kInstallDeviceOpenError when I try to install the ROM I push or sideload using ADB or choose from withing TWRP.

Do I need to relock the bootloader or how to solve this?

I’m also thinking maybe I should modify the manifest file, like suggested in many xda-developers articles. Also most people seem to run the flash all bat, but I’m on Mac and cannot do that.

I know nothing about the procedure to factory reset a OnePlus but I’m just wondering :

How can it be factory reset (so without TWRP but with a stock recovery) if you try to install it with TWRP ?

I do not know the device from personal experience. But if I read the following text, a back to StockROM via TWRP seems possible.

There are two simple and easy methods to install stock ROM on OnePlus 7 Pro. The first method makes use of stock recovery while the other depends on the custom TWRP recovery.

Stock ROM using Stock or TWRP Recovery on OnePlus 7 Pro

If your device has custom TWRP recovery installed, then you can install the stock ROM easily using the above zip files. Here is a quick step-by-step guide which you can follow.

  1. Move the downloaded zip file to your external sd card.
    Note: An external SD card is very important for this guide to work.
  2. Power off your OnePlus 7 Pro and boot into the recovery mode by pressing and holding Volume Down + Power key for a couple of seconds.
  3. Once you’re into custom recovery, you should see tabs like Install, Wipe, Backup, Restore on the screen. Now, go ahead and tap on the install button.
  4. Now, select the “ Install from SD card ” option. Select the downloaded recovery-flashable zip file on your sd card.
  5. Once selected, just swipe right on the slider that says “ Swipe to confirm flash “. This will begin the stock ROM installation process. It should take a couple of minutes.
  6. You can now clear the cache memory and can reboot the device.

You should now see the system setup screen of Oxygen OS. Congratulations! You have successfully installed the stock OxygenOS ROM on OnePlus 7 Pro .

1 Like

Thanks for your message :slight_smile:

This is a very good point :slight_smile:

I probably need to find another way to do the flashing without TWRP. If I remember correctly, I tried adb push oneplus-ota.zip too, but it ended in an error too.

Hi and thanks for the step-by-step guide! I’ll go and get an SD card and give this a try :slight_smile:

In my device, there is no memory card slot :frowning: I’ll try if I can use an USB stick instead.

Hey,
it’s correct. The OnePlus 7 Pro has a Dual SIM support but no MicroSD slot.

I assume Point 4. “ Install from SD card ” means the internal /SDcard (see picture point 5.)

I would try out …

  1. Download Stock OxygenOS package for your OnePlus 7 Pro.

  2. Move the data to your phone’s “Internal Storage” > /sdcard partition.

  3. Boot your OnePlus 7 Pro into TWRP recovery mode.

  4. Go to ‘Wipe’ → ‘Advanced Wipe’ and select the ‘Dalvik/ART Cache’, ‘System’, and ‘Data’ checkboxes. Then swipe the ‘Swipe to Wipe’ button to wipe the current /e/ OS customROM completely.

TWRP-Wipe-CustomROM

  1. Go back to TWRP menu and tap on ‘Install’ in TWRP and select the OxygenOS full ROM package on /sdcard (e.g. OnePlus7Oxygen*.zip)

  1. Once installed, go back to the TWRP main menu.

  2. Finally, press the ‘Reboot’ button now.

Please note: I personally would try it this way. But I can’t guarantee that it will work for you.

Hi and thanks for all the time and efforts you already have spent in helping me :slight_smile:

Unfortunately I got same error than yesterday, please see the following picture:

I was wondering maybe I should try a different version of TWRP? Currently I’m using twrp-3.3.1-4-guacamole.img. I’m not sure if I need to install twrp-installer-3.3.1-4-guacamole.zip.

According to the installation instructions of /e/ OS the TWRP version twrp-installer-3.3.1-4-guacamole.zip is the right one.


Only as a supplement: Partitions in the Android system

The default partitions under Android are as follows:

/boot
/system
/recovery
/data
/cache
/misc

In addition, the external microSD card (if present in the respective device) can also be divided into the following partitions: /sdcard

The /sdcard partition is actually only present if the device has an SD card. Sometimes this partition exists without a physical SD card, because part of the lush main memory is simply integrated into the system as an SD card.

As soon as a real SD card is inserted into the system, it becomes available as /external-sd partition (the name of the SD card partition on such devices differs, for example, Samsung calls it /sdcard/sd).

I copied OnePlus7ProOxygen_21.E.21_OTA_021_all_1910071445_89e89c225a754eb6.zip to a USB drive, rebooted into recovery mode (without TWRP I suppose :)) and tried to install the zip file. I got a bit further:

My next step is to find a package that is new enough :slight_smile:

What’s interesting is that
1572830503 equals “Thu Nov 07 2019 17:43:09 GMT+0200 (Eastern European Standard Time)” and
1570429970 equals “Thu Nov 07 2019 17:44:13 GMT+0200 (Eastern European Standard Time)”

I assume /e/ ROM was e-0.7-p- dev build on your OnePlus 7 Pro. I would first try to install a version of 9-Pie of Oxygen as well. Later, upgrading to Oxygen using Android 10 would be easy. What do you think?

Yes, you assumed correctly.

I tried to install version 9, but failed with a similar error:

Not sure what should be fixed in order to proceed.

If the installation via TWRP doesn’t work, then flash tests via ADB FASTBOOT will have to be the next step, right? …

I managed to reinstall the stock ROM :slight_smile: Thanks for your help :slight_smile:

Congratulations! How did you do it?

Hi @JustAnEUser good to hear that your issue is resolved. In the screenshot the last message mentions that the build you were trying to flash was old.
Pl can share details as to which stock build did you finally flashed to resolve the issue and where did you download it from?
The information would be helpful to other users who want to revert to stock.

Unfortunately, I didn’t write down the exact steps :frowning: I probably did something like this:

I ran fastboot flash boot twrp-3.3.1-4-guacamole.img,

I uploaded latest v9 custom ROM I was able to found from forums to TWRP directory using android-file-transfer app,

I ran fastboot reboot,

From the TWRP UI I chose Install and then selected the uploaded stock ROM zip file,

Once the install was finished, I chose Reboot device in the TWRP UI,

I ran trough the OnePlus initial setup process and booted device in fastboot mode,

I ran fastboot oem lock,

I re-ran the OnePlus initial setup and choose Upgrade to v10 like suggested by the OP Update app.