• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Effects of factory reset of a rooted device

kumaranil13k

Well-Known Member
Question : what are effects of factory reset while in rooted condition of mobile

In my lyf water 7 mobile device having 16gb internal memory and 2 gb ram and 64gb external sd card

I had first factory rest my mobile with and formatted my external sd card with no user apps or data installed then I decided to root it and before that want to take a backup

I had loaded twrp recovery (fastboot boot twrprecovery.img) in bootloader mode and took NANDROID backup of system boot cache userdata through twrp backup menu and through adb pull tool all partitions backup of mmcblk0 and system boot recovery userdata and all in other partitions in devices.

Then In twrp menu install menu I installed superuser .apk after installing succesfully I rebooted to android 5.1.1 rooted version

Through root checker i checked the rooting status ita good

Then I download link2sd plus modified parched .apk file which installed successfully and to open it asked to grant root permission for 15 minutes and disappeared and I tried to locate its icon in main menu or front wall but no success. I thought to uninstall but there is no mark in any settings>apps installed or running list

I tried to find in root folders but it's hidden or disappears name there to


I m wooried it's not any virus malware or spyware apk file which asked executed or hidden .. I thought to factory reset to erase that hidden apk file of link2sd

My queries:-

1. How to find and erase that hidden apk file aftermarks or settings

2. Should I format or factory reset the mobile as su was installed or I should first unroot or clear su before factory reset will it erase that malware hidden aftermarks

3. If I don't not remove or unroot SU and factory reset the mobile then will after factory reset I have to re root or install SU again or it will be rooted or unrooted automatically after factory reset format withing rooting
 
did you make a nandroid backup? just restore that.

and a factory rest may unroot depending on the method you used to root. if you use SU to gain root permission which affects system partition, then a reset will not unroot the phone. if you flashed magisk, than it is possible it might unroot the phone.

https://www.quora.com/Will-a-rooted-Android-phone-gets-unrooted-after-a-factory-reset

from the first post by Shane Britton:
Yes, performing a factory data reset can most certainly remove the root binaries on your Android device, thus “unrooting” it. But, this largely depends on the type of exploit and methodology used to root your phone. The older methods of system-mode rooting, mainly seen on devices running Android 5.1.1 and earlier, were not affected by a factory data reset, as long as the SU daemon and corresponding binaries were correctly injected in the /system partition. A factory data reset wipes /userdata, /cache & typically the Dalvik-ART runtime directories. Thus, /system is not affected and the Android OS survives root after the factory data reset.

Since the rollout of Android 6.0 (and Android 5.1 in some Samsung devices), the Android open source code was significantly overhauled, and verified boot security (dm-verity), while not new to Android, was implemented by many device manufacturers. Also, with the birth of the Google Pixel series, the new A/B partition index added much difficulty to the orthodox methods of rooting. A way needed to be found to install root binaries to the Android OS without altering the /system partition in any way, shape or form. XDA Senior Developer Chainfire introduced “systemless” rooting to the Android community. Using this method, a root script is flashed via custom recovery. The stock boot image is unpacked, patched, repacked, and the patched boot image is flashed to the /boot partition. As a result, full root of the Android OS is achieved without touching the /system partition. While systemless rooting is more efficient and safer than the older method, it has its negative points as well — the main ones being that it typically will not survive a factory data reset or manual update of the OS. But this isn't really much of a problem, and as long as you have custom recovery, simply flashing the root script will again give you superuser access.

the other post by Noel Carson is very informative as well:
Before the answer, here's a head's up to rooting-

Almost all Android phones come with the administrator rights off. So, though the phone is yours, many features of the Linux OS kernel (that lies beneath Android) are locked away. This is done to prevent a user/ an app from uninstalling important drivers for the camera, buttons etc. It also improves security by restricting the access apps may have.

Rooting your phone unlocks these features and gives the user and app the required access to perform certain tasks. The most common ability used is, one that allows you to un-install pre-installed applications (bloatware) that can't be done using the regular method to uninstall apps.

The Answer:
Depending on the software version or how your manufacturer interprets a 'factory reset', you may or may not lose root access.

A manufacturer may incorporate the following methods to perform a factory reset:

1. By deleting the user data and cache partitions: This only deletes all the data on your phone. But the software essentially is in the same condition. This type of factory reset would not unroot your device.

2. By deleting the system, user data and cache partitions and reinstalling the system partition (with the last updated software). As you may now imagine this would definitely unroot your device as the software reinstall would undo the root hacks.

It is preferred that most phone providers use the second method as this helps eliminating any software malfunctions that cause faults/ errors on your phone. But recently most manufacturers are moving towards the first method of performing a factory reset
 
@ocnbrze bro thanks a lot for ur reply sharing your time knowledge opinion suggestions to obliged grateful to you.

did you make a nandroid backup? just restore that.

and a factory rest may unroot depending on the method you used to root. if you use SU to gain root permission which affects system partition, then a reset will not unroot the phone. if you flashed magisk, than it is possible it might unroot the phone.

https://www.quora.com/Will-a-rooted-Android-phone-gets-unrooted-after-a-factory-reset

from the first post by Shane Britton:

the other post by Noel Carson is very informative as well:

@ocnbrze bro I don't want to unroot I just want to erase the effect of malware modified link2sd plus patched app installed which is not showing it unistaller to...and again want to root...I mean to say that if I factory reset then will it erase all aftermarks of malware spyware or bloatware any virus.....and if I factory rest then the system files again will it be rooted (will contain su roote previlages) or i have to root it again . Or install su again after flashing restoring nandroid backup.
 
Well if you read the posts....... it will depend on how you rooted will determine if you have to re- root the phone, after doing the factory reset. And yes a factory reset will erase the malware, if that is what you have.
 
Well if you read the posts....... it will depend on how you rooted will determine if you have to re- root the phone, after doing the factory reset. And yes a factory reset will erase the malware, if that is what you have.
@ocnbrze bro yes I know magisk root by writing in boot partition and super user and other method write on system partition and twrp on recovery partition ...but kingoroot iroot one click write a bulk of files garbage files....but super user user writes minimum files ....but I foud magisk procedure little complicated it patches the boot.img and that boot image it patch is provided from 3rd party can we patch our original adb pull .../mmcblck0p24/ boot.img file self copied by. I doubt the 3rd party boot.img may not be modified so is did not used it

@ocnbrze bro thanx for telling factory reset will erase malware spyware virus but what about after factory reset new fresh os loaded files installed will have super user booted files as super user was installed in system partition...or is should factory reset after unistalling unrooting super user...and reinstall re-root after factory reset..
Or first recover twrp backup the nandroid backup which way should I go...
 
Back
Top Bottom