yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] raupe:
sorry pls delete - double answer

---------- Post added at 02:27 PM ---------- Previous post was at 02:17 PM ----------

... the problem with the TWRP bundled with their ROM is: it forcefully overwrites the installed TWRP without notice or choice - and it is completely in chinese letters by default (what is no problem ... if you are a chinese or can read their kanji ;) )

Iv'e opened a bug report on xiaomi.eu to have them aware of the situation.

see: https://xiaomi.eu/community/threads...talled-twrp-overwritten-without-notice.52940/
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Francesco hunt:
my device hangs in the bootloader after rebooting from the twrp ... I have to fleshare the vbmeta file first of all or dp the installation of the twrp I can't understand how I have to do to get out of the block! ..:eek:

---------- Post added at 07:19 PM ---------- Previous post was at 07:18 PM ----------

my device hangs in the bootloader after rebooting from the twrp ... I have to fleshare the vbmeta file first of all or dp the installation of the twrp I can't understand how I have to do to get out of the block! ..
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Zezebro:
Can't access internal storage after full wipe

So I've recently started using this TWRP for the decryption of Android 10, and today I attempted to make a full clean installation and when I booted up to the recovery I was asked for the password to decrypt the internal storage, and after decrypting it, I wiped everything in the advanced wipe, and afterwards I tried to install the ROM via adb sideload as I've done in a lot of phones, and to my surprise, it failed. I tried push the file, it also failed. Then I flashed the old TWRP I used before where the sideload worked, but also no luck. Flashed this one again, and then somehow I rebooted the phone back to TWRP and the PC detected the internal storage and I was able to copy the ROM zip, and flash it via TWRP. And it all went fine, and the phone booted without any issues. But then after configuring everything I noticed apps failed to update in the play store, when I accessed the camera it kept warning me to insert an SD card to be able to use the camera, and when I went to the file manager, there were no folders there and I also can't take screenshots.

Why is this happening? I tried a factory reset but to no avail... I've done this process this exact way in a Mi 5, Mi 5s, Mi 6 and Mi mix 2 a bunch of times without any issues...

Can anyone help and shine a light on what went wrong?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] rp158:
[MENTION=10041792]Zezebro[/MENTION]: to 'reset' encryption, you've to format /data, wiping isn't enough.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] rek0:
Hello. I flashed twrp-3.3.1-11-Mi9SE on MIUI Global 11.0.4 and on terminal everything looks fine but when I reboot to recovery I get stock recovery. I didn't try flashing vbmeta yet but the phone doesn't boot into fastboot. Any suggestions please?

Nevermind, I removed password and it got installed properly
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Zezebro:
Thanks for replying!

Maybe that's what I did wrong... But I was able to solve it using orange fox recovery.. While flashing it force removed encryption. But I shall try that next time.

But was it due to the storage being encrypted that I couldn't use adb sideload? Because I was able to transfer files to the phone while in TWRP, because the PC still detected it as media device. :confused:
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] rek0:
Actually my issue with not being able to properly flash TWRP on encrypted device seems to be something bigger:

1. When I power off device and press Power + Up, TWRP loads correctly.

2. When I reboot into bootloader and then press Power + Up, TWRP loads correctly.

3. When I reboot from TWRP into recovery again, TWRP loads correctly.

4. When I boot into System and then reboot into recovery, TWRP is gone and replaced by MIUI Recovery 3.0.

I have to reflash TWRP and execute

fastboot reboot recovery

to boot directly into TWRP. Doesn't matter whether password is set or not. Settings made before reflashing are preserved.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] elpaablo:
After you flash twrp, you have to press power and vol+ to reboot to twrp before booting into system, so that twrp persists. Fastboot reboot recovery will send you to stock recovery.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Damara_Project:
can this disable dm-verity completly?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] redispade:
Always remove pin/password/pattern before doing any operation on twrp like backups/rom installation. This excludes only OTA and same rom zip updates (dirty flash)

Miui replaces always with default recovery, unless you boot first into twrp and use swipe to allow system modifications. Also fastboot reboot recovery does not exist. You have to boot twrp by keeping volume up while using fastboot reboot (or power button for 10seconds)

