I'm stuck with trying to install MIUI for some days now, i'll try to describe my problem as precisely as i can (and by advance, sorry for my english ).
I came from RR custom rom, then tried the last ZUI 4 official rom (all OTA updates), but battery life was quite bad. So i decided to flash MIUI, coming from ZUI 4.
I followed step by step all tutorials i found, included those in this thread.
So i unlocked bootloader, and flashed TWRP. But here came the troubles.
With an old version of TWRP, i can mount all partitions except /vendor, so i was stuck with flashing vendor2factory image. The flash says "success" but a red line says "failed to mount /vendor". I tried an even older version of TWRP, you can't even choose to mount /vendor in this one, flash seems to work, but after flashing new-twrp.img, /vendor partition still appears.
I tried to continue but in new-twrp (so 3.3.0-1), i can't mount /data now! So no access to my MIUI.zip or anything. I tried all i found on the web, repairing /data or formating to ext2 then back to ext4, no effect.
So i tried to flash MIUI.zip with an older version of TWRP, after a full wipe, then wiping cache+dalvik, flash seems to work, very few lines in TWRP (i don't know if it is normal or not), then reboot, MIUI starts, asks for sim PIN, and then black screen saying that phone may be encrypted and factory reset need to be done, but i can only press a "reset" button on the screen, which gets me back to recovery mode.
So i tried to begin another time, with a clean flash from zui 1.9 with Qfil, doing all OTA updates to 3.5, unlocked bootloader, flashed twrp...
And the nightmares repeated again, can't mount /vendor on older TWRP versions, can't mount /data on last TWRP.
Cherry on the cake, i can't even figure why, Qfil now also started to sh*t on my face, saying "ERROR: function: main:259 Could not connect to \\.\COM95 - Download Fail: Sahara fail [...]". Even after clean uninstall + uninstalling all ADB related ports with usbdeview, swaping usb ports, swaping Qfil version, i can't get it back working again. It detects my phone well, same for adb commands, but can't flash anything, even when trying to click "download content" right when phone boot in Edl mode.
I succeed flashing MIUI... Dumb me, didn't remember that formating data in TWRP>Wipe>Format Data> type "yes" was mandatory to flash a non-zui rom... That was also the reason why i couldn't have access to /internal storage in the last version of TWRP. But i couldn't have access to phone via my computer in last TWRT.
So i did Format Data and wipes with an old version of TWRP, transfer all files needed for the flash with this old version, then flash vendor2factory and last TWRP version, reboot recovery, flash MIUI + baseband. And tadaaaa.
I still don't get why some versions of TWRP can't get detected by conputer and why Qfil just ignored my phone, but i think that i'll stay with MIUI for some times now ^^' .
Btw, thank you all for your explainations and shares about roms and stuffs, this will keep this great phone alive for some more years! Great work!