AndroidMedium

Removing Root Access on Android: Complete Guide

This guide details the process of removing root permissions (superuser) from any Android device. You will learn how to completely clean the system of root traces, install official firmware, and restore the device to its original state for updates and warranty service.

Updated at February 16, 2026
30-60 min
Hard
FixPedia Team
Применимо к:Android 10+Devices with unlocked bootloaderMagisk Manager 20+

Introduction / Why This Is Needed

Root access (superuser) on Android provides unlimited opportunities for customization and system management. However, it also has significant drawbacks: voiding the warranty, security risks, incompatibility with banking apps and services (Google Pay, Samsung Pay), and issues with receiving official OTA updates. This guide is intended for those who have decided to return their device to its "factory" state, remove all traces of root, and once again fully use all services. We will cover two main methods: a soft removal (for Magisk) and a full one (with reflashing).

Requirements / Preparation

Before starting, complete the following mandatory steps:

  1. Backup. All data on the device will be erased. Make a backup via Google Drive, to a computer, or to another cloud service.
  2. Battery charge. The battery level should be at least 80%.
  3. Computer with ADB/Fastboot. On your PC (Windows/Linux/macOS), you must have Android SDK Platform-Tools installed.
  4. Drivers. For Windows, install the correct USB drivers for your device (usually provided by the manufacturer or via PC Suite installation).
  5. Exact stock firmware. Find and download the exact version of the official stock ROM for your specific model and regional variant (e.g., for SM-G991B, not for SM-G991U). Use sources:
    • Official manufacturer websites (Samsung, Xiaomi, etc.)
    • Trusted communities (XDA Developers).
    • Important: The firmware must be unofficially unlocked if your bootloader was unlocked. Usually, the filename includes the tag unlocked or ENG.
  6. Unlocked bootloader. To flash stock ROM, the bootloader generally must remain unlocked. If it was locked, the process may become more complicated.

Step-by-Step Instructions

Step 1: Remove Magisk and Modules (Soft Method)

If you obtained root only through Magisk (without modifying the system partition), this step may be sufficient for many apps.

  1. Open the Magisk Manager app.
  2. Tap the three dots in the top right corner → Settings.
  3. Scroll down and select Uninstall Magisk.
  4. In the window that appears, choose Restore Images. Magisk will attempt to restore the original boot and system images.
  5. Confirm the action. The device will reboot.
  6. After reboot, the Magisk app will be gone. Ensure it is not in the list of installed apps.

⚠️ Important: This method does not remove traces in the system partition (if Magisk was installed in "Systemless Hostless" mode). For a complete cleanup from all traces (especially for banking apps), a full reflash (Step 2) is almost always required.

Step 2: Full Reflash with Stock ROM (Guaranteed Method)

This is the primary and most reliable method, which completely erases all system modifications.

  1. Boot into Fastboot (Bootloader) mode.
    • Power off the device.
    • Hold the key combination (usually Volume Down + Power) to enter Fastboot/Bootloader mode. Text and the Android logo will appear on the screen.
    • Connect the device to the computer via a USB cable.
  2. Check the connection. On the computer, open a terminal (cmd/PowerShell) and run:
    fastboot devices
    
    You should see your device's serial number. If not — install drivers or try a different cable/port.
  3. Extract the downloaded firmware archive. Inside, you will typically find files with the .img extension (images) or a ZIP archive for flashing via recovery.
  4. Choose the flashing method:
    • Method A (Recommended, if separate .img files exist): Flash the images in the correct order. Most commonly:
      fastboot flash boot boot.img
      fastboot flash recovery recovery.img  # optional
      fastboot flash system system.img
      fastboot flash vendor vendor.img      # for newer devices
      fastboot flash userdata userdata.img  # or just erase
      
      Order matters! Follow the instructions accompanying the firmware.
    • Method B (Via Fastboot update): If the archive contains a single large ZIP file (e.g., update.zip), copy it to the platform-tools folder and run:
      fastboot update update.zip
      
    • Method C (Via Recovery): If the firmware is meant for installation via Recovery (TWRP), copy the ZIP file to internal storage or an SD card. Enter Recovery (usually Volume Up + Power), perform a wipe (Data/Factory Reset), then Install and select the ZIP file.
  5. Data wipe (if not done automatically). After flashing, perform a full wipe of user data:
    fastboot erase userdata
    fastboot erase cache
    
    This ensures old data and cache do not affect the new system.
  6. Reboot. Run:
    fastboot reboot
    
    The device will reboot into the newly installed stock ROM. The first boot may take 5-10 minutes.