Yes everything is on download page:

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] washbarbosa:
loop screen

Im in loop, I try to disable verity with the code on the description, but I got this error, and now my cellphone are looping.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Jim_Knopf:
I have installed mi-globe Android 10. Now my TWRP doesn't ask for decryption password.

Also decrypt with Terminal doesn't work.

Amy Idea?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] mmiyahki:
Hello everyone. My twrp was gone after updating to miui 11 along with magisk. My phones IMEI is repaired so not original. If i want to install twrp again, will the IMEI be deleted or not. Im not gonna do any recovery/format just wanna use some modules.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] itfollows:
I got into the same situation after trying to switch xiaomi.eu from MIUI 10 -> 11.

TWRP was prompting for a password fine until I flashed the ROM. Then TWRP stopped prompting for a password. cmdline decryption also didn't work.

Ended up wiping everything and starting from scratch.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Defforest:
[MENTION=5226122]redispade[/MENTION] thank you for this awesome twrp build. But I'm getting error when to make data backup. It always with end with extractTarFork() process ended with ERROR: 255

Already did disable/remove all lock/pin/fingerprint to make sure every secure things off, but always same result of error 255 code.

So, what is wrong?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] redispade:
Post twrp log
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Defforest:
[MENTION=5226122]redispade[/MENTION] Here I attach recovery.log you can download from below, and remove the .7z extension because .log only has 512kb limit from xda.

I pick some error code here

failed to lookup tar policy for '/data/vendor_ce/999' - '103f79cc001207cf'
I:Error adding file '/data/vendor_ce/999' to '/data/media/0/TWRP/BACKUPS/MI_9_SE/2019-12-10--21-38-19_Masik/data.ext4.win000'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/MI_9_SE/2019-12-10--21-38-19_Masik/data.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
I:Copied file /tmp/recovery.log to /data/media/0/TWRP/BACKUPS/MI_9_SE/2019-12-10--21-38-19_Masik/recovery.log
I:Set page: 'action_complete'
I:operation_end - status=1
I:Set page: 'clear_vars'
I:Set page: 'backup'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'copylog'
I:Set page: 'action_page'
I:operation_start: 'Copy Log'
I:Copied file /tmp/recovery.log to /data/media/0/recovery.log
Copied kernel log to /data/media/0/dmesg.log
Copied recovery log to /data/media/0/recovery.log.
I:Set page: 'action_complete'
I:operation_end - status=0
I:Set page: 'clear_vars'
I:Set page: 'advanced'
I:Set page: 'copylog'
I:Set page: 'action_page'
I:operation_start: 'Copy Log'
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] redispade:
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1237

Check with another recovery, but I suspect it's the same problem
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] iNordap:
I flash TWRP, after i reboot my device on recovery mode, i flash magiskv19.3. I reboot but it doesn't start the system and after a few minutes it sends me back to recovery mode. What should I do? Help :c
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] elpaablo:
Fresh install?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Voodoojonny:
Before backing up, go to filemanager (in twrp) and delete the (empty) folder /data/per_boot. Now your backup of data should work!

Edit: As you can see in recovery.log in your case the file/folder that can not be copied is: /data/vendor_ce/999. Deleting this one will solve your problem
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] taxik:
didn't work for me.

What worked:

Open Terminal Emulator and type:

su
pm remove-user 999

S/O to kerisky for idea!
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] zertyuiop:
After installing TWRP, rebooting to TWRP, swiping to allow write, rebooting to system and to recovery again I got stock recovery. No password/pin, fresh install MIUI 11.0.6.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] vecino:
Please I have this issue - I did full wipe and flash stock ROM via MiFlash. After that I flashed your TWRP-3.3.1-11 and install miui.eu ROM ... all is ok but after few days if I restart to recovery ... your recovery is gone and there is recovery from TWRP by LR.Team/wzsx150. Yes few months back I tryed this recovery but I think if I do MiFlash it will be removed. Is there any partition where is TWRP by LR.Team/wzsx150 saved or how can I delete this recovery?

