Home > ROMs > Custom ROMs

How to Revert to Stock ROM from GSI ROM (Universal Guide)

In this tutorial, we will show you the steps to revert to stock ROM from GSI. This article is valid for all Android devices and all GSI ROMs.

Thanks to the open-source nature of Android. there are a plethora of things to try out. For newcomers, they could theme their device, apply tons of icon packs, try out custom launchers, etc. On the other hand, the tech geeks take this a step further and tweak their device OS in the form of the root, or even try an altogether different OS based on Android. The latter is possible via custom ROMs like LineageOS, HavocOS, etc. For these to happen, you need an unlocked bootloader, which you already be aware of.

But there exist some devices that don’t have many developments concerning these custom developments. Exynos devices are always the first in line to suffer. This is because unlike Snapdragon and up to an extent MediaTek, Exynos chipsets are closed source. Therefore, there isn’t much in line for the developers to get hold of its source code and hence they can’t carry out developments for the devices equipped with this chipset. Earlier, we used to have only Samsung devices suffer this fate, but now Motorola too has joined this bandwagon. Many of its devices lined up for Android One series comes with Exynos chipset under the hood.

So for all these devices, there exists a life savior in the form of GSI ROMs. Generic System Images have been made possible thanks to the Project Treble introduced by Google alongside Android Oreo. The best part about this is that even if there is no official support for your device, you could still flash these GSI ROMs onto your device. The only major prerequisite is that your device should be Project Treble.

Well, its obvious that your device is Project treble compatible otherwise you wouldn’t have landed on this page to revert your device to Stock ROM from GSI. So with all that mentioned, here are the required steps to carry out the said task. but before that please refer to the Prerequisites section.

How to Revert to Stock ROM from GSI

Let’s first check out the requirements that your device needs to fulfill before you begin with the instructions.

Prerequisites

  1. You should have a working TWRP installed on your device. Most of you would already be having the same. For those who flashed the GSI ROM using fastboot command, they need to flash the TWRP Recovery first.
  2. Download and install Android SDK and Platform Tools on your PC.
  3. Furthermore, download the stock firmware file for your respective device. from the below links. If you can’t find your device in the guide, do drop in your device name and we will add its stock firmware file.
    Download Stock Firmware File: OnePlus | Xiaomi and Redmi | Vivo | Oppo | Nexus and Pixel
  4. Also, make a complete backup of your Android device. Make sure to save all the files of your internal storage as well. This is because, in 99% of the cases, you DON’T have to wipe internal storage, but it is that 1% which requires wiping off internal. So to be on the safer side, it is always recommended to make a backup beforehand.

That’s it. Now follow the below steps to revert your device to Stock ROM from GSI

Instructions to Revert Back to Stock ROM from GSI

    1. First of all, boot your device to TWRP Recovery. To do so, use the hardware key combinations. The other method involves using the below ADB Command. But for that, you will have to enable Developer Options and then USB Debugging
    2. Furthermore installing Android SDK and Platform Tools is also needed.
    3. Once that is done, connect your device to PC via USB cable, head over to the platform-tools folder, and type in cmd in the address bar and hit Enter.
    4. This will open the Command Prompt. Finally, enter the below command to boot your device to TWRP Recovery:
      adb reboot recovery
    5. Inside the TWRP, head over to Wipe and select Advanced Wipe. Then select Data, Cache, Dalvik, and System. Now perform a right swipe to wipe the selected partitions.
      wipe partitions gsi stock
    6. Once that is done, head back to the TWRP Recovery. Now there are two approaches. If you have a Nandroid backup, then head over to the Restore option and select the latest backup. perform a right swipe to restore it.
    7. On the other hand, if you don’t have a Nandroid Backup head over to the Reboot screen and select Bootloader. This will boot your device to Fastboot Mode.
    8. Once it is booted to Fastboot/Bootloader mode, connect your device to PC via USB cable and follow the device-specific instructions to flash the stock firmware.
    9. For example, Xiaomi and Redmi devices could flash the stock firmware using Mi Flash Tool. On the other hand, OnePlus users could extract the stock firmware and double click on the flash_all.bat file. As per the Motorola users, we have detailed instructions, stock firmware files as well as the fastboot commands for all the Motorola devices.
    10. Now, wait for the process to finish. Once that is done, your device should automatically boot to the Android OS. if that doesn’t happen, reboot your device using the hardware key or use the fastboot reboot command.

Bootloop Fix

If while reverting to Stock ROM from GSI, you end up in a bootloop, then follow the below steps:

  1. Connect your device to PC via USB Cable.
  2. Now boot your device to fastboot mode. Since the device is in bootloop, adb/fastboot commands will not function in this state. Therefore, you will have to use the hardware key combinations.
  3. Most of the devices follow the Volume Up plus Power key combinations. However, that works when your device is in a switched-off state. In bootloop, it’s very hard to turn off your device.
  4. So for that, keep pressing the Volume Up and Power Key, and as when the device reboots, you should feel a slight vibration. At that instance, leave the Power key but keep pressing the Volume Up key. This should take you the Fastboot/Bootloader mode even if your device is in a bootloop state, with no OS installed!
  5. Next up, enter the below command. Do note that executing this command will wipe your entire device, even the Internal Storage, well you have already been warned before.
    fastboot -w
  6. The entire process should only take a couple of seconds. Your device may reboot to fastboot. Even if it doesn’t, not an issue. Just make sure it is in fastboot mode after the above command has been executed.
  7. Finally, flash the stock firmware using the steps mentioned in the above section and you will have successfully reverted to Stock OS from GSI.

Conclusion

So with this, we conclude the guide on how to revert to stock ROM or firmware from a GSI ROM. If you are stuck at any steps while executing the above steps, do let us know in the comments We will revert to you with a possible fix. On that note. here are some other such guides that you might be interested in:

Share: