TWRP restore. - Xiaomi Mi A2 Lite Questions & Answers

Can I restore pie stock rom by TWRP after flashing custom rom?

ranuror said:
Can I restore pie stock rom by TWRP after flashing custom rom?
Click to expand...
Click to collapse
Yes you can as any other rom.

ranuror said:
Can I restore pie stock rom by TWRP after flashing custom rom?
Click to expand...
Click to collapse
Maybe? The stock images have a bunch of images that just need to be written to the partitions and TWRP has the (commandline) tools to do that. It doesn't have any automatic support that I know of.
If you're going back to stock after running a custom ROM, you probably want to do a full stock flash, which means using fastboot or MiFlash. You'll probably need to erase userdata if you expect the system to boot again (make sure you backup anything you want first). Don't lock the bootloader if you intend doing anymore hacking on your phone.

Related

[Q] Do I ALWAYS have to flash a new boot image when installing a rom?

Hello,
I'm coming from a HTC Desire, and when reading the guides how to install roms on the HOX, the neccesity to flash a separate boot.img for every rom via fastboot was new to me.
Is this always the case? And lets say I have a stable 4.0.4 installation and want to mess around with CM10 - I get that have to flash the CM10 boot.img before installing the ROM, but would I then also have to re-flash my old boot.img before rstoring my old nandroid backup, or is the boot image included in the backup?
Thanks aheasd for an answer,
saxelfur
i guess yes.. you have to re-flash the boot.img of the rom that you are restoring...
faiz02 said:
i guess yes.. you have to re-flash the boot.img of the rom that you are restoring...
Click to expand...
Click to collapse
Okay, thanks - so I suppose right now there is now way to restore a backup from a different rom on the go. Oh well, I should be able to live without that
saxelfur said:
Okay, thanks - so I suppose right now there is now way to restore a backup from a different rom on the go. Oh well, I should be able to live without that
Click to expand...
Click to collapse
You do not have to flash the boot.img before restoring a nandroid backup...Y
ou restore everything, boot.img included.
panooos said:
You do not have to flash the boot.img before restoring a nandroid backup...Y
ou restore everything, boot.img included.
Click to expand...
Click to collapse
Great, even better!
panooos said:
You do not have to flash the boot.img before restoring a nandroid backup...Y
ou restore everything, boot.img included.
Click to expand...
Click to collapse
Not true; if you're restoring a backup which used a different boot.img than the one you already have installed, you need to manually flash the boot.img from your nandroid backup in fastboot.
The reason we have to use fastboot to flash the boot.img is that, thanks to HTC's security policies, it is not possible to write to the boot partition from recovery. Hence when you flash a ROM the boot.img isnt written, and has to be manually flashed. This also means that when you restore a backup in recovery it is still unable to write to the boot partition, so the boot.img from your backup is not written and must also be flashed manually.
hopscotchjunkie said:
Not true; if you're restoring a backup which used a different boot.img than the one you already have installed, you need to manually flash the boot.img from your nandroid backup in fastboot.
The reason we have to use fastboot to flash the boot.img is that, thanks to HTC's security policies, it is not possible to write to the boot partition from recovery. Hence when you flash a ROM the boot.img isnt written, and has to be manually flashed. This also means that when you restore a backup in recovery it is still unable to write to the boot partition, so the boot.img from your backup is not written and must also be flashed manually.
Click to expand...
Click to collapse
Really? I once flashed a kernel and could not pass the loading screen...everything got fixed as soon as i restored my backup...
Lucky for you. But these guys are correct. The only way to flash boot is through fastboot.
Recovery restore cannot restore a boot.img
Sent from my HTC One X using xda app-developers app
panooos said:
Really? I once flashed a kernel and could not pass the loading screen...everything got fixed as soon as i restored my backup...
Click to expand...
Click to collapse
Yep. Boot partition simply isn't writable from recovery (without s-off). There's no difference between recovery trying to write a boot.img from a zip on /sdcard and recovery trying to write a boot.img from a folder on /sdcard (if there was we would just need to modify recovery to treat new flashes as restores to get around the problem).
I'm not saying it won't work if you don't; if you're switching between Sense ROMs or restoring an earlier version of the ROM you're using then there's a good chance that the ROM will still boot and run fine, but you'll be running with the kernel & ramdisk you had before the restore.
Always learning sth new... Ty
Sent from my HTC One X using xda app-developers app
Well shoot. How do I get the boot.img from the stock rom that came with it. It wasn't exactly in standard .zip format for me to extract the .img......
If you did a nandroid backup it's there in plain sight.

