yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] hyp89:
1.) Install Minimal ADB and Fastboot

2.)Reboot your mi 9 and hold the volume down button until it shows fastboot

3.)Connect it to your computer

4..)Copy the Image File into the install folder

5.)Start Minimal ADB and Fastboot and type "fastboot flash recovery twrp-3.3.1-34-cepheus.img"

6.)Hold Power und Volume up buttons until the mi logo appears and release the power button, but hold the volume button and the new recovery will start

This should work :)
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
Yes is a common problem, i think is related to the gsi.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] clipcarl:
Wondering why the regular system and vendor backup options were removed?

The _image options take more space, won't work if the partitions shrink for any reason and won't work properly if the partitions grow (unless an immediate resize is done).

My opinion is that it's probably best to have both regular and _image options.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] smeroni68:
They where removed because restore of system and vendor themself arent releable from testing side.

The difference in size with img are quite smaller, and img backup/restore works always perfect. That's the answer to your quesions.

Inviato dal mio MI 9 utilizzando Tapatalk
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] clipcarl:
As I said in my post restore from image doesn't always work perfectly. And while the regular backup isn't 100% in all situations either more choices are better than fewer; we are all experts or enthusiasts here. I have used the regular system and vendor backup methods hundreds of times over the years without issue!

EDIT: I also disagree with your assertion that the difference in size between regular and image backups is always small; it can be quite large. It depends on how much space is used by the filesystem currently, how large the partition is and even on how much data and what type was written to the partition in the past!
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] matata86:
If you try flash magisk, canceled error canot mount system... :( Wtf? Thank you very much.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] clipcarl:
You're probably trying to flash Magisk after flashing gapps. For some reason the gapps installer leaves the system partition mounted after it's done installing instead of unmounting it when done. The Magisk installer doesn't take an already mounted system partition into account and bails out with an error.

You can get around that by just manually unmounting the system partition yourself before flashing Magisk. (Rebooting and going back to recovery will do the same thing.)
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
You wrote good, we are all experts or enthusiasts here.

So in your opinion it's better keep both options, in my opinion the system option is useless, if you backup it and then restore it you will probably break the encryption, this mean you will lose all data in your internal storage.

There are 50 pages full of people that have problems with backups and I also got a little bored having to always answer the same things.

Normal system and vendor backup with an encrypted memory will not be restored.

System_image and vendor_image with an encrypted memory will be successfully restored in the 80% of the cases.

System_image and vendor_image can be used also for decrypted memory without problems.

So it's better to keep only system_image and vendor_image to reduce backup problems.

P.s. in the latest years things have changed.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] clipcarl:
Interesting. How does encryption have anything to do with backing up or restoring the system and vendor partitions? Neither of those partitions is encrypted and the decryption keys are not stored there, right?

I don't doubt you but can you explain what you mean?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
I think that the normal backup doesn't includes some files (or some links), so when you restore it the system is unable to find some files so the system breaks the encryprion. I think is related to the system as root because this happen also on some devices like oneplus 6 and oneplus 6t and oneplus 7 pro but not on the mi8 for example. Taking the system_image you will create a system.img that includes all files (links included)
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] clipcarl:
I have the OnePlus 6 and the OnePlus 7 Pro and I've never had any issue with saving and restoring system and vendor using the regular method. I also have the Mi Mix 3, Mix 2S, Mix 2 and Mix and never had any issue with those phones either. I am a phone and ROM junkie (I have at least 12-15 phones from the last few years) and I use the regular TWRP system and vendor backup feature a lot and it's never caused an issue with encryption.

I have seen issues on this phone, though, so I wonder if the issue isn't really with backing up and restoring the system and vendor partitions in general (I do it all the time on lots of other phones without issue) but maybe with retrieving keys or dealing with the secure element / TEE. But backing up normally vs. via image shouldn't make any difference there unless I'm missing something (quite probable).

I've never looked at any of this on Android so who knows. Perhaps Xiaomi and / or Qualcomm is doing something weird / different with the Mi 9. I'll do some research on the current state of FBE and see if I can be of use to the devs. There's probably a way to fix it without eliminating these backups entirely!
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] smeroni68:
Hi, there is obviuosly something not ok with mi9 related to backup/restore with normal ways on encrypted phones. The decision of dev to remove these selections is to avoid for us (normal and experienced users) to loose our datas.

Until things will be not sorted out, these selections are hidden to force users using the ones that works better in this moment.

I think that with this we can close the complaining about this temporary decision made by dev that already explained and we that already tested a bit this work in progress and loose hours by reflashing via fasboot because phone get bootloop with a simply restore without errors!

