Hard reset After magisk root - Xiaomi Mi A1 Questions & Answers

Hi all.
I'm here to ask you how should i do to hard reset my Mi A1 (actually rooted with magisk) without lose root.
It's a really simple question, but i can't find a simple and definitive answer!
Thank you in advance, and Sorry if i made a question that have been already made.
Bye,
Carmine

In theory, root will stay intact (Magisk is already in boot.img which doesn't get altered during Factory reset) - you will just have to reinstall Magisk manager app.
In reality, I would un-root, perform factory reset and re-root afterwards. Magisk stores some of its data on /data partition, which gets formatted during factory reset. It might cause some unexpected issues.
Your call..

Related

[D803] Does doing a factory reset remove root? (applied via IORoot22)

As per thread title, I was wondering if performing a factory reset removes root? I do not yet have a custom recovery, and the local stock KitKat OTA update is going out soon. I was considering holding off on the custom recovery and taking the OTA update, but my understanding is that doing so rooted will cause problems so I'm not about to try.
Basically, just how "reset" is the "factory reset" - and do the factory reset options in the Settings>Backup and Reset do the same thing as the Factory Reset from Power+VolDown boot?
root stays
Um, I'm pretty sure you lose root.
Your phone gets reset to factory default, which is no root...
And yes, it's the same as doing it from stock recovery or from the settings

three questions about Nexus 6P

hi guys,
please i have some questions i really need there answers:
1- (rooted phone) if i do a factory data reset will the root gone and the TWRP also ?
2- (rooted phone) is there a way to install an update if i got it ( like update security patches "monthly" ) on rooted phone without wipe data or loosing the root or TWRP?
3- (rooted phone) if i reinstall the factory image full,the root and TWRP will have gone or not ?
thanks a lot !
1. If you use systemless root a factory reset will remove it. If you use a root method that modifies the system partition a factory reset won't remove root. Factory resets will not remove TWRP.
2. Installing monthly security updates and keeping TWRP, root, and data can be done by manually installing the update using fastboot and doing the following:
-Systemless root method: flash everything EXCEPT the recovery, boot, and userdata images.
-System based root method: install everything EXCEPT the recovery and userdata images. You will have to reflash Superuser/SuperSU (whichever you prefer) in TWRP since flashing the system image will remove root. There's no way around this.
3. If you use fastboot to install everything included in a factory image you will lose root, data, and TWRP.
Face_Plant said:
1. If you use systemless root a factory reset will remove it. If you use a root method that modifies the system partition a factory reset won't remove root. Factory resets will not remove TWRP.
2. Installing monthly security updates and keeping TWRP, root, and data can be done by manually installing the update using fastboot and doing the following:
-Systemless root method: flash everything EXCEPT the recovery, boot, and userdata images.
-System based root method: install everything EXCEPT the recovery and userdata images. You will have to reflash Superuser/SuperSU (whichever you prefer) in TWRP since flashing the system image will remove root. There's no way around this.
3. If you use fastboot to install everything included in a factory image you will lose root, data, and TWRP.
Click to expand...
Click to collapse
Could you explain me what are the difference between systemless root method and system based root method, in order to get know what is it the method that I used
Chouiyekh said:
Could you explain me what are the difference between systemless root method and system based root method, in order to get know what is it the method that I used
Click to expand...
Click to collapse
If you are running Marshmallow or Nouget and used a version of SuperSU that is a year or less old it does system less root by default.
You can flash OTA updates on a rooted device with FlashFire without using a computer.
You can also flash an OTA image in TWRP and then simply flash root after, before you boot the phone. If the phone boots without root, out will wipe TWRP and leave you with stock recovery.
But honestly, from the questions being asked, you might not want to try this stuff until you understand it better. Losing root and TWRP is not a big deal. You can flash them again in about 1min and 30 seconds, so it's not worth worrying about.
Sent from my Nexus 6P using Tapatalk
Why would factory reset remove systemless root? I expect factory reset to only reset what you're supposed to have changed since factory image. That is /data.
Systemless must be in /data if it's not in /system, right? I don't really know much about systemless, because I don't use Android pay, Snapchat or play children's games haha.
But my guess is that if it's not touching system, then it must be in data, so wiping data would remove it. But I'm just guessing.
Sent from my Nexus 6P using Tapatalk
HikingMoose said:
You can also flash an OTA image in TWRP and then simply flash root after, before you boot the phone. If the phone boots without root, out will wipe TWRP and leave you with stock recovery.
But honestly, from the questions being asked, you might not want to try this stuff until you understand it better. Losing root and TWRP is not a big deal. You can flash them again in about 1min and 30 seconds, so it's not worth worrying about.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
thank you, i got it easily because i'm not a beginner i have some experience
HikingMoose said:
Systemless must be in /data if it's not in /system, right?
But my guess is that if it's not touching system, then it must be in data, so wiping data would remove it. But I'm just guessing.
Click to expand...
Click to collapse
You guessed right. Never thought of that, thought it was actually all done from boot partition.
Quoting Chainfire:
As the binaries should still be updatable, and we don't know the space we have available in the boot image itself, we're mounting a (writable) ext4 image with /su as mount point from /data, and modifying PATH accordingly. Interestingly, for reasons yet unknown to me, if the image is mounted r/o by init, later remounting it r/w causes a bunch of issues. So we're keeping it r/w (for root) for now.

[SOS] - Data recovery after factory reset

Hi all,
is there a possibility to retrieve my data (aka contacts, photos) after factory reset? I know that rooting the device may void my warranty.
I've tried about 10 recovery software, but root was requested and "soft" root modes like iRoot were unsuccessful.
Can you help me?
Thanks
Always make a backup. If the only problem is getting root then go to the TWRP thread and then install the Magisk zip from TWRP (http://tiny.cc/latestmagisk)

Mi A1 Forced Encryption

I'm sorry if this is posted again but I can't find anything about my problem.
My Mi A1 in unrooted.
I had installed gcam without rooting it to continue receiving OTA, after the latest update I wanted to disable gcam. During the process the application unlocked the bootloader but didnt lock it again.
When I disabled it after the reboot my phone did a factory reset and enrypted itself. I want to decrypt my phone so I used some ways I found on the internet like:
Simple factory reset.
Locked bootloader.
Factory reset again, even though after the lock it did it itself.
Flashed fastboot stock rom.
Flashed twrp read only, wiped system and flashed fastoboot stock rom again!
Still the phone forced encrypt itself after every way I tried:
For gcam I used this way: https://forum.xda-developers.com/mi-a1/how-to/tool-google-camera-root-magisk-enable-t3747585
I didn't check the thread because I already had the app to do the installation.
For fastboot installation I used this: https://forum.xda-developers.com/mi-a1/how-to/ota-official-fastboot-image-n2g47h-7-12-t3728929
EDIT: What if I unlock the bootloader with MiUnlock and relock it via fastboot?
Phone is encrypted by default. Why would you want to have it decrypted? But if you insist.. you have to install magisk, disable forced encryption and reformat data partition in TWRP.
Locking or unlocking the bootloader after May update wipes your data, this is normal for Android and now our phones.
Encryption is default, it would have been encrypted before the wipe as it is now after the wipe, why do you want it unencrypted?
kudos1uk said:
Locking or unlocking the bootloader after May update wipes your data, this is normal for Android and now our phones.
Encryption is default, it would have been encrypted before the wipe as it is now after the wipe, why do you want it unencrypted?
Click to expand...
Click to collapse
Thank you very much, I never experienced this again after unlocking so I thought it was because of the encrypt, I hadn't checked if it was encrypted before the wipe and I assumed it wasn't.
_mysiak_ said:
Phone is encrypted by default. Why would you want to have it decrypted? But if you insist.. you have to install magisk, disable forced encryption and reformat data partition in TWRP.
Click to expand...
Click to collapse
I didn't know the phone was encrypted by default.
Thank you for the possible way though.
Yeah, it is encrypted by default and hw encryption is used. So don't think that it can affect your performance in any way.
_mysiak_ said:
Phone is encrypted by default. Why would you want to have it decrypted? But if you insist.. you have to install magisk, disable forced encryption and reformat data partition in TWRP.
Click to expand...
Click to collapse
After reformatting data partition, do I need to do anything else?
ubmit said:
After reformatting data partition, do I need to do anything else?
Click to expand...
Click to collapse
Keep Magisk installed, otherwise it will probably get encrypted again by stock boot image. Not sure, I didn't try it.. I want my data secure.

Question about Factory Reset

I'm rooted and have twrp installed, if I do a factory reset in System, Reset Options, Erase all data/Factory Reset. Will there be any issues with regards to a soft brick or will the phone boot back up to where it should as if it's a new phone?
I would highly recommend a Backup of persist and efs Partition.
If you have twrp installed you must factory reset in twrp. Doing it in settings will cause the phone not to boot, unless you flash stock recovery.
Remove any saved fingerprints and backup your persist partition before you factory reset. Otherwise your FP could potentially break and you'll have to RMA.
byAidan said:
Remove any saved fingerprints and backup your persist partition before you factory reset. Otherwise your FP could potentially break and you'll have to RMA.
Click to expand...
Click to collapse
It's already broken. I was hoping a factory reset might fix it. But being rooted and having twrp installed hopefully will not screw up the phone if I do a factory reset?
Gordietm said:
It's already broken. I was hoping a factory reset might fix it. But being rooted and having twrp installed hopefully will not screw up the phone if I do a factory reset?
Click to expand...
Click to collapse
Do you have twrp installed permanently or are you just fastbooting into it?
If you have stock recovery you can factory reset from the system like you said and you will go back to stock with no root (bootloader will still be unlocked though).
Does your fingerprint say "enrollment failed" or something similar? If so it's very unlikely you'll be able to fix it yourself without a persist partition backup unfortunately
byAidan said:
Do you have twrp installed permanently or are you just fastbooting into it?
If you have stock recovery you can factory reset from the system like you said and you will go back to stock with no root (bootloader will still be unlocked though).
Does your fingerprint say "enrollment failed" or something similar? If so it's very unlikely you'll be able to fix it yourself without a persist partition backup unfortunately
Click to expand...
Click to collapse
I have twrp installed permanently.
And my fingerprint says " fingerprint registration error".
Gordietm said:
I have twrp installed permanently.
And my fingerprint says " fingerprint registration error".
Click to expand...
Click to collapse
Yes this is not fixable by a factory reset, the only way to fix ....
1)Flash your Persist.img backup (if you have one)
2)RMA your device for repair.
I have the same issue, was going to RMA but to lazy so just reverting to good ol'.swipe.
No no updates will fix the issue unfortunately.
Duncan1982 said:
Yes this is not fixable by a factory reset, the only way to fix ....
1)Flash your Persist.img backup (if you have one)
2)RMA your device for repair.
I have the same issue, was going to RMA but to lazy so just reverting to good ol'.swipe.
No no updates will fix the issue unfortunately.
Click to expand...
Click to collapse
Ok, thanks.
Gordietm said:
Ok, thanks.
Click to expand...
Click to collapse
I had that but I was lucky and it was just magisk canary issue. After switching to stable 20.4 finger print worked again
pyry666 said:
I had that but I was lucky and it was just magisk canary issue. After switching to stable 20.4 finger print worked again
Click to expand...
Click to collapse
Switching back to stable didn't work for me. To hats why I thought a factory reset might work. I haven't tried it yet though.
Gordietm said:
Switching back to stable didn't work for me. To hats why I thought a factory reset might work. I haven't tried it yet though.
Click to expand...
Click to collapse
Dont think that it will help..I have backed up my persit.img just in case..
I have a persist IMG backup.
But how and mostly WHEN I have to load it to avoid fingerprint enrollment problem?
I suppose this must be done after removing root and before relocking bootloader. But it's only a supposition.
Thanks in advance.
Inviato dal mio SM-F700F utilizzando Tapatalk
fmotta said:
I have a persist IMG backup.
But how and mostly WHEN I have to load it to avoid fingerprint enrollment problem?
I suppose this must be done after removing root and before relocking bootloader. But it's only a supposition.
Thanks in advance.
Inviato dal mio SM-F700F utilizzando Tapatalk
Click to expand...
Click to collapse
You only need to restore it if you get the failure which is not certain.
The basic thing is you have your back up which is great, lots of people don't.
Hi,
question regarding efs backup, are these the correct partitions (found them for the OPO7pro)?
adb shell
su
dd if=/dev/block/sdf2 of=/modemst1.bin bs=2048
dd if=/dev/block/sdf3 of=/modemst2.bin bs=2048
Thanks
Just did a factory reset and that didn't work. Might be a stupid question, but can I restore the persist backup from someone else's phone?
Gordietm said:
Just did a factory reset and that didn't work. Might be a stupid question, but can I restore the persist backup from someone else's phone?
Click to expand...
Click to collapse
No

Categories

Resources