TWRP ask for password - cant mount data partition I want to install an open ROM like AospExtended on a new Xiaomi Redmi Note 5 with stock MUI. To avoid issues with Xiaomi's anti rollback mechanism, I'd like to boot TWRP then copy its image and install it permanently as described in many posts like here. 

But TWRP can't mount my data partition, it asks me for a password. I had none set. Regarding to this post I tried setting a password for the lockscreen. Altough he has the same problem with an older version of android, it doesn't accept the password. 

Some threads like this recommend OrangeFox instead of TWRP. But the 9.0-1 shows the same behavior:




With 9.0.2 of OrangeFox it doesn't ask for password any more, so this seems to work. But why isn't it working with TWRP? This post said it's fixed in 3.2.3_1. Since I booted 3.3.1-0 like this: 

&gt; .\fastboot.exe boot D:\Downloads\twrp-3.3.1-0-whyred.img


This fix should be included. As a workaround, I'll try OrangeBox (especially in regard to OTA updates, havent tried OrangeBox before). But I'd like to know why those problem exist with TWRP and how could it be fixed? 

I've used TWRP over the time with different devices and it always worked well (also with OTA updates).
i have experienced this with two other Xiaomi devices. first i could track it down to older unofficial variant of twrp 3.2.3 which is still decrypting with default password when official twrp 3.3.1 fails. so implementation of decrypting differs from each build, sometimes it is just a missing line in fstab, sometimes they forgot a flag during build.
But this is not the full explanation. Recently working twrp started to fail after MIUI OTA update. This means the encryption depends on ROM (system or vendor) therefore these partitions need to be mounted for decryption (which twrp normally does automatically).
encryption security may have changed/improved with new android version and twrp has not implemented that in your build. I have also seen twrp variant which does successfully decrypt userdata but does not mount /data because of a wired parameter related to disk quota. Flashing a disk quota disabler may help in this case. basically its a try and error to find a recovery which is working - which you have found.
Your question is therefore ot and should be discussed on github or developer boards