/e/OS to Stock ROM on your smartphone using GNU/Linux - OnePlus Edition

Mission:

To revert back to original or stock ROM provided by OEM for your OnePlus smartphone.

Prerequisites:

  • A OnePlus smartphone running /e/OS with complete backup of important data on a PC or an external drive or source.
  • Downloaded copy of latest stock ROM from OnePlus’s website. (For the purpose of this guide OnePlus 5 aka. cheeseburger is used.)
    image

Let’s roll.

Warning: This process will completely wipe all data in the internal storage of your smartphone, please make sure you have a full backup of critical data on your smart phone.

1. Install Android ADB & Fastboot tools

Debian GNU/Linux is used for the purpose of this guide. Kindly change the commands and package names, if any for your distribution

Open Terminal app to execute the following command:

$ sudo apt-get install android-tools-adb android-tools-fastboot

When done check with adb version command to verify. A result as follows shall appear on your terminal screen.

Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5

2. Enter recovery mode on your smartphone when powered off with Volume Down + Power Button

Open ‘Wipe’ and select ‘Advanced wipe’. Select the Dalvik/ART Cache, System, Data, and Cache options. Then swipe the button on the bottom of the screen to wipe your smartphone data.

image

Navigate to ‘Advanced’ to tap ‘ADB Sideload’, then swipe to begin sideload.

From your GNU/Linux terminal, navigate to folder where you have downloaded the .zip Android ROM file. Execute the following command to sideload the freshly downloaded Android ROM from your OEM’s website.

adb sideload Downloads/OnePlus5Oxygen_23_OTA_054_all_2002242016_1fd6cbd4606e44cf.zip

Please replace the file path and name accordingly, which is ~/Downloads/OnePlus5Oxygen_23_OTA_054_all_2002242016_1fd6cbd4606e44cf.zip for the purpose of this guide.

It will start the transfer and eventually finish as follows on GNU/Linux PC terminal.

serving: 'Downloads/OnePlus5Oxygen_23_OTA_054_all_2002242016_1fd6cbd4606e44cf.zip' (~47%) Total xfer: 1.00x

On your smartphone ADB Sideload Complete Successful notification appears.

Tap ‘Reboot System’ therein to continue.

When asked to install TWRP App, kindly select ‘Do Not Install’ if you do not wish to try custom Android based ROMs ever again.

Let your smartphone reboot with stock ROM and stock recovery.

3. Optionally, lock your smartphone’s bootloader too.

Enter stock recovery mode on your smartphone when powered off with Volume Down + Power Button

Use Volume keys to navigate to English and press Power button to continue.
image

Navigate to Advanced and press Power button to continue.

Select ‘Reboot to fastboot’ both times to continue.
image

As you can see the bootloader is unlocked
image

Attach your smartphone’s USB cable to GNU/Linux PC again to execute the following command therein to lock your bootloader finally.

fastboot oem lock

Select ‘LOCK THE BOOTLOADER’ and press Power Button to continue.

image

Finally, you have a stock experience on your OnePlus device again without any bootloader warning as seen in the image below.

image

Voila! You have successfully to restored your OnePlus 5 aka. cheeseburger smartphone to latest stock or original ROM from OnePlus.

Thanks for reading!

3 Likes

Hello.

First sideloaded install for me ; works fine, thank you !

  1. may add an “adb devices” check before beginning the install protocol (?),
  2. ‘Connect with USB then power off and’ enter Recovery mode etc.
    After wipe, '‘Come back to main menu with ‘back arrow’ then’ navigate to Advanced etc.

After taping ‘Reboot system’ I had a warning ‘No system installed, are you sure etc. ?’ I tried and /e/ tooks a looooong time to boot, but it’s the e-0.9-n-20200602-UNOFFICIAL-surnia expected :slightly_smiling_face:

No asking to install TWRP (already installed as an app on my e-0.7-n). :shushing_face:

Thanks again for this tuto, mister ‘man is how to maker’ :wink:

1 Like