What are my options to do Nandroid backups with no TWRP? - Xiaomi Mi 9 Questions & Answers

I used this method to root my Mi9: https://forum.xda-developers.com/Mi-9/how-to/tuto-complete-tutorial-to-root-mi9-twrp-t3923765
Everything works great, happy with a working Magisk a trimmed MIUI etc.
One thing that I am not able to do though is a full Nandroid backup of the system. I thought I could “sideload” TWRP while fastbooting but it messed up the entire system without TWRP getting successfully loaded when I did this with a Mi 9 TWRP image:
fastboot boot twrp.img
Doing this just corrupts the system and I had to wipe data to restart from scratch. tried it twice (and wasted a lot of time) before giving up.
So is there any way to do a total ROM dump without having TWRP installed?

Related

restoring from TWRP, bootloop

I'm using TWRP 3.1.0-1, running Resurrection Remix-N v5.8.0-OnePlus 3T. I want to go back to OOS, I have a TWRP backup of OOS before I flashed RR and I want to restore from that.
So in TWRP -
- Took another backup of RR
- Wiped Dalvik, System, Data and Cache
- Restored OOS
OOS starts and prompts to use my swipe pattern, I swipe my pattern and it's "incorrect", (I didn't forget my pattern, same one I have used for a long time). Ok so back to RR, so I did the same wipes and restored latest RR, now it bootloops. I restored OOS again and wiped. I'm back to OOS, but of course it's "new".
Is there a way to restore OOS successfully or any of RR from my TWRP backups?
Don't know if it makes a difference, but had some issues originally flashing RR, had a bunch of problems, DM-verity and softbricked, I restored to stock using this:
https://forum.xda-developers.com/oneplus-3t/how-to/guide-return-youre-op3t-to-stock-lock-t3569383
After restoring to stock, I successfully removed the default encryption following another guide. I guess I don't know if RR by default encrypts or not, if that matters.
Have you changed your twrp after doing the initial backup
Because twrp before 3.0.4.1 does backups differently and will not restore if restore them by using twrp 3.0.4.1 or newer
kunal1540 said:
Have you changed your twrp after doing the initial backup
Because twrp before 3.0.4.1 does backups differently and will not restore if restore them by using twrp 3.0.4.1 or newer
Click to expand...
Click to collapse
To the best of my knowledge I am using the same version both to backup and restore. I definitely used the same version to backup/restore the latest RR (which bootloops).
RocKKer said:
To the best of my knowledge I am using the same version both to backup and restore. I definitely used the same version to backup/restore the latest RR (which bootloops).
Click to expand...
Click to collapse
Normally, I'd say the backup is just damaged or has some error, preventing proper restore of it. But it's strange that you have two RR backups which won't restore.
If the intent is to get RR working, with your previous user data; maybe try to flash RR, then just use TWRP to restore the data partition?
If you plug your phone in your computer and you computer recognizes your phone, then you can use ADB to wipe everything again. I had the same problem but my phone only charge if I plugged it into my PC so I wasn't able to revive it...
I've got the same problem here. Running TWRP 3.1.0-1, and sultan CM13 20170402. Backed up everything. Tried:
1. restore everything
2. restore only system
3. restore only system and data
None worked. Bootloop immediately after OnePlus splash screen. I also tried the above in combination with wiping everything, wiping system only and wiping data only. File systems are ext4/f2fs/f2fs on system/data/cache.
This is making me go nuts. The only thing I can think of is to try restoring under TWRP 3.0.4.
@RocKKer
try this
go to TWRP Home >> Settings >> tick use rm -rf instead of formatting
and then restore your backup
maybe this helps
cheers

TWRP stuck while restoring backup

