Should I flash twrp? - Xiaomi Mi A1 Questions & Answers

I'm currently running magisk, I've been trying to do everything systemlessly but it's getting frustrating, failed boots, bugs, limitations... I want to stick with systemless so I can count on my warranty which I can get back with two commands. Now, my question is, how hard and risky is to get stock recovery and lock back the bootloader once twrp is installed. Another thing I'm concerned about is if OTA update kicks in, I uninstall magisk and update it and it fails, I'm stuck, can't get any data or backup. Twrp would help a ton and I'm pretty sure I can just flash the new OTA image from twrp. But how hard and risky is restoring factory phone image (system+bootloader+recovery) once lord twrp is installed?

Why do you need to install TWRP if you can just boot it from fastboot? Well, using Magisk and updating system is always a bit risky, they have a guide on how to update and temporary remove Magisk, but it is always recommended to do a full backup.
To restore your device to a stock state, you can use MiFlash or download the fastboot version of the ROM, inside there is a script that will wipe everything and relock the bootloader, leaving no traces of your voided warranty.

Daydreamaway said:
Why do you need to install TWRP if you can just boot it from fastboot? Well, using Magisk and updating system is always a bit risky, they have a guide on how to update and temporary remove Magisk, but it is always recommended to do a full backup.
To restore your device to a stock state, you can use MiFlash or download the fastboot version of the ROM, inside there is a script that will wipe everything and relock the bootloader, leaving no traces of your voided warranty.
Click to expand...
Click to collapse
That's great, and fastboot is always available no matter how corrupt the system is, right? What do you recommend for a full backup and what about allowing system modifications when twrp boots?

Related

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.

H918 on 10k. Had root. Lost it. Need to roll back and reroot?

I'm not sure what happened, but my phone lost root and couldn't boot into system due to a problem with encryption. I had to do a reset. I'm now on 10k with no TWRP or root.
I assume I need to roll back to 10p or 10i stock and re-root. However, I can't find the programs and the stock 10i or 10p files.
EDIT: Apparently, the firmwares site doesn't like Firefox. It wasn't showing any of the firmwares for download. I had to use a different browser.
I was able to roll back to 10p. Install TWRP, and flash 10k with Magisk.
I don't want to have whatever happened to me again. Does anyone know why I lost lost TWRP and had to reset?
Sizzlechest said:
I was able to roll back to 10p. Install TWRP, and flash 10k with Magisk.
I don't want to have whatever happened to me again. Does anyone know why I lost lost TWRP and had to reset?
Click to expand...
Click to collapse
Did you flash anything recently that may have caused you to lose root? if I'm not mistaken, if you flash a boot image without flashing root after that will cause you to lose root and if you boot without root it will restore your backup recovery partition removing TWRP. I've actually dd'd my recovery partition over the backup so this doesn't happen, but I'm sure there are other ways to lose root...
dimm0k said:
Did you flash anything recently that may have caused you to lose root? if I'm not mistaken, if you flash a boot image without flashing root after that will cause you to lose root and if you boot without root it will restore your backup recovery partition removing TWRP. I've actually dd'd my recovery partition over the backup so this doesn't happen, but I'm sure there are other ways to lose root...
Click to expand...
Click to collapse
I suspect the person "fooling around" with my phone was in the SuperSU app. The only potentially destructive thing in there would be full unroot since you can remove TWRP from there. It's just a theory. Even if you dd the recovery partition, how would you get it back without TWRP or root?
Sizzlechest said:
I suspect the person "fooling around" with my phone was in the SuperSU app. The only potentially destructive thing in there would be full unroot since you can remove TWRP from there. It's just a theory. Even if you dd the recovery partition, how would you get it back without TWRP or root?
Click to expand...
Click to collapse
from what I've gathered, there are two recovery partitions, one is the main and then there is another that's a backup. when you install TWRP it always installs to the main one leaving the backup intact. when recovery gets reset, it pulls it from the backup... however if it didn't and the main is messed up then you might be screwed

Bootloop after TWRP backup[Oreo]

I decided to upgrade to the latest Oxygen OS yesterday.
I had root, and TWRP Custom Recovery(3.2.1-0) and unlocked bootloader.
I unrooted, relocked bootloader and installed the latest full zip from oxygen os.
Then I unlocked bootloader and rerooted again and installed TWRP Recovery again.
Everything was working fine.
After everything was installed/restored I figured it would be good to take a nandroid backup, I took one and on reboot I get a bootloop to recovery.
I was able to reproduce this twice.
I think this has to do with something with fingerprint setup.
I'm a bit a loss on how to fix this without going trough a full wipe again.
I already tried wiping cache and dalvik, but no solution.
i had the same kind of issue. were you decrypted before?
If you are decrypted you need to flash the no verify zip. If you are encrypted try a dirty flash of OOS and Magisk. If you aren't using the most up to date version of Magisk that could have caused your problem. I've had no issues with Nandroid backup problems caused by fingerprint or pin security when using Codeworks or Blu Spark TWRP.
I was encrypted before and I am still encrypted.
I don't understand that taking a backup renders the phone unusable.
Restore fails with createTarFork() process ended with ERROR=255.
I made a clean flash(and locked bootloader) as it is a requirement for the latest OOS due to the upgrade to oreo.
Would it be possible to do a dirty flash with the full zip (I used: OnePlus5Oxygen_23_OTA_028_all_1801031502_04d7cc5.zip) and unlocked bootloader?
Secondly, I think I will try one of the suggested recoveries and see what it brings.

