OTA updates with TWRP? - Xiaomi Mi A1 Questions & Answers

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.

Related

Should I flash twrp?

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?

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.

Wifi Wi-Fi is broken after restore backup data and system with TRWP, solutions?

hi guys
after restoring twrp backup (data and system)
WIFI is broken, no way to make it work again, even restoring persist backup from twrp or flashing the original persist
not either deleting file contect of wifi_mac.bin in root/persist
does anyone know how to make wifi working again after TWRP restore of data and system?
differently TWRP is totally useless for backup in Mi A2 at the current state.
Espmic86 said:
hi guys
after restoring twrp backup (data and system)
WIFI is broken, no way to make it work again, even restoring persist backup from twrp or flashing the original persist
not either deleting file contect of wifi_mac.bin in root/persist
does anyone know how to make wifi working again after TWRP restore of data and system?
differently TWRP is totally useless for backup in Mi A2 at the current state.
Click to expand...
Click to collapse
flash the original boot.img from the same system version installed in your device.
If V9.6.15.0.ODIMIFE, download the same OTA image version package, unzip it, get only boot.img and use fastboot to flash it into your device.
fastboot flash boot_b boot.img
fastboot flash boot_a boot.img
I hope this works
Espmic86 said:
hi guys
after restoring twrp backup (data and system)
WIFI is broken, no way to make it work again, even restoring persist backup from twrp or flashing the original persist
not either deleting file contect of wifi_mac.bin in root/persist
does anyone know how to make wifi working again after TWRP restore of data and system?
differently TWRP is totally useless for backup in Mi A2 at the current state.
Click to expand...
Click to collapse
Flash this kernel from temp twrp. https://forum.xda-developers.com/mi-a2/development/kernel-hex-t3855773
It worked for me.
Tnx man. After flash kernel magisk doesn work.
How do i reinstall magisk now? You Need the "patch boot Image" method in order to support OTA. But boot Image now is not stock, cause It s updated with the new kernel so i cant use the official boot.img , should extract the new One from My device? How?
Or should i flash magisk 17.1 from TWRP? But still cant, because TWRP install s It in Active slot offline TWRP (at the moment) and not in the needed boot partition.
****, help It s getting too annoying ahahah
Espmic86 said:
Tnx man. After flash kernel magisk doesn work.
How do i reinstall magisk now? You Need the "patch boot Image" method in order to support OTA. But boot Image now is not stock, cause It s updated with the new kernel so i cant use the official boot.img , should extract the new One from My device? How?
Or should i flash magisk 17.1 from TWRP? But still cant, because TWRP install s It in Active slot offline TWRP (at the moment) and not in the needed boot partition.
****, help It s getting too annoying ahahah
Click to expand...
Click to collapse
Download the magisk zip and boot into twrp and just flash it. You can switch the partitions in twrp and flash magisk. Just don't reboot twrp after switching the partitions.The latest twrp from Tingyichen can be downloaded from this thread.
https://forum.xda-developers.com/mi-a2/development/recovery-unofficial-twrp-recovery-mi-a2-t3825146
the command is fastboot boot twrp-3.2.3-jasmine-20181020.img and it goes straight into twrp with no flashing required.
booting directly in twrp with command and without flashing it in any partion caused me bootloop and data wipe, also have read this in another thread (twrp one)
Did you use the latest one from 20/10?

[Help] Stuck in fast boot- boot loader after restoring twrp backup?