is it possbile to restore backup rom with CWM?

Before flashing rom, i always make nandroid backup of my current rom.
But my question is right now i am on stock rom(with KTT kernal) and i am looking to flash cm11.
If i flash cm11 then can i restore my backup rom with CWM?
will i get all my data data on my stock rom?
or i have to do all the same thing flash stock rom with flash tool and again root it and install cwm all this things.
It would be great if you help.
yogesh448 said:
Before flashing rom, i always make nandroid backup of my current rom.
But my question is right now i am on stock rom(with KTT kernal) and i am looking to flash cm11.
If i flash cm11 then can i restore my backup rom with CWM?
will i get all my data data on my stock rom?
or i have to do all the same thing flash stock rom with flash tool and again root it and install cwm all this things.
It would be great if you help.
Click to expand...
Click to collapse
yes you can

How to restore to stock version(stock recovery and stock eui) without losing IMEI?

Hi,
I have custom ROM installed, I need to know the exact steps to restore the phone as it was stock with recovery and stock MIUI OS.
like do I need to flash stock recovery first, then flash MIUI OS or few other steps to make sure I should not lose my IMEIs ?
Thanks
Technically you won't loose IMEI by flashing roms unless you goof up. You can flash MIUI on any recovery and don't forget to backup your data. I would recommend not using MI Recovery because MIUI ROMs have reached EOL for this device and you might want to try something else soon. There's also a fix to restore IMEI here https://www.gizdev.com/repair-imei-snapdragon-device/

How to make a TWRP backup?

How do I make a TWRP backup using the latest TWRP fastboot? (For some reason when I flash TWRP, I end up losing it, not sure why. Therefore I just always use the fastboot TWRP) Are there any issues due to the partition system? Also, if I make a TWRP backup, flash a custom ROM, then decide I want to go back to stock, would I be able to use the TWRP backup I made to do that?
Have you tried using TWRP installer instead of flashing via fastboot?
GroovinChip said:
How do I make a TWRP backup using the latest TWRP fastboot? (For some reason when I flash TWRP, I end up losing it, not sure why. Therefore I just always use the fastboot TWRP)
Click to expand...
Click to collapse
If you are losing TWRP, probably on reboot then your system isn't open or unsecured. You need to get TWRP on there permanently. Go to the TWRP guide and install it according to those instructions.
https://forum.xda-developers.com/pixel-xl/how-to/guide-pixel-xl-android-8-1oreo-unlock-t3715279
GroovinChip said:
Are there any issues due to the partition system?
Click to expand...
Click to collapse
The system does have a slot A slot B for the updates that it does. I believe A is the one you are using, it installs updates on B then moves them to A so it can update in the background. But i've not had issues because of it.
GroovinChip said:
Also, if I make a TWRP backup, flash a custom ROM, then decide I want to go back to stock, would I be able to use the TWRP backup I made to do that?
Click to expand...
Click to collapse
If backups are made properly you should be able to restore any backup you want and go back to that Rom, whether its stock, AOSP or whatever.

Question How does restoring work in this phone?

For context, I want to clear up a few things before trying to root so I don't end up bricking the phone.
So after reading a few threads it seems even recovering via twrp is messed up in this phone. Can someone shed some light on this matter?
Can I restore system, data, and boot partitions via twrp in case something goes wrong (while staying on official miui roms everytime, I don't intend to install custom roms) and I have to revert the phone back to the state it was in at the time of a backup?
It feels like at the very least we would be required to re-flash the entire firmware via mi flash tool and then restore whatever is needed via twrp later. Will this work?
Also I hear using twrp to install the official firmware is not a good idea, what's that about?
I know long post and a lot of questions, so please bear with me.
Thanks.
Custom ROMs and Stock ROMs differ in one aspect, which partitions are left untouched. Since stock ROM is a lot more invasive and formats all partitions, official flash method is recommended.
When you mess things up, mi flash tool is safest option. Its safe to experiment, backup, restore on boot+system+data in TWRP across ROM installs but don't mess up recovery partition. Remember to format data between ROM installs unless dirty flashing on same android version
miravision said:
Custom ROMs and Stock ROMs differ...
Click to expand...
Click to collapse
I see. Thank you for the reply!

Categories

Resources