LOGO

How to Unroot Your Android Phone

April 8, 2016
How to Unroot Your Android Phone

Reversing Root Access on Your Android Device

Having achieved root access on your Android phone unlocks a wealth of advanced features and customization options. This grants capabilities beyond those available to standard users.

However, circumstances may arise where you wish to remove root access – a process known as unrooting. This is perfectly achievable, and we will guide you through the necessary steps.

Reasons to Unroot Your Android Phone

Several motivations can prompt a user to unroot their device. Security concerns are a common factor, as rooting can potentially introduce vulnerabilities.

Furthermore, the need for root access may diminish over time as your preferred customizations become less reliant on it. Other reasons include preparing a device for resale or seeking warranty service.

Successfully downloading and installing over-the-air (OTA) updates often requires a device to be unrooted. Whatever the cause, the unrooting process is generally straightforward with the correct knowledge.

Important Note: Understanding the process is key to a successful unrooting experience.

Is Unrooting Difficult?

Unrooting your Android device isn’t typically a complex undertaking. However, it's crucial to proceed with caution and follow instructions carefully.

The specific method for unrooting will vary depending on how you initially rooted your device. Different rooting methods require different unrooting procedures.

Related: Does Rooting or Unlocking Void Your Android Phone's Warranty?

Reversing Root Access on Your Android Device

Similar to the various approaches to rooting an Android phone, several methods exist for unrooting it. The appropriate technique will depend on the specific device model, the Android version installed, and the desired outcome of the unrooting process. Generally, unrooting involves one of several key procedures.

  • Simply Rooted Phones: If the only modification made was rooting the device, and the original Android version remains unchanged, unrooting is often straightforward. Utilizing an option within the SuperSU application can remove root access and restore the device’s stock recovery environment. Detailed instructions for this method are provided in the initial section of this guide.
  • Devices with Custom ROMs or Xposed Framework: If modifications extend beyond simple rooting – such as installing a custom ROM or utilizing the Xposed Framework – the system has likely been altered significantly. In these cases, a complete return to the factory stock condition is typically required for successful unrooting. Specific procedures vary by device, and detailed instructions for each are beyond the scope of this guide, though general guidance is offered in the concluding section.

The process appears uncomplicated, doesn't it? However, the SuperSU method doesn't consistently yield perfect results. It may fail to execute correctly, or it might be unable to reinstate the stock recovery. When this occurs, manual unrooting methods can be employed:

  • Nexus & Developer Edition Phones (Marshmallow): Should the SuperSU method prove unsuccessful, manually unrooting can be achieved by re-flashing the device’s boot.img file. As this file is the primary component modified during rooting on Marshmallow-based devices, replacing it and subsequently re-flashing the stock recovery should resolve the issue. This process is detailed in the second section.
  • Nexus & Developer Edition Phones (Lollipop & Earlier): If SuperSU fails, devices running Lollipop or older Android versions can be manually unrooted by deleting the su binary file. This file grants root access on these older systems; its removal, followed by re-flashing the stock recovery, should complete the unrooting process. Instructions are found in the third section.
  • Non-Developer Edition Phones: If the SuperSU method is ineffective and the device is not a Developer Edition model, a more drastic approach is usually necessary. This involves a complete wipe of the device and restoration to its original factory settings to remove root access. As with custom ROMs, specific procedures differ by device and are discussed in the final section.

The following sections will cover each of these methods, with varying levels of detail. Readers should navigate to the section that corresponds to their device, Android version, and specific situation.

How to Remove Root Access from Virtually Any Android Device Using SuperSU

SuperSU stands as the most widely used and dependable application for managing root access on Android devices. For users with rooted phones, it’s highly probable that SuperSU is employed to control which applications are granted superuser privileges. It also represents the most straightforward method for quickly unrooting an Android device, as the entire procedure is executed directly within the application on the phone itself.

The initial step to completely unroot your device involves launching the SuperSU application, typically found within your app drawer.

how-to-unroot-your-android-phone-1.jpg