OTA Installation fails after restoring STOCK TWRP backup

Hi. I have a Moto G Plus US variant XT1644. I did a clean backup (stock ROM) when I was on NPJS25.93-14.7-3 (boot, system and data).
After that I installed many custom ROMs, all of which caused my phone to drain battery and heat up so I decided to go back to stock by restoring my backup.
After I restored my backup I instantly received a new update via OTA (build NPJS25.93-14.7-5). So in order to install it "officially" I grabbed a stock recovery.img (in this forum) and flashed it before tapping on INSTALL so that everything keeps unmodified before applying the update. But when it reboots and tries to install the update I get a message "Error!".
Please any help would be much appreciated.
1)When you took the TWRP backup, do you remember if swipe to allow modifications was allowed in TWRP? If so, then the system partition in your backup might be flagged as read write, which would prevent the OTA from flashing.
2)Is the recovery from the same build as NPJ25.93-14.7-3?
3)Do you have a custom logo.bin to hide the bootloader warning?
echo92 said:
1)When you took the TWRP backup, do you remember if swipe to allow modifications was allowed in TWRP? If so, then the system partition in your backup might be flagged as read write, which would prevent the OTA from flashing.
2)Is the recovery from the same build as NPJ25.93-14.7-3?
3)Do you have a custom logo.bin to hide the bootloader warning?
Click to expand...
Click to collapse
I think he can flash the 14.7 US Retail without deleting the Data Partition to get back to Stock and then do the OTA updates.
He can check this thread out:
https://forum.xda-developers.com/mo...e-security-patch-usa-february-t3745147/page15
echo92 said:
1)When you took the TWRP backup, do you remember if swipe to allow modifications was allowed in TWRP? If so, then the system partition in your backup might be flagged as read write, which would prevent the OTA from flashing.
2)Is the recovery from the same build as NPJ25.93-14.7-3?
3)Do you have a custom logo.bin to hide the bootloader warning?
Click to expand...
Click to collapse
1) I definitely took the backup after allowing modifications so this is probably why.
2) yes
3) no
Danny1976 said:
I think he can flash the 14.7 US Retail without deleting the Data Partition to get back to Stock and then do the OTA updates.
He can check this thread out:
https://forum.xda-developers.com/mo...e-security-patch-usa-february-t3745147/page15
Click to expand...
Click to collapse
Yeah, I´ve been following that thread. I will try to do that and try to make clean backups (without allowing modifications). BTW how should I make a backup of the recovery and bootloader with TWRP ? Thanks.
hernaner28 said:
1) I definitely took the backup after allowing modifications so this is probably why.
2) yes
3) no
Yeah, I´ve been following that thread. I will try to do that and try to make clean backups (without allowing modifications). BTW how should I make a backup of the recovery and bootloader with TWRP ? Thanks.
Click to expand...
Click to collapse
You don't have to flash TWRP, just boot to it. Use the command fastboot boot twrp-3.1.1.0-athene.img and keep it read only. Make a backup of the system and boot. Root with ElementalX and Magisk. Then use Flashify to backup recovery, if you have not flashed TWRP.

OTA updates with TWRP?

I really want to have TWRP installed on my device and have OTA, is there anyway I can achieve this, maybe a flashabe zip that updates the device?
Let's start from the scratch. Unlock the bootloader and grab latest recovery image. Put your device into fastboot mode. Now boot into recovery temporarily and don't flash twrp. Now go to Backup and take a backup of Boot partition (make sure it's completely virgin). Now you can flash twrp and Magisk if you wish. When an OTA comes in, just reboot to twrp and restore the boot partition. Now your device is free from twrp and magisk and ready to get OTA update. But make sure you don't play with build.prop or uninstall any System app or play with System partition.If you change anything on System partition, you need to un-change them before trying to get OTA update. Boot partition will only help you to get rid of twrp and magisk. But if you wanna play with System partition, it's better to take a complete nandroid backup the same way I told you.
Rowdyy Ronnie said:
Let's start from the scratch. Unlock the bootloader and grab latest recovery image. Put your device into fastboot mode. Now boot into recovery temporarily and don't flash twrp. Now go to Backup and take a backup of Boot partition (make sure it's completely virgin). Now you can flash twrp and Magisk if you wish. When an OTA comes in, just reboot to twrp and restore the boot partition. Now your device is free from twrp and magisk and ready to get OTA update. But make sure you don't play with build.prop or uninstall any System app or play with System partition.If you change anything on System partition, you need to un-change them before trying to get OTA update. Boot partition will only help you to get rid of twrp and magisk. But if you wanna play with System partition, it's better to take a complete nandroid backup the same way I told you.
Click to expand...
Click to collapse
So when I boot TWRP to backup the boot partition, I should keep read only?
ibooth2004 said:
So when I boot TWRP to backup the boot partition, I should keep read only?
Click to expand...
Click to collapse
Don't worry about it. When you boot into twrp (temporarily), just swipe to allow modification and head on to Backup and take a backup of boot partition. Thats it.

Categories

Resources