Thanks
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] nJoy-Android:
AFAIK in Xiaomi.eu Beta Roms, there is this LRTEAM-TWRP included. After flashing this rom, LRTeam-TWRP would be flashed also.

You have to flash this recovery manually if you wish.

Otherwise you could unzip the update from Xiaomi.eu and delete the Recovery folder inside.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] vecino:
[MENTION=5127194]nJoy-Android[/MENTION]

Many thanks ... I did not notice that it is part of Xiaomi.eu rom ... then it is clear and I will cope.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Bolemichel:
I'm on 3.3.1-11-Mi9SE since a couple of months now and found out a mystery thing:

Unfortunately, I can’t erase data for any system app (email, gallery, browser...). There is only the possibility to clear cache but no data. Could the reason be TWRP and is it due to missing permissions? Mi9SE Phone is not rooted yet.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] hotshotbg:
Thanks for the great work but I want to ask will this recovery ever become Official? Why not submit to official TWRP team?

Thanks!
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] redispade:
No, I'm developing it with a custom theme and with extra things that I like. I also don't plan on maintaining it officially for the lack of time. I build whenever I can, or if there is a critical bug. Device tree is on github anyway, if anyone wants to go official, you are free to do it.

Btw, new version posted in first page.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Deedend:
Hi guys,

I have an issue with my Mi 9 SE, a while ago I have unlocked the bootloader and installed xiaomi.eu weekly, all good until I've tried to install the stable version, it screwed up everything so I had to re-flash the stock rom (with mi flash), re-unlock the bootloader (luckily I hadn't to wait one week) and when I went to flash TWRP with fastboot (I use minimal ADB fastboot), it seems to work, but when I reboot into recovery I find the stock one. There are no errors in the command line when I flash via fastboot though, any suggestion of what can go wrong, and how to fix it? My bootloader is unlocked and I currently have 11.0.6 Global stable, the phone works normally, but of course I want to put on xiaomi.eu stable instead of global stable!
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] dzidexx:
You can't boot system. It restore stock recovery.

fastboot flash....

Enter

Fastboot reboot

Hold vol+ & power

Enter

[MENTION=1347655]Deedend[/MENTION]
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Deedend:
Solved this way, Thanks!!!
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Claudio4780:
Update to latest version : 3.3.1-16-Mi9SE
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] kxpa:
Thanks, Great job

Recovery TWRP-3.3.1-16

ROM RevolutionOS 20.1.31

Magisk 20.4 OK

EdXposed OK
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] JxreAcosta:
Hi! There is no risk of brick with this software? I ask because it is not official and I want to be sure so as not to cause problems. Can anyone also tell me which method is better to unlock the bootloader and be root user? Unlocking the bootloader restores the device?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] elwoodblues1985:
Hello everyone! I have a question and I hope someone can help me:

I unlocked my Mi9SE and flashed the latest TWRP Version (3.3.1-16). So far so good. I downloaded the Weekly MIUI EU Rom and wanted to install it as described in the MIUI Forum of the ROM. However, after Installation was complete (there was no error), the phone boots into TWRP again. Everytime I want to reboot the System it only starts TWRP. Not only that, when I want to install the ROM again, the Folder structure is completely gibberish with random letters. There was no other way as to use MiFlash with the Fastboot Version of the Stock Rom. Can someone explain to me what I did wrong and how I can fix that?

Thanks in Advance !
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] EpikurProd:
Hi, go to twrp, wipe, format data, type yes, reboot to recovery, wipe system vendor data then flash tour miui ROM.

NB : format data wipe infernal storage, so don t forget to copy ROM on device.

---------- Post added at 07:22 PM ---------- Previous post was at 07:15 PM ----------

This twrp works like a charm. You can t brick your device with it.

Before install it you need to unlock bootloader. You need to use xiaomi tool, but Google it to find some tutorial. In some case you need to wait 8 days. Check guide sections on xda forums.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] elwoodblues1985:
Wow thanks! That really did the trick. But I had to push the file onto the device via adb sideload because as you said, after the wipe all internal data was also gone. Now I was able to flash the EU.rom. thanks!
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] serg222:
TWRP 3.3.1-16-Mi9SE by redispade

