How to Go Back to Stock Android From a Custom ROM: 3 Ways

Want to remove a custom ROM and get your Android phone back to its original state? This is the easiest way to get your phone back to stock.

There are many reasons you might want to revert your rooted phone back to stock Android. Selling it or making a warranty claim are the biggest. But you also need to do it if you want to install a system update. Or perhaps you've installed so many tweaks and mods that you just want to get back to some semblance of normality.

In this guide, we'll take a look at the three main ways to get back to stock Android. Whether that means going fully unrooted with a locked bootloader or just reverting to the stock ROM but keeping root access, you'll find an option that works for you.

1. Restore a Nandroid Backup

The quickest way to revert your phone back to its stock ROM is to restore your Nandroid backup. Assuming you have an up-to-date one available, this shouldn't result in much—or any—data loss.

A Nandroid backup is a full system backup created in the recovery. You should create one every time you flash a new ROM or install any kind of mod. It's the first tool you should use if you ever need to unbrick your phone.

A Nandroid backup creates a complete snapshot of your phone: the operating system, apps, data, and everything else. Restoring it, therefore, restores the ROM you were using at the time. If you have a backup you took when using the stock ROM, then you're set.

That said, using a Nandroid backup to return to stock is only a short-term option. The backup will restore your old apps and data, meaning that apps you've uninstalled will reappear, and text messages you've since received will disappear. If your Nandroid backup is more than a day or two old, you might want to keep it for emergencies only.

How to Restore a Nandroid Backup

Thankfully, the steps to restoring a Nandroid backup are relatively straightforward:

  1. Boot your phone into your custom recovery. We recommend TWRP.
  2. Select Restore. You'll see a list of all the available backups.
  3. Pick a backup made using the stock ROM.
  4. Select the partitions you want to restore. Normally, this means you should check all the boxes.  
  1. Finally, swipe the bar labeled Swipe to Restore. It takes a few minutes to complete, then you can reboot.


That gets you back to your stock ROM. To go the whole way, you need to unroot your phone as well.

How to do this depends on what app you used when rooting. If you used SuperSU, for example, go to the Settings tab, select Full Unroot, then reboot your phone again. It will now be unrooted.

Finally, you might want to relock your bootloader as well. How you do this will vary between devices. The most common method is to use Fastboot with the command fastboot oem lock or fastboot flashing lock.

Re-locking the bootloader wipes your device entirely. You should only do it if you absolutely need to, like if you're sending your phone for a warranty repair or selling it.

2. Flash a Stock ROM

If restoring a Nandroid backup isn't a viable option, then your next best bet is to flash a stock ROM. This comes with the added inconvenience that you will probably need to perform a factory reset along the way, so will need to go through the process of backing up and restoring your Android data.

There are benefits of going from a custom ROM to a stock ROM, too. You might be able to find a pre-rooted version of the ROM. Flashing ROMs is also really easy to do.

The biggest obstacle to using a ROM to revert to stock is that you're relying on someone else to create the ROM for you. If you have a popular phone with an active community on the XDA Developers forums, then this won't be a problem. If you own a lesser-known device, a stock ROM may be harder to find.


The exception is if you own a OnePlus device. In this case, you can download a flashable stock ROM direct from the OnePlus website.


How to Flash a Stock ROM

Our guide to installing a custom ROM gives you all info you need. For a quick refresher, here are the steps:

  1. Find a stock ROM for your phone. Go to the XDA Developers forums and locate the forum for your device. Stock ROMs are often found in stickied posts at the top of the development boards.
  2. Download the ROM to your phone.
  3. Back up all your data.
  4. Boot into recovery.
  5. Select Wipe to factory reset your phone. This is optional (if you don't want to bother with backing up and restoring), but you may encounter bugs or even get stuck in a bootloop if you don't do it. Swipe the bar to begin the wipe.
  6. From the recovery home screen, select Install and navigate your way to the stock ROM you downloaded.
  7. Swipe the bar to begin installation. You can reboot your phone when it's finished.

If you downloaded a pre-rooted stock ROM and want to keep it that way, you're now good to go. If you used a non-rooted ROM and want to get back fully to stock, all you need to do now is re-lock the bootloader. Remember that this will wipe your phone.

3. Flash a Factory Image

The ultimate method for getting your phone back to stock is to flash a factory image. This reverts your phone almost to the state it was in when you first unboxed it. All you need to do afterward is lock the bootloader, and your device will be completely factory fresh.


Factory images come directly from the device manufacturers, and many don't release them. Google and Motorola are among the major companies that do. It's normally possible to get factory images from Samsung and LG, but you may need to download them from third-party sites.

And where they are available, they're also more difficult to install than either of the other methods we've outlined. Some require a manual approach using the ADB and Fastboot tools with the command line. Some, like Samsung or HTC, use their own software.

Despite the obstacles, flashing a factory image is the best option if you ever need to completely reset your device. It can also serve as the nuclear option if you've bricked your device and no other methods to fix it are working.

How to Flash a Factory Image

The procedure to flash a factory image can differ from one device to another. In the case of a Pixel, the steps are simple:

  1. Download and set up the ADB and Fastboot tools.
  2. Download the factory image from the Android website. Unzip the download on your desktop.
  3. Connect your phone via USB and boot into Fastboot mode.
  4. Launch the Command Prompt or Terminal app.
  5. At the command prompt, run flash-all.bat on Windows, or flash-all.sh on macOS or Linux.
  6. Wait for it to finish, then reboot.

That will take you to a stock, unrooted ROM, with stock recovery as well. Lock the bootloader, and you'll be completely back to normal.

Other phones might have different instructions. You'll usually find them outlined on the same site where you downloaded the images from. Just remember that in most cases, flashing a factory image will completely wipe your phone.

Reinstall the Stock Firmware

Getting back to stock uses the same techniques used to install ROMs and mods in the first place. If you're accustomed to working with a rooted phone, there should be nothing in this guide that's peculiar or alarming.

Once you've downloaded the original software or found an appropriate backup of your own, the process should take no more than a few minutes.

Remember that running the stock firmware for your phone is not the same as running stock Android itself—it still includes the skin, apps, and other tweaks your phone's manufacturer has added. There are some benefits to running stock Android itself, however, that are well worth exploring.


Next Post Previous Post
No Comment
Add Comment
comment url