I was trying a new rom so I made a twrp backup, I was on MIUI 9 stable, It was an Oreo based rom, flashed gapps, custom kernel and magisk and MIUI firmware
Trying to restore the twrp backup after formatting (Tried Every option to format) It basically shuts off the phone while restoring, just the system (or system Image) partition, restoring data was working fine. I had to flash the system manually, then restoring data, which worked fine. Just for testing I tried to recreate a backup and restoring It Just After and the same behaviour happened! Even without flashing anything. Whats happening?
lukypuie said:
I was trying a new rom so I made a twrp backup, I was on MIUI 9 stable, It was an Oreo based rom, flashed gapps, custom kernel and magisk and MIUI firmware
Trying to restore the twrp backup after formatting (Tried Every option to format) It basically shuts off the phone while restoring, just the system (or system Image) partition, restoring data was working fine. I had to flash the system manually, then restoring data, which worked fine. Just for testing I tried to recreate a backup and restoring It Just After and the same behaviour happened! Even without flashing anything. Whats happening?
Click to expand...
Click to collapse
There is a new twrp version (3.2.0.0) which is supposed to show better oreo support. Are you on that version?
Sounds a little confusing how you described what you flashed in which order ... Also I don't get exactly which rom you're trying to restore. Can you give more accurate and precise info?

[Recovery][BKL][EMUI 8.x][Unofficial]TWRP 3.2.1-0 working recovery from View 10