Upon opening the app, navigate to the Settings tab, either by swiping or tapping. Scroll down to the "Cleanup" section and select the "Full unroot" option.

how-to-unroot-your-android-phone-2.jpg

A dialog box will appear, outlining the implications of the unroot process and requesting confirmation to proceed. If your device utilizes the traditional rooting method – commonly found on Android Lollipop or earlier versions – this constitutes the sole necessary step. Selecting "Continue" will initiate the unrooting process, requiring a subsequent reboot to finalize it.

how-to-unroot-your-android-phone-3.jpg

For devices rooted using the systemless root method in Marshmallow or later, choosing "Continue" will prompt another dialog. This dialog asks if you wish to restore the original boot image, emphasizing its necessity for receiving OTA (over-the-air) updates. If you intend to download the latest Android updates as they become available, or if you are preparing to sell or give away the device, selecting "Yes" is recommended.

how-to-unroot-your-android-phone-4.jpg

The subsequent screen may inquire about restoring the stock recovery image. If you are currently using a custom recovery and plan to utilize OTA updates, this option is essential – choose "Yes" to proceed. Alternatively, if you anticipate re-rooting the device in the future or wish to retain your custom recovery for features like nandroid backups, select "No".

how-to-unroot-your-android-phone-5.jpg

Following this, SuperSU will uninstall itself and clear any remaining files associated with the rooting installation. This entire process is typically completed within seconds, after which the device will reboot. Upon completion of the reboot, the device should be fully unrooted and, contingent upon the selections made during the unroot process, returned to a completely stock configuration.

How to Manually Remove Root Access from a Nexus or Other Developer Device Running Marshmallow

Although utilizing the SuperSU method for unrooting should generally suffice for devices rooted via a systemless approach, understanding an alternative procedure is beneficial. This is particularly useful when SuperSU encounters difficulties in fully removing root access.

Essentially, the process involves a straightforward flash—replacing the currently installed, modified boot image with the original, stock version.

This guide uses a Nexus 5 as an example; however, the steps remain largely consistent across all Nexus devices. Users with developer edition phones from other manufacturers may find slight variations in the process.

The initial step requires downloading the factory image specifically designed for your device. Google provides these images for Nexus devices, while other manufacturers typically offer them for their respective products.

Upon completing the download of the factory image, the next action is to extract the contents of the package.

how-to-unroot-your-android-phone-6.jpg

Within the initial archive, you’ll discover another compressed package. This package also needs to be unzipped.

how-to-unroot-your-android-phone-7.jpg

This second package contains the bootloader image, radio files (if applicable), and various scripts used to flash the complete Android build. The crucial file—boot.img—is located within the final .zip archive, typically named “image-<device name>-<build number>.zip”. Extract this final package.

how-to-unroot-your-android-phone-8.jpg

On your phone, enable Developer Options by navigating to Settings > About phone and repeatedly tapping the Build Number seven times. Notifications will indicate the remaining taps needed to “become a developer.”

how-to-unroot-your-android-phone-9.jpg

Once Developer Options are activated, return to the previous settings menu. A new “Developer options” entry will appear just above “About phone.” Select “Developer options.”

how-to-unroot-your-android-phone-10.jpg

Scroll down the menu until you locate “USB Debugging” and toggle it on using the slider.

how-to-unroot-your-android-phone-11.jpg

A warning message will appear, detailing the functionality of USB debugging—confirm by selecting “OK” to enable this feature.

how-to-unroot-your-android-phone-12.jpg

Connect your device to your computer using a USB cable. Provided the correct drivers are installed, a prompt should appear on your device asking for permission to allow USB debugging from the connected computer. If using your personal computer, check the “Always allow from this computer” box for future automatic debugging permissions. Tap “OK.”

how-to-unroot-your-android-phone-13.jpg

On your computer, if you have adb configured in your system PATH, Shift+Right Click within the folder containing the extracted factory image files and choose “Open a command window here.”

how-to-unroot-your-android-phone-14.jpg

If adb is not in your system PATH, copy the boot.img file and place it into your adb folder—typically C:\Android\platform-tools. Then, Shift+Right Click anywhere within this folder and select “Open a command window here” after the file has finished copying.