[Solved (look at bottom of post)]
so, hopfully this is in the right place.
Following the procedure I've done on my nexus 6p many times over; I created a TWRP backup on my 6t then tried restoring the backup I made with twrp and when it finished I pressed reboot to system. The device then only booted into twrp. I saw it was on the "a" partition and I knew I was previously on the b partition so I manually switch partitions and now I'm stuck in fastboot boatloader I have tried flashing a temp twrp.img but im getting an error "FAILED (remote: 'Failed to load/authenticate boot image: Load Error')" in fastboot
After that I switched active partition in fast boot and got into twrp but my data appears to be encrypted and after restoring sys,data,efs,vendor (skipping boot as it holds the recovery now) I only have fast boot in both a/b partitions. I'm going to try to fast boot twerp then install twerp permanently and see if i can get a wotking twrp if not then ill have to get a factory image to get back to stock but was hoping to get some data off but whatever..
I'm kind of new to this a/b partition setup. any help is appreciated.
Edit: for future reference All I was doing was trying to restore a backup? how do I restore a backup on an a/b partition system? As far as I know I did it right...
1) remove lockscreen pin ect..
2) backup boot,sys,ven,data
When restoring
1) mount partitions
2) select restore backup and restore all .....
What am I missing?
____
Solved:
twrp for 6t is borked when it comes to backing up/ restoring...
The version in question: twrp-installer-fajita-3.2.3-1.zip
I restored my 6t to stock with msmdownloadtool and reinstalled twrp then made a test backup. After restoring it I was left in a twrp bootloap and encrypted data partition.
I don't think you should ever need to manually switch slots.
If you are on slot A, and flash an update, it will install to slot B. When you restart your phone, it will automatically switch to B for you.
Also, you shouldn't be flashing the TWRP.img, but booting it instead.
You could try starting fresh with the msmdownloadtool which is found in these forums.
fireeyeeian said:
[Solved (look at bottom of post)]
so, hopfully this is in the right place.
Following the procedure I've done on my nexus 6p many times over; I created a TWRP backup on my 6t then tried restoring the backup I made with twrp and when it finished I pressed reboot to system. The device then only booted into twrp. I saw it was on the "a" partition and I knew I was previously on the b partition so I manually switch partitions and now I'm stuck in fastboot boatloader I have tried flashing a temp twrp.img but im getting an error "FAILED (remote: 'Failed to load/authenticate boot image: Load Error')" in fastboot
After that I switched active partition in fast boot and got into twrp but my data appears to be encrypted and after restoring sys,data,efs,vendor (skipping boot as it holds the recovery now) I only have fast boot in both a/b partitions. I'm going to try to fast boot twerp then install twerp permanently and see if i can get a wotking twrp if not then ill have to get a factory image to get back to stock but was hoping to get some data off but whatever..
I'm kind of new to this a/b partition setup. any help is appreciated.
Edit: for future reference All I was doing was trying to restore a backup? how do I restore a backup on an a/b partition system? As far as I know I did it right...
1) remove lockscreen pin ect..
2) backup boot,sys,ven,data
When restoring
1) mount partitions
2) select restore backup and restore all .....
What am I missing?
____
Solved:
twrp for 6t is borked when it comes to backing up/ restoring...
The version in question: twrp-installer-fajita-3.2.3-1.zip
I restored my 6t to stock with msmdownloadtool and reinstalled twrp then made a test backup. After restoring it I was left in a twrp bootloap and encrypted data partition.
Click to expand...
Click to collapse
I'm currently stuck in TWRP with encrypted data after restoring a backup. I didn't know you couldn't restore backups on this phones. That sucks. I guess I'm going to have to start over now. That really really sucks.
imucarmen said:
I'm currently stuck in TWRP with encrypted data after restoring a backup. I didn't know you couldn't restore backups on this phones. That sucks. I guess I'm going to have to start over now. That really really sucks.
Click to expand...
Click to collapse
Yup, I felt the same.. it's a huge bummer especially when you get it all set up and perfect. Use msm to fix it if you can't use twrp. Hopefully twrp gets fixed soon (I'm really surprised I can't find more people who have noticed this or even twrp team talking about it) for now Im waiting for proof it works on the op6t. I even tried to use Chainfire's flashfire to make a backup and.. no it doesn't work.
fireeyeeian said:
Yup, I felt the same.. it's a huge bummer especially when you get it all set up and perfect. Use msm to fix it if you can't use twrp. Hopefully twrp gets fixed soon (I'm really surprised I can't find more people who have noticed this or even twrp team talking about it) for now Im waiting for proof it works on the op6t. I even tried to use Chainfire's flashfire to make a backup and.. no it doesn't work.
Click to expand...
Click to collapse
I think I just hard bricked my phone. https://forum.xda-developers.com/oneplus-6t/help/bricked-phone-t3914413
imucarmen said:
I think I just hard bricked my phone. https://forum.xda-developers.com/oneplus-6t/help/bricked-phone-t3914413
Click to expand...
Click to collapse
Use Msm download tool:
https://www.google.com/amp/s/forum....-msmdownloadtool-v4-0-oos-9-0-5-t3867448/amp/
I think that's the right post but make sure it matches your device. I used msmdownloadtool around 6 time just testing twrp and only had one hiccup where Msm wasn't detecting my one plus 6t but I eventually got it working.
use the other twrp unofficial but problem you had with would be fixed with big file system fat32 can't do it right
ecompton59 said:
use the other twrp unofficial but problem you had with would be fixed with big file system fat32 can't do it right
Click to expand...
Click to collapse
Could you post a link to it and are you sure? I used the unofficial version so which one are you talking about? I'd really not like to have to re-setup my daily driver from scratch.
https://forum.xda-developers.com/on...overy-unofficial-twrp-touch-recovery-t3861482 your using early version of twrp the black one is made by same guy download unofficial twrp.zip not twrp.img reboot recovery flash twrp.zip then magisk it may work if not then format data (erases phone) then twrp,magisk reboot recovery to see if it stuck I flash magisk again when it starts up go to magisk thread get the manager 18.1 don't insall it
ecompton59 said:
https://forum.xda-developers.com/on...overy-unofficial-twrp-touch-recovery-t3861482 your using early version of twrp the black one is made by same guy download unofficial twrp.zip not twrp.img reboot recovery flash twrp.zip then magisk it may work if not then format data (erases phone) then twrp,magisk reboot recovery to see if it stuck I flash magisk again when it starts up go to magisk thread get the manager 18.1 don't insall it
Click to expand...
Click to collapse
Which one? I've tried the 3.2.3.28 last and restoring didn't work. Should I try the most recent installer in the list? And can you confirm that backup&restoring works on the one plus 6t? Also is there anyway to backup my phone without twrp before I try this? I'd really would not like to have to use msm again?
sorry that didn't help format data then flash twrp then magisk should boot without msm
---------- Post added at 01:06 PM ---------- Previous post was at 12:52 PM ----------
i had to use extfat format on htc 8gb backup to get it to work maybe devs will fix that
Has there been an improvement on twrp for the 6t yet? Just curious if I can rely on a backup is there any updates?