Anyway for who want use the older recovery, is still available the previous version.

Thanks to all for understanding.

Inviato dal mio MI 9 utilizzando Tapatalk
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] wittanny:
Sorry, I’m a noob for Mi.

Is TWRP uninstallable?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] clipcarl:
Thanks for clarifying for the dev that he means for this to be temporary and the options will be restored. That was not at all clear to me from what the dev himself said. If that's the case and it's only temporary then I can understand that.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] smeroni68:
Probably was not clear. But here we are UNOFFICIAL, so when TWRP will become official, these complaining (eventually) will be directed to TWRP devs. We must only thanks [MENTION=4712355]mauronofrio[/MENTION] for his un-payed work for Mi9... we all has a life!
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
Mix 2 and mix 2s are not system as root.

For Mix 3, OnePlus 6, OnePlus 6T, OnePlus 7 and OnePlus 7 Pro, i'm the maintainer for the twrp and i can say you that they have the same problems.

Maybe you are basically decrypted so you haven't this problem.

One the mix 3, oneplus 7 and oneplus 7 pro i removed that option too for the same reason.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] marcel112:
So for our Mi9, when we flash latest(34) we can save and restore an backup with option off data, yes?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] reg66:
Only by flashing official stock rom will it be removed
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] saturday_night:
I didnt follow your work since 2-3 weeks but there is a Full working twrp here available without any problems of backing up or restoring things. Also this twrp has some more options which are complete missing in your Release like the remove force encryption feature. I dont know if the Chinese dev has a Sourcecode released somewhere, but since 1. June release his twrp is full working without any Bugs.

Here is the xda thread but ignore the first post its all in english for a long time now.

https://xdaforums.com/Mi-9/how-to/recovery-unofficial-twrp-recovery-3-2-3-t3912118

Here is the post with download of latest version https://xdaforums.com/showpost.php?p=79648491&postcount=154

I already backed up several different Roms like EU, global, global beta, xiaomi.eu and gsi and all are working fine after restoring with usual System and vendor Backup and restore incl. data (decrypted or encrypted doesnt matter). Hope this can help getting twrp official, and thanks for your work!
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
That TWRP is based on a modified closed source, so it has some different features, like magisk and no force encryption zip i can't include.

In all cases try this:

Go to the official Global Stock rom and keep encryption (To be sure set a pin/password/pattern and check if the twrp ask for it)

Remove all secure codes

Flash TWRP -30 (The last one that contains system and vendor options)

Backup System, Vendor, Data, Boot

Now wipe system, vendor and data

Now restore the backup and tell me if the rom boot or not.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] saturday_night:
Going to test that tomorrow or friday and report back, dont have enough time today. Sad to hear that the chinese twrp is closed source, its working very well.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] smeroni68:
I'm a tester of Mauro twrp... This is the first test i do after unlock my phone with encrypted eea miui v10.2.26.0 over.

Result? Unbootable mi9 and fastboot bootloop... This meant for me a complete re-flash with fastboot of rom to restore my phone booting.

Using image sys and vend backup was fine.

Inviato dal mio MI 9 utilizzando Tapatalk
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] clipcarl:
I am not decrypted and I haven't noticed any problems on the OnePlus 6, OnePlus 7 Pro and Mix 3.

Of course on those phones (and many others) it seems like if you go between AOSP-based (or Lineage or CAF) and stock ROMs you need to reformat storage. Is that the problem you're talking about? If so I wouldn't call that a problem... I just assumed AOSP and the stock ROMs just handle encryption differently and in incompatible ways. I think people understand that. Perhaps a warning message on backup letting people know that if they intend to do this they may need to reformat would be appropriate?

I almost exclusively run AOSP ROMs and use the the regular backup and restore a lot to move between ROMs. I suspect this is a common use case among enthusiasts. Of the list you maintain particularly on the OnePlus 6 I have done this at least 10-20 times without issue going back and forth between many different AOSP-based ROMs and I've not once had a problem. So I respectfully ask that you reconsider removing the ability to do the way that works for me! Thanks.

---------- Post added at 07:16 AM ---------- Previous post was at 06:39 AM ----------

I just did this on my Mix 3 with an AOSP-based ROM (not running stock) and it worked just fine. Using TWRP 3.3.1-0. No issues at all. (There was no option to wipe vendor on that TWRP build so I wiped that one manually with "mke2fs -t ext4 -L vendor /dev/block/sde47" .)

If this is a problem that only affects the stock ROM then perhaps a warning message might be better than removing the option entirely. I suspect there are a lot of people like me who run AOSP ROMs and switch a lot between them.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] AndroGeassX10:
How can i update my version of twrp, i have the 3.3.1-30
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] smeroni68:
May I ask why you do not use the LR.Team twrp so you have a full working recovery with all options and more than original twrp can provide?