how-to-unroot-your-android-phone-15.jpg

Enter the following command to reboot your device into the bootloader:

adb reboot bootloader

how-to-unroot-your-android-phone-16.jpg

Once your phone reboots into the bootloader, execute the following command, which should complete within a few seconds:

fastboot flash boot boot.img

how-to-unroot-your-android-phone-17.jpg

If the goal is to receive OTA updates or return the phone to a completely stock configuration, flashing the stock recovery is also necessary. This can be accomplished with the following command:

fastboot flash recovery recovery.img

how-to-unroot-your-android-phone-18.jpg

Finally, reboot into Android using this command:

fastboot reboot

how-to-unroot-your-android-phone-19.jpg

The phone will restart, and root access will be removed. The stock Android recovery will be restored, while the remainder of your system will remain unchanged. If you intend to sell or dispose of the device, a factory reset can now be performed.

How to Manually Unroot a Nexus or Other Developer Device on Lollipop (or Older)

For devices featuring a modified /system partition, unrooting via SuperSU is generally the preferred method, as it comprehensively cleans up all changes made during the rooting process. However, if a manual approach is desired, it requires more meticulous steps than simply flashing the boot.img, as is done with systemless methods.

Fortunately, the entire unrooting procedure can be completed directly on the device, eliminating the need for a computer connection.

Preparing Your Device

First, you will need a file manager capable of root access—ES File Explorer is a popular choice, though most root explorers will suffice.

Within ES File Explorer, access the side menu by swiping in from the left edge of the screen. Scroll down to locate the "Root Explorer" option and toggle it to the on position. The SuperUser application installed on your device should then prompt you to grant the file manager root permissions.

how-to-unroot-your-android-phone-20.jpg

Navigating the System Files

Once root access is granted, navigate to the /system folder. Using ES File Explorer, tap the dropdown menu labeled "Homepage" and select the "/ Device" option.

how-to-unroot-your-android-phone-21.jpg
how-to-unroot-your-android-phone-22.jpg

Within the primary device partition, scroll down and open the "/system" folder.

how-to-unroot-your-android-phone-23.jpg

Locating and Removing the "su" File

The location of the "su" file, which we will delete, depends on how your device was originally rooted. It will be found in either /system/bin or /system/xbin. Begin by checking the former.

how-to-unroot-your-android-phone-24.jpg

If the "su" file is not present in /system/bin, navigate back using the back arrow and open the "xbin" folder. The file should be easily identifiable as there are typically few files within this directory.

how-to-unroot-your-android-phone-25.jpg

Deleting or Moving the "su" File

To completely unroot your device, long-press the "su" file and select the trash icon to delete it.

how-to-unroot-your-android-phone-26.jpg

Alternatively, if you only need to temporarily unroot for an OTA update, cut the file by long-pressing and selecting the scissors icon. Then, navigate to the /sdcard/ folder by returning to the primary "/ Device" partition and opening the "sdcard" folder. Paste the file here using the paste icon.

how-to-unroot-your-android-phone-27.jpg
how-to-unroot-your-android-phone-28.jpg

Removing the Superuser Application

With the "su" file addressed, return to the /system folder and open the "app" folder.

how-to-unroot-your-android-phone-29.jpg

Locate the SuperUser application. If you are using SuperSU, it will be found in a folder named "SuperSU." If you are using a different SuperUser app, you may need to search for it. It might also be directly named "superuser.apk" within the folder.

how-to-unroot-your-android-phone-30.jpg

Once found, long-press the file and either delete or cut it, similar to the "su" file.

If you cut the file, paste it into the /sdcard/ folder for safekeeping.

Verifying Unroot Status

After completing these steps, use an application like Root Checker to verify that your device is no longer rooted.

how-to-unroot-your-android-phone-31.jpg

Restoring Stock Recovery

Next, you must restore Android’s stock recovery. This requires downloading the factory image for your device, which is provided by Google for Nexus devices and by the manufacturer for other devices.

Unzip the downloaded factory image package.

