I have a pyxis Mi 9 Lite/CC 9 with a stock global EU ROM, unlocked the bootloader with the Mi account procedure, tried the TWRP, encountered a bootloop after installed Magisk and some minor issues as others posted, here is how I fixed them:
Issue 1 (fixing the bootloop):
First important step, this is not suffice:
fastboot flash vbmeta vbmeta.img
instead you have to flash the vbmeta exactly with this terminal command (as explained in the OP):
Booting in fastboot mode holding
Power + Volume-
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
To do it properly you need to use this:
HTML:
https://developer.android.com/studio/releases/platform-tools
I used the latest available version:
29.0.5 (October 2019)
If you are on Windows OS you need also to install the
Microsoft Visual C++ 2015 Redistributable Update 3 RC
I'd advise to don't use any other mini adb fastboot tools or standalone packages that surely are outdated.
Issue 2 (fixing the unable to mount or format DATA partition without reflash any system ROM):
Since I had a fingerprint encryption, at a certain point I was unable to mount or format properly the DATA partition, then as explained also on other threads, from TWRP I converted it manually to the ext4
Holding
Power + VolumeUP reboot to TWRP Recovery
From menu Tap
Wipe ->
Advanced Wipe ->
Select ONLY Data ->
Repair or Change File System ->
Change File System -> Select
exFAT and swipe to confirm
After done, repeat the same steps and this time change it to
Ext4 .
Return to the TWRP main menu tap
Mount and check if you can read the Data partition.
Now to root the device you can flash the Magisk zip copying it into the Data partition (or external microsd) from TWRP menu tap
Install and select the path to the Magisk zip swype to flash:
HTML:
https://github.com/topjohnwu/Magisk/releases
I used the Magisk v20.2 zip and it worked.