I mean there is a public solution to your needs. Are you afraid that a closed source recovery is dangerous? Just to know and understand.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] clipcarl:
[MENTION=4712355]mauronofrio[/MENTION]:

OK, on my Mix 3 I just went from my AOSP ROM (crDroid) to a stock-based ROM (Xiaomi.eu) with just a regular wipe (no reformat) and tried it with that.

Did a regular data wipe in TWRP

Flashed Xiaomi.eu 9.6.5 in recovery

Booted system and went through setup

Ensured that the OS reported the device was encrypted

Added a password

Rebooted and ensured that the OS asked for the password

Rebooted to recovery and ensured that TWRP asked for the password

Verified that TWRP really did decrypt by examining files on /data/data and /data/media/0

Rebooted to system

Removed password and confirmed that OS still says device is encrypted

Rebooted to TWRP and ensured that TWRP still said the device was encrypted and decrypted successfully with default_password

Did a backup of boot, vendor, system and data using the regular (non-image) method

Wiped data and system from the UI in TWRP

Formatted vendor using mke2fs from the command line in TWRP (the UI does not have an option to wipe vendor)

Restored everything from the backup

Rebooted into system with no problem

I was surprised to see that all of this worked both because you said that it shouldn't and because in my past experience going between AOSP and stock without a complete reformat of data often did not work properly.

So I re-added a password for one more recovery test. Rebooted to recovery, TWRP asked for my password, reported that data was decrypted successfully and sure enough I was able to access all my data with no issues.

!!!!!HOWEVER!!!!!

I rebooted into recovery and this time I hit "cancel" at the password prompt. I was shocked to see that all my data was still completely accessible and readable without the password!

I checked my Mi 9 (GlobeROM) and it's the exact same situation. Both the OS and TWRP report the device is encrypted and both the OS and TWRP ask for the password and apparently successfully decrypt data. But even if I don't give TWRP my password my data is completely accessible and available! By connecting via ADB I can see that my data is accessible even before I've responded to the "Enter Password" prompt at all.

It's as if a NULL or NOOP encryption routine is being used!

Obviously, something is very wrong here and it's disconcerting that my data is not protected as I thought it was. I will do more tests and see if I can get more details on how / why this is happening.

Are there any tests I can run to help you with this?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
In all of this xiaomi.eu is not a encrypted rom, it is disabled by default, maybe only /data/app is encrypted, i wrote to use a global miui not because I like it but because it is the best example
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] clipcarl:
Ah, thanks! Good to know it's simply that xiaomi.eu doesn't encrypt (wow) and not a more serious problem. It is strange that both the ROM and TWRP show the phone as encrypted, though. I'll retest with Miui global.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] reg66:
Boot to twrp, select install, select image, locate new twrp image, flash recovery partition
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] eulipereira:
hello, some solution not to lose the twrp after a reboot?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] reg66:
After flashing twrp, press volume up and power together and hold until both until you get the mi screen again, let go of power but keep holding volume up until twrp has booted, it should now stick
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] saturday_night:
I didnt test much more after flashing your - 30 release because i see that there are some partitions missing to get a full working Backup on mi 9. Thats written in the Chinese forum where the closed source twrp is coming from:

For a Full Backup and switching between Roms you need to Backup:

boot

cache

system

data

vendor

firmware

dtbo

recovery

And i cant Backup some of them with your twrp. But i see luckily there is another tester with some more free time helping you now.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] marcel112:
So if you flash latest 34, and format data you can make nandroid, including backup data?

I flashed 34 without format data and can't that's why I ask
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] Ulver:
Is it just me, because I can't seem to find the dtbo partition to flash the overclock mod. Thanks!
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
I need to check
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
TWRP 3.3.1-35 cepheus:

Added DTBO target in flash image menu.

TWRP 3.3.1-35 Unofficial by mauronofrio
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] kiki059:
Hi guys need your need! I failed my Install twrp.

I have flash twrp like boot ... ?

So now I have bootloop twrp. I have tested all alternative... nothing works. I have dl rom EU extracted boot.img for reflash but nothing.. impossible to reinstall rom from settigns device .. reboot always twrp ..

any idea for save my phone?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] Kris Chen:
Have you unlock your bootloader before flashing twrp?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
Flash again the rom from the twrp
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] kiki059:
already try with .zip don't works :/
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
Try wih a fastboot rom
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] eraser.nau:
reboot into recovery needs decription pass? how can i disable its?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] davigotardo:
I'm having the following error when I try to install magisk:

update process ended with error 1
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
Try to unmount system
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] Addymore:
[MENTION=4712355]mauronofrio[/MENTION] the twrp is always causing error 7 while flashing miroom miui roms....!!!!
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
Send a log, error 7 is a generic error
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] smeroni68:
Are you referring to OTA updates or Full Rom zip files?

Inviato dal mio MI 9 utilizzando Tapatalk
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] marcel112:
Hello,

i tried to backup GSI rom, it fully worked without errors.

After trying xiaomi.eu rom, trying to boot Hovac, i dicided to restore my CRDroid backup.

It fully worked without any errors.

ps, i am on .34

Ps, i was having problems booting xiaomi.eu after make nadroid, it boots but keeps stuck at : wait a minute...

dont know if its twrp related
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] Addymore:
Full zip rom

---------- Post added at 08:17 PM ---------- Previous post was at 08:16 PM ----------

How to generate one...?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
So, you need to reproduce the error in twrp, so just try to flash a full zip rom.

Then using adb you need to take the log and save it a .txt file or pastebin

To take the log:

adb shell cat /tmp/recovery.log

Run this command always when you are in twrp.
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] smeroni68:
Please can you link a full zip rom of a miui you have issue to flash with twrp?

Just to understand, are you downloading full rom zip from here?

http://en.miui.com/download-361.html#587

... and you have problems to flash these zips with twrp?

If yes, have you read the Flashing Guide available there?

If yes, you are trying to flash something that need adb or fastboot procedure.

Inviato dal mio MI 9 utilizzando Tapatalk
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] Addymore:
https://sourceforge.net/projects/miroom/files/9.6.27/Mi9_MIUI_9.6.27_MiRoom_9.0.zip/download

---------- Post added at 09:15 PM ---------- Previous post was at 09:12 PM ----------

Thx.... Let me do it...
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] smeroni68:
Waiting a screenshot or log to see what's happen. Tks
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] Addymore:
attached
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] miss:
recently made backup, the keep in a pem, installed rum, I copy it to the folder of twrp and when I want to restore the twrp does not see the partitions, if myth in the file manager there is the backup
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] roxdragon:
Hi, I have unlocked the bootloader on MI9. I wanted to install this shot and then put xiaomi.eu on the internet but see many different guides .. basically I come from oplus.

1. Once the bootloader is unlocked, flash your TWRP with fastboot. By recovery and just a wipe data cache and dalvik? or even I trained?

I currently have the global. Never flashed on MI9.

2. I read about flash disabling enforce encryption and lazyflasher. do I really need it?

3. Is this rom to be installed? xiaomi.eu_multi_MI9_9.7.4_v10-9?

Will you tell me please?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] tawa2525:
having problem installing magisk too

my process were like this

- install latest full global stable rom (10.2.9.0)

- ota update to 10.2.12.0 (cant file a full fastboot rom, so I can only install from ota update)

- install this twrp (ver. 35)

-flash magisk zip

- boot to os

-setup phone including passcode and fingerprint

- install all update from magisk manager - reboot

- twrp ask for passcode

- fill in passcode and stuck in twrp, unable to boot to os

any suggestion?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] roxdragon:
Have you flashed dm-verity and enforce disable encryption after rom flash?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] tosonny:
hello people, I'm just surviving to buy a Mi 9. So I check out the custom rom market a bit. I came across this rom and have seen on the download page that the file is an incredible 2.1 Gb. I have never seen a rom that is so big. How can that be?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] yukimaru2215:
Rom??? This is twrp recovery thread lol

---------- Post added at 12:05 PM ---------- Previous post was at 12:02 PM ----------

And yeah only miui roms came with that size , aosp roms less than that
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] txdvil:
I tried installed TWRP from this thread but now my mi9 keep boot to twrp not to the system. please help
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] mauronofrio:
Flash magisk and you will be able to boot in the rom again
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] joshua999:
I flashed the 35 version TWRP but got stuck in fastboot. any good suggestion??
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] allrockedout:
After wipe dont reboot into twrp. Wipe than flash
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] joshua999:
i can not enter the TWRP now. power on the machine then enter FASTBOOT directly. any good suggestion for that? which twrp is better? 35 version?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] allrockedout:
Restore stock miui via fastboot method
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] AndroGeassX10:
i have the 3.3.1-34, any problem when update to the -35?, reading is a problem with twrp bootloop?
[Xiaomi Mi 9 ROMs, Kernels, Recoveries, & Other Dev] joshua999:
direct mount the Cache & data partition without restart TWRP, then i can not copy the ROM file to mi 9.

would you please inform me how to flash ROM with restart TWRP? thanks!