Step 3: Lock the Bootloader (To Return to Full "Stock")

After successfully reflashing, you can (and often should) lock the bootloader to fully restore warranty and stock compliance.

  1. Re-enter Fastboot mode (as in Step 2.1).
  2. Connect the device to the computer and ensure fastboot devices sees the device.
  3. Run the command:
    fastboot oem lock
    
    Or, for some devices (e.g., newer Google Pixel):
    fastboot flashing lock
    
  4. A warning will appear on the device. Use the volume buttons to select Yes and confirm with the power button.
  5. The device will reboot and start the bootloader locking process. After this, the bootloader will be locked, and you will not be able to flash arbitrary images without official permission.

⚠️ Caution: Bootloader locking is irreversible on most consumer devices. After this, you will not be able to unlock it again using standard methods. If you plan to use custom ROMs or root again in the future — skip this step.

Verification

  1. Root check. After fully setting up the device, install the Root Checker app from Google Play. Run it. If everything was done correctly, you will see the message: "No root permissions found" or similar.
  2. SafetyNet/Play Integrity check. Install the Play Integrity API Checker or YASNAC app. Run the check. A successful result is MEETS_BASIC_INTEGRITY and MEETS_STRONG_INTEGRITY (or DEVICE_CERTIFICATION). If you see MEETS_BASIC_INTEGRITY but not STRONG — there may be remnants in the vendor partition or an unofficial firmware is in use.
  3. Build check. Go to Settings → About phone → Build number. The end of the line should not contain words like magisk, root, test-keys, or similar. It should say release-keys.
  4. Update check. Go to Settings → Software update. The system should check for OTA updates from the manufacturer.

Potential Issues

  • Device stuck on logo (Bootloop).
    • Cause: Incorrectly flashed firmware (wrong model/region), corrupted archive, interrupted flashing process.
    • Solution: Re-enter Fastboot/Recovery and reflash the correct stock ROM. Ensure the firmware matches your exact model (e.g., SM-G991B instead of SM-G991U).
  • Error fastboot: command not found or device not found.
    • Cause: Platform-tools not installed/not in PATH, missing drivers, incorrect cable/port.
    • Solution: Reinstall Android SDK Platform-Tools, add the platform-tools folder to the system PATH variable (Windows) or use the full path to fastboot. For Windows, install drivers via android_winusb.inf from the extras\google\usb_driver folder inside the SDK, or use universal drivers (e.g., from PDAnet). Try a different USB port (directly on the motherboard, not through a hub).
  • Error FAILED (remote: 'device is locked') when trying to flash.
    • Cause: Bootloader is locked, and you are trying to flash an unofficial image.
    • Solution: Either unlock the bootloader using the standard method (if the manufacturer allows it), or find an officially signed stock ROM intended for a locked bootloader (often OTA updates in ZIP format for Recovery). Sometimes flashing via official Recovery (e.g., Samsung Odin) works.
  • Apps still detect root after a full reflash.
    • Cause: An unofficial (custom) stock ROM was used, which already contains modifications. Or an issue in the vendor/product partition (for Android 10+).
    • Solution: Find an official firmware from the manufacturer's website. Ensure you flash all partitions, including vendor and product. As a last resort, try flashing firmware for a different but adjacent regional variant (e.g., for Europe instead of Russia), then update back to your own via an official OTA.
  • Cannot lock the bootloader (fastboot oem lock does not work).
    • Cause: Some manufacturers (Samsung, Xiaomi on some models) use proprietary commands or require confirmation in a special menu on the device itself.
    • Solution: For Samsung, use fastboot oem lock-go or go to developer options and use the "OEM Unlock" toggle (to lock). For Xiaomi, you may need to enter a code in the dialer (*#*#717717#*#*) or use Mi Flash with the "Erase and lock" option. Research your specific model on XDA Developers.

F.A.Q.

Will removing root cause data loss?
Can I remove root without flashing the firmware?
Will I receive OTA updates after removing root?
Will Google Pay and other banking apps work after unrooting?

Hints

Preparation and Backup
Removing Magisk and Modules (if used)
Flashing Stock Firmware (Full Unroot)
Locking Bootloader (optional, for full stock compliance)
Initial Setup and Verification
FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community