Hello.

I flash twrp-3.3.1-16-Mi9SE.img (fastboot flash recovery twrp-3.3.1-16-Mi9SE.img). At the same time, custom TWRP did not boot, but the stock recovery and system OS booted.

Then did (fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img).

Now always downloads "TWRP 3.3.1-16-Mi9SE by redispade". From it it is possible to execute "Power Off" and "Bootloader" ("Recovery" by itself, of course, too). System OS is not possible.

Files on sdcard (internal storage) were renamed as: 5u0WCOcxzOmR, FYMyGgroB

vbmeta.img downloaded from the link at https://xdaforums.com/mi-9-se/how-to/guide-how-to-flash-twrp-gsi-roms-mi-9-se-t3939254 (https://drive.google.com/file/d/1-Np...w?usp=drivesdk)

Maybe this is due to encryption? I ask for help !!!
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] rp158:
[MENTION=10774011]serg222[/MENTION]: try SHRP instead
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] koff75:
Hi there,

I have the latest custom version of TWRP : "twrp-3.3.1-16-Mi9SE.img" which working fine.

I would like to update MIUI from 11.0.2.0 to 11.0.3.0 for the patch security.

I downloaded the recovery image from the MI website, then I used TWRP to install the .zip file. OK.

I installed MAGISK. OK.

Result: Impossible to boot on the system. ==> It loads TWRP on each reboot...

Any ideas to boot directly on the system and not on TWRP ?

Thanks :)
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] R!ffRaff:
thanks for your work, i have different devices, would it be possible to offer the stock theme? unfortunately I didn't find anything.

that shouldn't be a criticism either, it would be easy for me because of the habit.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] chris5s:
Just want to say thanks for this. Haven't come across a TWRP recovery that's been so all encompassing and done so many things flawlessly. I like the way it's bundled with Magisk and works! Kudos [MENTION=5226122]redispade[/MENTION]

Peace
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] cthulhu79:
I have the same issue, following this thread!
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] atmauki:
Just ask, you flash this recovery for what?

Cause if you flash this recovery to use custom rom, you must format phone memory. just backup manually
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] cthulhu79:
To install miui12. Installed shrp and being able to install rom, don't ask me why
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] gaberson:
error twrp to mi9se

hello, recently I installed twrp on my mi 9SE and when I pass the FIX so that it fixes it simply the following error: Update process ended with ERROR: 1 what i'm do?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] R!ffRaff:
installed the last version from here. the phone always only boots into recovery. clean installation of image and vbmeta does not work here. I also tried shrp - same problem. can anyone help?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] atmauki:
1. Flash latest Q fastboot rom with miflash,

2. Flash recovery (twrp) & vbmeta then boot recovery

3. Wipe system, cache, dalvick

4. Format data

5. Reboot recovery

6. On recovery mode, copy your rom into your device(from otg or PC)

7. Reboot
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] R!ffRaff:
had already done that yesterday and of course works. just do not understand why a weekly update breaks the whole system and it no longer boots. i tried the new version of twrp and sky hawk, bliss rom 13.05 & 22.05 - no chance. clean install does not work. the miui only solved the problem.

this has never happened to me in all the years. any ideas what it could have been?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] kagazushi:
Just use the march release of SHRP and it works.

No other recovery seem really ok for now...
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Humpfrey:
Had the same issue, just rebooting revovery all the time, no chance to start OS.

Just the solution above worked.

But will i have to set up a new phone everytime i´d like to update my phone to latest miui weekly?

i hope not..

even tried shrp recovery, makes no difference for me..

Cheers, and thank you for the solution above.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] v.konvict:
just to post this hear. had the issue of my gf phone booting into recovery only after 21-05 build update. nothing seemed to work to get it to boot so i tried everything.

i extracted the stock recovery and flashed it via fastboot then used the mi assistant option to flash latest stock q rom and eventually the phone booted up with 11.05 build and had to root again and flash the xiaomi.eu build i wanted. so now today they have released a new build am just worried if same thing will happen again or this is actually fixed with the latest recovery??