Backup your stock recovery per this post. If you are too lazy, I can upload my backup from .104 build (C432) to Mega.
Download twrp_bkl_0.7.img from this post and place it in same directory with your ADB.
After successful backup as precaution disable any locks like pattern/PIN/password/fingerprint, reboot to bootloader (fastboot):
Code:
adb reboot bootloader
Then flash new TWRP recovery:
Code:
fastboot flash recovery_ramdisk twrp_bkl_0.7.img
After successful flash reboot device and immediately after confirming command below unplug USB cable and HOLD and keep holding VOLUME UP button, if you won't the new recovery will be overwritten by stock and you can try again.
Code:
fastboot reboot
Tested by myself on Honor 10 8.1.0.104 (C432) with unlocked bootloader and installed already Magisk 16.4 with Magisk manager 5.7.0, Magisk ramdisk persisted after installing TWRP recovery, system boots normal.
Next step after unlocking BL, installing Magisk, installing TWRP recovery -> flashing GSI AOSP, LOS or RR. Only reason I bothered with installing TWRP was that GSI image of LOS and RR don't include opengapps, only AOSP does, so without TWRP you can't have opengapps with these two GSI ROMS.
PeterMarkoff said:
Backup your stock recovery per this post. If you are too lazy, I can upload my backup from .104 build (C432) to Mega.
Download twrp_bkl_0.7.img from this post and place it in same directory with your ADB.
After successful backup as precaution disable any locks like pattern/PIN/password/fingerprint, reboot to bootloader (fastboot):
Code:
adb reboot bootloader
Then flash new TWRP recovery:
Code:
fastboot flash recovery_ramdisk twrp_bkl_0.7.img
After successful flash reboot device and immediately after confirming command below unplug USB cable and HOLD and keep holding VOLUME UP button, if you won't the new recovery will be overwritten by stock and you can try again.
Code:
fastboot reboot
Tested by myself on Honor 10 8.1.0.104 (C432) with unlocked bootloader and installed already Magisk 16.4 with Magisk manager 5.7.0, Magisk ramdisk persisted after installing TWRP recovery, system boots normal.
Next step after unlocking BL, installing Magisk, installing TWRP recovery -> flashing GSI AOSP, LOS or RR. Only reason I bothered with installing TWRP was that GSI image of LOS and RR don't include opengapps, only AOSP does, so without TWRP you can't have opengapps with these two GSI ROMS.
Click to expand...
Click to collapse
Nice work. ?
tried to install GSI RR OS, but ending in bootloop, also even after resizing system partition to maximum (TWRP / wipe / resize) opengapps still showing error 70 about insufficient space (which makes no sense, so they really seem to have wrong detection of A/B instead of A for Huawei/Honor devices), though these gzr gapps seem to install successfuly, now if I could figure out the damn bootloop
potential reasons for bootloop - previously installed magisk, wiped also system not only data/cache, installed through fastboot while TWRP there and not only stock recovery, ???
edit: i guess will try flash GSI through TWRP again, quite a waste time to wait each time like 9-10 minutes to find out it can't boot
edit 2: so even flashing through TWRP doesn't help, just stuck on android animation for 10 minutes and then it restarts (and even if you do fatory reset through huawei erecovery it doesnt change anything). maybe can try to restore everything and not wipe system before installing, just factory reset through TWRP (though I remember I read somewhere it's not reliable and it is better to do it through system, but I think that one wipe also internal storage which I wanna avoid)? back to rooted EMUI with TWRP for now, don't have time to try various combinations
edit 3: flashing over TWRP backup without wiping system doesn't help, so it seem it's gonna be magisk or replaced stock recovery i guess, otherwise no idea
BTW the lack of feedback here and trying from other users it's very depressing. they boasted million phone sales and i am the only one in the whole world trying to install TWRP and GSI ROM on this phone?
PeterMarkoff said:
BTW the lack of feedback here and trying from other users it's very depressing. they boasted million phone sales and i am the only one in the whole world trying to install TWRP and GSI ROM on this phone?
Click to expand...
Click to collapse
Don't be disappointed the lack of feedback from users is not many power users have got their hands on this model.
And also we are having different builds.
From the day one I am trying to rebrand my device but no success .
Once I have rebranded to EU I will try and let you know.
Did you flash open gapps nano package through twrp in gsi image?
Did it give you the same error?
tried just pico opengapps as on all phones i flash, that's the smallest, but always end up with error 70 not enough space despite resized system partition in TWRP and many GB available, the other unofficial GZR zero gapps build i mentioned seem to be flashed successful in TWRP, but in any case no luck with booting
PeterMarkoff said:
tried just pico opengapps as on all phones i flash, that's the smallest, but always end up with error 70 not enough space despite resized system partition in TWRP and many GB available, the other unofficial GZR zero gapps build i mentioned seem to be flashed successful in TWRP, but in any case no luck with booting
Click to expand...
Click to collapse
Did you format your phone before trying GSI ?
Try formatting phone and remove some system apps and then flash gapps it will mostly solve the problem.
PeterMarkoff said:
BTW the lack of feedback here and trying from other users it's very depressing. they boasted million phone sales and i am the only one in the whole world trying to install TWRP and GSI ROM on this phone?
Click to expand...
Click to collapse
Don't be upset – e.g. I didn't receive my Honor 10 yet. You won't be the only one for sure, you're just the first one to do it, which is super nice for others because it motivates them to do so as well!
Just wondering: does it make a difference for TWRP wether I own the 6gb or 4gb version?
miststudent2011 said:
Did you format your phone before trying GSI ?
Try formatting phone and remove some system apps and then flash gapps it will mostly solve the problem.
Click to expand...
Click to collapse
I did factory reset (data, both cache) and also wiped system partition, gapps would be the least issue, as I said that GZR should work, but my system doesn't boot, no matter how times I wipe everything through TWRP or stock recovery after flashing system.img, since they say it's normal to hang at first boot and then wipe and then it should boot, but it doesn't work for me. also of course tried to power off phone since some people said it helps to do it after flashing. what I haven't done it's fastboot -w which should be some better wipe. some people say also you should remove magisk ramdisk, though I forgot to back up original, backed up just stock recovery. and also I haven't tried to flash everything with stock recovery, though first flash I did was through fastboot anyway and not through TWRP and it didn't make difference
so last few things left to try:
- fastboot -w for total wipe of data (better than TWRP? though it should be same as Format data in TWRP which wipe everything including internal storage which I wanna avoid since backing up 15GB TWRP backup file it's kinda annoying and my system has problem to do it)
- flash with stock recovery (I have backup, no big deal)
- remove magisk ramdisk and flash with stock ramdisk (forgot to make backup, can't replace)
though I am tired of it for now, spend last night like 4 hours dealing with it until 2AM and I also need to take care of children
vollkornbaguette said:
Don't be upset – e.g. I didn't receive my Honor 10 yet. You won't be the only one for sure, you're just the first one to do it, which is super nice for others because it motivates them to do so as well!
Just wondering: does it make a difference for TWRP wether I own the 6gb or 4gb version?
Click to expand...
Click to collapse
I don't think RAM has something to do with anything, but that sounds like Chinese version since EU has always 4GB and only difference is storage, so you will have different ROM
PeterMarkoff said:
(...)
so last few things left to try:
- fastboot -w for total wipe of data (better than TWRP?)
- flash with stock recovery (I have backup, no big deal)
- remove magisk ramdisk and flash with stock ramdisk (forgot to make backup, can't replace)
Click to expand...
Click to collapse
So I just read more about the GSI/Treble stuff and it said somewhere that modifications like Magisk probably lead to problems with the GSI flash.
Which is why I would try to get rid of the magisk ramdisk first.
I'm not an expert in this at all but maybe this helps.
---
PeterMarkoff said:
I don't think RAM has something to do with anything, but that sounds like Chinese version since EU has always 4GB and only difference is storage, so you will have different ROM
Click to expand...
Click to collapse
Indeed I bought the chinese 6gb RAM Version (hope this won't turn out as a big mistake)
vollkornbaguette said:
So I just read more about the GSI/Treble stuff and it said somewhere that modifications like Magisk probably lead to problems with the GSI flash.
"Your device is free of any heavy modifications such as the
Click to expand...
Click to collapse
yeah, now if someone could extract for me from 0.104 firmware for C432 that stock ramdisk, because I have some problems with mega to download it and I just need the stock ramdisk, nothing else, I have stock recovery backup but forgot to make ramdisk backup
edit: completely forgot there is option to "Completely uninstall" in Magisk manager, so tried it though even after restart with magisk manager missing i could still use root apps, so not sure how exactly this "complete uninstall" works, but anyway giving it a try after this and wiping data, installed system.img again, again wiped, rebooted and as usual loading and loading and nothing, seem can't further continue without copy of stock ramdisk to flash, tried downloading the big update from mega to extract it but it always fail for me to download, same with trying to copy my TWRP backup because for sure ain't gonna doi fastboot -w and setting up everything from scratch in case even this doesn't help, if I knew it works for sure and it will load new system which I will have to set up then no problem, but in this case...
edit 2: tried to replace magisk ramdisk with ramdisk from Honor View 10 BKL09 (same as our working TWRP) but it seem I end up after flashing it, wiping and flashing system.img in TWRP/erecovery bootloop, it's not showing android booting logo like before (but hey at least no need to wait 10 minutes to find it's fail) and either go to huawei ercovery, if I perform factory reset there then it boots to TWRP, but can't boot anywhere else besides these two
pass
I requested this image. Recovery has been established. When I enter the recovery, it requires a password to decrypt the system partition, I enter it (the same after switching on the phone), but a message is displayed that the password is incorrect. help me please.
told you in OP disable all passwords before flashing
PeterMarkoff said:
yeah, now if someone could extract for me from 0.104 firmware for C432 that stock ramdisk, because I have some problems with mega to download it and I just need the stock ramdisk, nothing else, I have stock recovery backup but forgot to make ramdisk backup
edit: completely forgot there is option to "Completely uninstall" in Magisk manager, so tried it though even after restart with magisk manager missing i could still use root apps, so not sure how exactly this "complete uninstall" works, but anyway giving it a try after this and wiping data, installed system.img again, again wiped, rebooted and as usual loading and loading and nothing, seem can't further continue without copy of stock ramdisk to flash, tried downloading the big update from mega to extract it but it always fail for me to download, same with trying to copy my TWRP backup because for sure ain't gonna doi fastboot -w and setting up everything from scratch in case even this doesn't help, if I knew it works for sure and it will load new system which I will have to set up then no problem, but in this case...
edit 2: tried to replace magisk ramdisk with ramdisk from Honor View 10 BKL09 (same as our working TWRP) but it seem I end up after flashing it, wiping and flashing system.img in TWRP/erecovery bootloop, it's not showing android booting logo like before (but hey at least no need to wait 10 minutes to find it's fail) and either go to huawei ercovery, if I perform factory reset there then it boots to TWRP, but can't boot anywhere else besides these two
Click to expand...
Click to collapse
If you want, i have all the files of the C432 update but idk in wich .zip, folder the ramdisk is stored.
I can send on several clouds.
PeterMarkoff said:
told you in OP disable all passwords before flashing
Click to expand...
Click to collapse
Hey did you restore your device are you still struck at boot screen?
If yes try this method.
https://forum.xda-developers.com/huawei-p20/development/rebrand-huawei-p20-eml-l29-eml-l09-t3779283
How to GO back to stock emui(India) after i flash a treble rom? Do i need to backup using some tool?
PLease someone tell me
srharshajava said:
PLease someone tell me
Click to expand...
Click to collapse
The problem is currently we don't have full
ROM to revert to stock and if we brick our device there is no proper way to revert to stock.
Our model even doesn't have SD card support.
Just wait for some time for someone to provide proper way.
When i flash a treble rom, I have a bootloop. I returned back with eRecovery directly on the phone.
miststudent2011 said:
The problem is currently we don't have full
ROM to revert to stock and if we brick our device there is no proper way to revert to stock.
Our model even doesn't have SD card support.
Just wait for some time for someone to provide proper way.
Click to expand...
Click to collapse
We do have a way to download full ROM.
http://pro-teammt.ru/firmware-database/?firmware_model=COL-L29C432
1. Search here for your exact model (change numbers after C432 to find ROM for your phone) and search for your rom version (B104 or B120)
2. Double click on "filelist" on the same row as FullOTA-MF
3. From filelist link menu download update.zip file (it should be really big, like 2+GB)
3. Extract UPDATE.APP file somewhere (eg. Desktop)
4. In settings of HuaweiUpdateExtractor (link: https://forum.xda-developers.com/showthread.php?t=2433454) uncheck "verify header checksum" and open UPDATE.APP
5. Extract any img (Be it ramdisk.img, ramdisk_recovery.img or system.img) file that you need from UPDATE.APP via HuaweiUpdateExtractor
You just got whoole stock rom and img files that you can flash. Tested by myself with flashing back original ramdisk, ramdisk_recovery and system.img and everything worked well.

How to restore the nandroid's backup on the note 9?

On my phones I have always used the backup's function offered by TWRP's recovery .
I've always been able to restore the nandroid's backups without any problems.
However, whenever I try to restore a backup on my Note 9, the phone always goes into bootloop.
I've never had this happen with my other phones (S3 and LG G5).
I wouldn't want to have to do other things to do a successful restore.
I can't restore a nandroid backup as well on my Note 9 exynos. I think it had something to do with force encryption of the phone.
I found in an XDA thread a zip to disable dm-verity and force encryption, flashable via twrp.
After successfully disabling ecryption of my Note 9, I was able to successfully restore a previous nandroid backup.
XTrail02 said:
I can't restore a nandroid backup as well on my Note 9 exynos. I think it had something to do with force encryption of the phone.
I found in an XDA thread a zip to disable dm-verity and force encryption, flashable via twrp.
After successfully disabling ecryption of my Note 9, I was able to successfully restore a previous nandroid backup.
Click to expand...
Click to collapse
Thank you for your reply.
I mean, let me get a better understanding of what you did.
Did you first flash the "Disable_Dm-Verity_ForceEncrypt"'s zip and then restore the nandroid backup?
These are the steps I did, but not sure of the exact order:
1. Format data & reboot to Recovery
2. Flash rom (I'm using LOS 17.1 w/ microG) & reboot to Recovery
3. Flash magisk & reboot to Recovery
4. Flash the zip below
[Deprecated] Universal DM-Verity, ForceEncrypt, Disk Quota Disabler [11/2/2020]
Hi all! For the past couple of months, I've been looking into making a more universal solution to disable dm-verity and forceencrypt. Needing to take different zips, modify them for different devices, and then cross your fingers when you switch...
forum.xda-developers.com
5. Reboot to System, complete the start up of the new Rom and confirm that the phone is now decrypted.
6. Go to Recovery and restore my nandroid backup (I created this nandroid backup when my phone is already decrypted. I haven't tested restoring a previous backup with my still encrypted phone).
I successfully restored my nandroid backup finally. Before I always fail, giving me a hard time restoring my individual apps using TBackup or Migrate.
XTrail02 said:
These are the steps I did, but not sure of the exact order:
1. Format data & reboot to Recovery
2. Flash rom (I'm using LOS 17.1 w/ microG) & reboot to Recovery
3. Flash magisk & reboot to Recovery
4. Flash the zip below
[Deprecated] Universal DM-Verity, ForceEncrypt, Disk Quota Disabler [11/2/2020]
Hi all! For the past couple of months, I've been looking into making a more universal solution to disable dm-verity and forceencrypt. Needing to take different zips, modify them for different devices, and then cross your fingers when you switch...
forum.xda-developers.com
5. Reboot to System, complete the start up of the new Rom and confirm that the phone is now decrypted.
6. Go to Recovery and restore my nandroid backup (I created this nandroid backup when my phone is already decrypted. I haven't tested restoring a previous backup with my still encrypted phone).
I successfully restored my nandroid backup finally. Before I always fail, giving me a hard time restoring my individual apps using TBackup or Migrate.
Click to expand...
Click to collapse
I already do all this when I install the new rom. So, my phone should be decrypted.
Then after some time I make a nandroid backup. However, when I go to restore the backup the phone goes into bootloop.
So, it means that with the restore the phone comes back encrypted again. That's why it goes into bootloop.
Before, I'm flashing the 'no-verity-opt-encrypt-6.1.zip' but always ended up encrypted after reboot. Only after I flashed 'disable_dm-verity_forceencrypt.zip' that my phone became decrypted, and perform a successful nandroid restore later. I'm using twrp 3.4.0.
XTrail02 said:
Before, I'm flashing the 'no-verity-opt-encrypt-6.1.zip' but always ended up encrypted after reboot. Only after I flashed 'disable_dm-verity_forceencrypt.zip' that my phone became decrypted, and perform a successful nandroid restore later. I'm using twrp 3.4.0.
Click to expand...
Click to collapse
If I understand correctly, before restoring a nandroid backup you flashed 'disable_dm-verity_forceencrypt.zip' and then did the restore.
Right?

Question [HELP] Doesn't boot with any Recovery based ROM!?

Hi Guys
I tried an update to Mirza's ROM but after it caused more issues, I tried restoring from full Orangefox backup in recovery; only to find the phone stuck at Fastboot mode. It appeared strange, so I tried it again to end up with same fate. I tried installing Xiaomi.EU ROM, but after installation it got into a boot loop alternating between Recovery logo and MIUI startup logo. I got into fastboot again and flashed TWRP trying the same, but without joy. Tried another recovery and multiple versions of Xioami.EU ROM all with same fate. Finally got hold of an old fastboot ROM from Xioami.EU and flashed with MiFlash tool and it flashed successfully without issues. Assuming all was well, I tried flashing ROM via recovery which either gets stuck at MIUI logo or recovery. Boot loader in unlocked and decrypted. I tried flashing SHRP recovery, Magisk, wiping data etc as well to rule out any issues, but the problems remain.
Any ideas as to what's happening?
If I understood right, recovery ofox is working.
So reboot to it
Format data with yes
Reboot ofox
Flash ROM
Flash magisk recommend
Format data again with yes
Reboot system and give time to boot, could be more than some minutes but I think not more than 20
For those who might face similar issues.
According to Orangefox website, 'note that you should not restore a backup of the persist image, unless it proves absolutely necessary'. I may have checked it in recovery during restoration which probably destroyed the partition.
Fix:Installed TWRP via flashboot, formatted all data(not wiped) and installed ROM then formatted again and it booted.

Categories

Resources