How to Remove Root from Android – Simple Unroot Guide
In this article
Yes, you can remove root from an Android device by flashing the stock firmware or using the manufacturer’s official unroot tool, which restores the original system files and disables superuser access.
What You'll Need
- A computer running Windows, macOS, or Linux with internet access.
- A USB cable compatible with your phone.
- The exact stock firmware (factory image) for your specific device model, obtained from the manufacturer’s support site.
- Android SDK Platform‑Tools (adb and fastboot). Download from the official Android developer page.
- Battery level above 50% or a charger plugged in.
- Backup of personal data (photos, contacts, apps) because flashing will erase everything.
- Optional: bootloader unlock key if your device requires unlocking before flashing.
Step‑by‑Step
- Back up all important data. Use Google Backup, a cloud service, or copy files to your PC. Root removal will wipe the device, so a complete backup prevents data loss.
- Download the correct stock firmware. Locate the exact model number (Settings > About phone > Model number) and download the matching factory image from the OEM’s website. Do not use firmware for a different carrier or region.
- Install Platform‑Tools. Extract the downloaded zip to a folder you can easily access. Add the folder to your system PATH or keep it open in a command window for later steps.
- Enable Developer Options and USB debugging. Go to Settings > About phone, tap "Build number" seven times, then return to Settings > System > Developer options and toggle "USB debugging" on. Some devices also require "OEM unlocking" to be enabled.
- Unlock the bootloader (if required). Many manufacturers lock the bootloader after rooting. Open a command prompt in the Platform‑Tools folder and run:
adb reboot bootloader
When the device is in fastboot mode, execute:fastboot oem unlock(orfastboot flashing unlockon newer devices). Follow on‑screen prompts. This step wipes the device again. - Verify the connection. With the phone in fastboot mode, run:
fastboot devices
If the serial number appears, the PC communicates correctly. - Flash the stock images. Extract the factory image zip; it usually contains files like
boot.img,system.img,vendor.img, etc. In the command window, execute the flashing script provided (oftenflash-all.shorflash-all.bat) or run the commands manually, for example:fastboot flash boot boot.imgfastboot flash system system.imgfastboot flash vendor vendor.img
Repeat for any additional partitions listed in the OEM guide. - Relock the bootloader (optional but recommended). After flashing, you can relock to improve security. Run:
fastboot oem lock(orfastboot flashing lock). Note that relocking may fail if the system is not exactly the stock version. - Reboot the device. Execute:
fastboot reboot
The phone will boot into the fresh stock Android environment. - Confirm root is removed. Once the device starts, install a root checker app from the Play Store or open a terminal and type
su. The command should return "not found" or a permission error, indicating no superuser access.
Common Mistakes
- Downloading firmware for the wrong model or carrier, which can brick the device.
- Skipping the bootloader unlock step on devices that require it; flashing will fail with an "unauthorized" error.
- Using an outdated version of Platform‑Tools, leading to "command not found" or connection issues.
- Interrupting the flashing process by unplugging the USB cable or powering off the phone.
- Neglecting to back up data, resulting in permanent loss after the wipe.
Tips
- Keep a copy of the original firmware on an external drive; you may need it for future restores.
- Run
adb devicesbefore rebooting to ensure the PC still recognises the phone. - If the OEM provides a Windows flashing tool (e.g., Samsung Odin, LG Flash Tool), you can use it instead of fastboot for a more guided experience.
- After unrooting, clear the cache partition from recovery to avoid leftover root binaries.
- Disable any custom recovery (TWRP) before flashing, or flash the stock recovery image first.
Troubleshooting
Device not detected by fastboot. Try a different USB port or cable, install the latest USB drivers (Windows) or use sudo apt-get install android-tools-adb on Linux. Restart both the PC and the phone.
Fastboot commands time out. Ensure the bootloader is unlocked; a locked bootloader will reject flashing commands. Re‑enter fastboot mode and retry.
Bootloop after flashing. Boot into recovery (usually Power + Volume Up) and wipe cache and Dalvik cache. If the loop persists, re‑flash the firmware, making sure every partition file is present.
Unable to relock bootloader. Some manufacturers refuse to relock if the system image is not the exact version they shipped. Verify the firmware version matches the device’s original build number.
Root checker still shows root. A leftover SuperSU or Magisk file may remain in the /system partition. Perform a full factory flash again, ensuring the system.img is the unmodified stock image.
Frequently Asked Questions
Will unrooting void my warranty?
Most manufacturers consider a rooted device a warranty‑risk, but flashing the official stock firmware and relocking the bootloader restores the device to its original state, which usually satisfies warranty requirements.
Can I unroot without losing my apps and data?
Official stock flashes erase user data. Some OEM tools offer a “factory reset only” option that keeps apps, but root removal generally requires a clean wipe.
Do I need a custom recovery to unroot?
No. A custom recovery like TWRP is optional; the official fastboot method works with the stock bootloader alone.
Is there a one‑click unroot app?
Some manufacturers provide an official unroot utility in their support apps, but it only works on devices that were rooted with the same tool. For most cases, flashing the stock image is the reliable method.
What if my device is bricked after flashing?
Enter the device’s emergency download mode (often accessed by holding Power + Volume Down) and use the OEM’s flashing software to reinstall the firmware. If that fails, contact the manufacturer’s support.