edit : can confirm the issue is still there
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] Humpfrey:
Thank your for this information, so I won't update by now.

But what's the reason for this? Is it caused by wrong recovery or is it rom related?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] atmauki:
If you just update to latest miui weekly, you only need wipe cache and dalvick then flash your update rom. I use miui eu weekly and update it every week.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] sounknownyet:
Where can I get latest ROM compatible with miflash? It seems like grus rom types do not work.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] chris5s:
https://xiaomifirmwareupdater.com/archive/miui/grus/

Select the fastboot ROM you want and flash with miflash - or can just use abd fastboot from command line and flash_all.sh or .bat after extracting the files.

Peace
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] sounknownyet:
Thanks for the response. I appreciate it.
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] mhoogveld:
I have tried these exact steps, but I'm still stuck in booting to recovery every time. I'm not sure how I can solve this. Am I missing a step or doing something wrong?

The 7 steps, as I have performed them, in more detail:

1. Flash latest Q fastboot rom with miflash

Downloaded latest official MIUI 11 fastboot ROM for Mi 9 SE from what appeared to be the most reliable source. https://c.mi.com/oc/miuidownload/detail?guide=2. (Source: https://c.mi.com/global/miuidownload/index)

After unpacking the 3Gb file named "grus_global_images_V11.0.2.0.QFBMIXM_20200310.0000.00_10.0_global_0fc5ca5acd.tgz", MiFlash would accept is and I flashed it to my phone (remember to choose "clean" and to bottom in MiFlash and not "clean_and_lock" so you don't have to unlock the bootloader again)

This resulted in my Mi 9 SE booting into a fresh stock MIUI 11. Always nice to know I can fall back to this again if all else fails...

2. Flash recovery twrp and vbmeta and boot into recovery

I flashed twrp-3.4.0 for Mi9SE from https://github.com/redispade/device_xiaomi_grus-twrp/releases

flashboot flash recovery twrp-3.4.0-0-grus.img

and (without reboot) flashed vbmeta.img from link in second post on https://xdaforums.com/mi-9-se/how-to/guide-how-to-flash-twrp-gsi-roms-mi-9-se-t3939254 (again, the best matching source I could find)

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

Then rebooted by issuing

fastboot reboot

(could not find a better way to "boot recovery" from a phone in fastboot-mode)

The phone rebooted into recovery.

3. Wipe system, cache, dalvick

In TWRP: Main menu- > Wipe -> Advanced wipe. Checked Dalvik, Cache and System. Swiped to Wipe.

4. Format data

In TWRP: Main menu- > Wipe. Clicked the "Format Data" button (next to "Advanced Wipe") and confirmed.

5. Reboot recovery

In TWRP: Main menu- > Reboot -> Recovery

6. On recovery mode, copy your rom into your device(from otg or PC)

Once in TWRP again, copied MIUI 12 ROM from https://xiaomi.eu/community/threads/20-6-11.56171/ to phone by issuing

adb push xiaomi.eu_multi_MI9SE_20.6.11_v12-10.zip /data/

In TWRP: Main menu-> Install. Selected the ROM I had just uploaded in /data. Left the "Check zip signature" checked and "Reboot after install" unchecked. Swiped to install. (I've tried both with and without installing the TWRP app after the installation)

7. Reboot

Rebooted the phone from TWRP Main menu -> Reboot -> System

After this, it still just keeps rebooting to recovery (TWRP).

What am I missing here?
[Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other ] chris5s:
I don't think it's necessary in step 3 to wipe system, in fact I'm sure I have read that you *shouldn't do that!

If you want to run xiaomi.eu ROM, this worked for me (from a clean global ROM, unlocked bootloader):

Flash TWRP; reboot to recovery (pressing vol + and power works too); format data; reboot recovery; transfer xiaomi.eu ROM to phone; flash ROM and reboot to system.

If you want root, flash Magisk 20.4 after installing ROM (you may need to reboot recovery before doing this to get it to flash). Then reboot to system

Peace