how-to-unroot-your-android-phone-32.jpg

Inside, you’ll find another package containing the bootloader image, radio (if applicable), and scripts for flashing the full Android build. Extract the recovery.img file from within.

how-to-unroot-your-android-phone-33.jpg

Preparing Your Phone for Flashing

On your phone, enable Developer Options by navigating to Settings > About phone and tapping the Build Number seven times. Notifications will indicate how many taps remain.

how-to-unroot-your-android-phone-34.jpg

Return to the parent settings menu to find the newly enabled “Developer options” menu. Tap “Developer options.”

how-to-unroot-your-android-phone-35.jpg

Enable “USB Debugging” using the slider.

how-to-unroot-your-android-phone-36.jpg

A warning message will appear; tap “OK” to enable USB debugging.

how-to-unroot-your-android-phone-37.jpg

Flashing the Recovery Image

Connect your device to your computer via USB. If the drivers are installed correctly, a prompt will appear on your device asking if you want to allow USB debugging from the connected computer. If using your personal computer, check the “Always allow from this computer” box and tap “OK.”

how-to-unroot-your-android-phone-38.jpg

On your computer, open a command window in the folder containing the factory image files. If adb is in your system PATH, Shift+Right Click and select “Open a command window here.”

how-to-unroot-your-android-phone-39.jpg

If adb is not in your system PATH, copy the recovery.img file to your adb folder (e.g., C:\Android\platform-tools) and then Shift+Right Click in that folder and choose “Open a command window here.”

how-to-unroot-your-android-phone-40.jpg

Enter the following command to reboot your device into the bootloader:

adb reboot bootloader

how-to-unroot-your-android-phone-41.jpg

Once your phone has rebooted into the bootloader, run the following command to flash the recovery image:

fastboot flash recovery recovery.img

how-to-unroot-your-android-phone-42.jpg

Finally, reboot your device into Android with the following command:

fastboot reboot

how-to-unroot-your-android-phone-43.jpg

Your phone will reboot, and you will have successfully removed root access and restored the stock recovery. If you intend to sell or dispose of the device, a factory reset is recommended at this point.

Restoring Your Device to Factory Settings

If you have installed a custom ROM or are utilizing the Xposed framework, a complete device wipe and re-flash to a factory-fresh, unrooted state is necessary. This method also serves as a reliable way to remove root access from phones that aren't Nexus or Developer Edition models when standard SuperSU methods prove ineffective.

The restoration process differs significantly based on the manufacturer, and even varies between individual devices. Therefore, detailed instructions for each device are beyond the scope of this guide. We recommend consulting resources like the XDA Developers forum for specific guidance tailored to your phone model. However, here’s a general overview of the process for several manufacturers:

  • Nexus and Developer Edition Devices: Restoring these devices is relatively simple. Download a factory image from Google or the manufacturer, similar to the manual unrooting process described earlier. Then, flash all the files within the image to your phone. A comprehensive guide for manually flashing Nexus devices is available.
  • Samsung Devices: Obtaining the complete firmware file is the first step, readily available for most devices on Sammobile.com. The process involves using a PC program called "Odin," which is generally user-friendly. Prioritize finding a trustworthy guide specific to your device.
  • Motorola Devices: Motorola employs "RSD Lite" to transfer image files to devices, but official images aren't typically provided for non-developer models. While copies exist online, ensure you download from a reputable source.
  • LG Devices: LG utilizes a dedicated "Flash Tool" to install device-specific KDZ files. This process can be complex, so verifying the source and guide is crucial.
  • HTC Devices: HTC offers a comparatively straightforward flashing experience, using "RUU" (ROM Update Utility) files. These can be applied using simple adb and fastboot commands, or by placing the RUU file on the /sdcard partition and booting into the bootloader. Locating the correct RUU for your phone is essential.

Providing detailed instructions for every phone model is impractical. This highlights the advantages of Nexus and Developer Edition devices. Nevertheless, with diligent research, you should be able to unroot and restore most phones to a functional, stock condition.

#unroot android#android unroot#remove root#factory reset#android phone#root access