[STOCK PIE (march)] Will I get my data wiped if I hotboot TWRP?

Hello, I've been trying to root my phone, I followed a guide that tell me to
Code:
fastboot flash twrp.img
and got all my data wiped for some reason. LATER, i found out that you souldn't be doing that, instead you should be doing
Code:
fastboot boot twrp.img
But by then, I got everything on my phone deleted (i flashed an original rom from MI forums and restored a manual backup of data and some apps i had, but still I lost like a day setting up everything).
My questions are, if I hotboot TWRP will I get my data wiped again? (my bootloader is still unlocked so no danger there)
If not, can I backup my data normally using TWRP GUI on hotboot?
Also, once I've installed magisk, will I stop receiving OTAs?
Thanks
No, you won't get data wiped if you boot twrp. I'm doing this periodically and everithing is ok.
Probably you flashed twrp wrong. It should be
fastboot flash recovery twrp.img
Click to expand...
Click to collapse
You can receive ota's with magisk. Prior to installing ota, you should uninstall/"restore partitions" with magisk but not reboot. After ota is installed, you install magisk into secondary partition (with magisk manager) and reboot.
BlackChimaera said:
No, you won't get data wiped if you boot twrp. I'm doing this periodically and everithing is ok.
Probably you flashed twrp wrong. It should be
You can receive ota's with magisk. Prior to installing ota, you should uninstall/"restore partitions" with magisk but not reboot. After ota is installed, you install magisk into secondary partition (with magisk manager) and reboot.
Click to expand...
Click to collapse
But isn't HIGHLY recommended to NOT flash the recovery?
I'm not flashing it too, just "fastboot boot" it when I need it.
BlackChimaera said:
I'm not flashing it too, just "fastboot boot" it when I need it.
Click to expand...
Click to collapse
I hotbooted TWRP and made a backup, after rebooting from TWRP, the phone boots slowly and hangs at the lock screen. Any ideas what could have triggered this?
The only "abnormal"thing i did was to rename the media folder in "data" so TWRP could include it into the backup. After that I renamed the folder to "media" again, and rebooted.
There was a "mediadrm" folder, but I don't remember if it was already there or not.
Why do you want to include media folder into backup? It has only mount points to sdcards. Do you want to include sdcard content into backup? Where is backup stored? On the same sdcard which content you backing up?
BlackChimaera said:
Why do you want to include media folder into backup? It has only mount points to sdcards. Do you want to include sdcard content into backup? Where is backup stored? On the same sdcard which content you backing up?
Click to expand...
Click to collapse
Media folder has internal storage. Anyway, i was able to boot again by flashing to latest stock rom and then restoring "data" from my backup.
Enviado desde mi Mi A1 mediante Tapatalk
BlackChimaera said:
No, you won't get data wiped if you boot twrp. I'm doing this periodically and everithing is ok.
Probably you flashed twrp wrong. It should be
You can receive ota's with magisk. Prior to installing ota, you should uninstall/"restore partitions" with magisk but not reboot. After ota is installed, you install magisk into secondary partition (with magisk manager) and reboot.
Click to expand...
Click to collapse
On Mi A1, TWRP can't be flashed from fastboot, because it doesn't have /recovery

Categories

Resources