[Xiaomi Redmi Note 5 / 5 Plus Questions & Answers] rvnlord:
For future reference I fixed this issue with Black Screen by flashing the newest MIUI firmware (not ROM), it appears that firmware partition had to be corrupted or my firmware was too old.

Here is the file: https://xiaomifirmwareupdater.com/miui/vince/stable/V11.0.2.0.OEGMIXM/

As for the issue with inability to mount storage ('/data') partition:

- As stated earlier it doesn't work in any version of TWRP at the moment

- I tried OrangeFox Recovery - touch not working.

- I tried Pitch Black Recovery and it mounts correctly: https://pitchblackrecovery.com/vince/

You see even if I was able to correctly boot my ROM I still had to mount '/data' because it turned out that trying to encrypt back my phone I was experiencing the issue described here: https://xdaforums.com/t/encrypting-just-reboots-the-phone.3405513/, caused by "Orig filesystem overlaps crypto footer region. Cannot encrypt in place." error.

It needs 16 kb of free space so I had to use 'resize2fs' which didn't work in TWRP with the parittion being unmountable.

`Pitch Black` (PERP) uses slightly newer 'resize2fs' (and entire suite including it) version (TWRP: resize2fs 1.42.9 (28-Dec-2013), PERP: resize2fs 1.43.3 (04-Sep-2016)), so I imagine this is what allowed me to move forward.

Installing `Pitch Black` has also fixed a long standing issue with broken encoding in 'adb shell' btw.

I backed everything up and tried to use the tool above:

vince:/ # resize2fs /dev/block/mmcblk0p50 57G
resize2fs 1.43.3 (04-Sep-2016)
The containing partition (or device) is only 13907833 (4k) blocks.
You requested a new size of 14942208 blocks.

Now I had more info:

4 k (kb) = 4 * 1024 b = 4096 b
partition has: 13907833 blocks = 4096 b * 13907833 = 56966483968 b
we need 16 kb of free space: 16 * 1024 b = 16384 b
new size is: 56966483968 b - 16384 b = 56966467584 b
in blocks: 56966467584 b / 4096 b = 13907829 blocks

Resizing threw:

resize2fs 1.43.3 (04-Sep-2016)
Please run 'e2fsck -f /dev/block/mmcblk0p50' first.

So I ran:

1|vince:/ # e2fsck -f /dev/block/mmcblk0p50
e2fsck 1.43.3 (04-Sep-2016)
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found. Fix<y>? y
yes
Inode 1368088 was part of the orphaned inode list. FIXED.
Inode 2121750 was part of the orphaned inode list. FIXED.
Inode 2121751 was part of the orphaned inode list. FIXED.
Inode 2121754 was part of the orphaned inode list. FIXED.
Inode 2121755 was part of the orphaned inode list. FIXED.
Inode 2121756 was part of the orphaned inode list. FIXED.
Inode 2121757 was part of the orphaned inode list. FIXED.
Inode 2121768 was part of the orphaned inode list. FIXED.
Inode 2121769 was part of the orphaned inode list. FIXED.
Inode 2121802 was part of the orphaned inode list. FIXED.
Inode 2121803 was part of the orphaned inode list. FIXED.
Inode 2121828 was part of the orphaned inode list. FIXED.
Inode 2121829 was part of the orphaned inode list. FIXED.
Inode 2121889 was part of the orphaned inode list. FIXED.
Inode 2121890 was part of the orphaned inode list. FIXED.
Inode 2121892 was part of the orphaned inode list. FIXED.
Inode 2121940 was part of the orphaned inode list. FIXED.
Inode 2121941 was part of the orphaned inode list. FIXED.
Inode 2121943 was part of the orphaned inode list. FIXED.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p50: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p50: 20071/3481600 files (2.9% non-contiguous), 2729092/13907833 blocks

After that the resize was successful:

1|vince:/ # resize2fs /dev/block/mmcblk0p50 13907829
resize2fs 1.43.3 (04-Sep-2016)
Resizing the filesystem on /dev/block/mmcblk0p50 to 13907829 (4k) blocks.
The filesystem on /dev/block/mmcblk0p50 is now 13907829 (4k) blocks long.

After that the encryption was successful, so 16 kb is all you need indeed (for the record I probably caused this issue by manually recreating '/data' parittion from the terminal).

Next was the problem with battery life decreased by 75% (it entirely discharged in 8 hours).

At first I used aggressive profiles and Naptime on top of it (I measure iwith Accubattery). Slow charging over USB was actually draining the battery instead of replenishing it.

It turns out that there must be a Bug in crDroid 7.13 (Android 11) because as soon as I disabled (ironically) battery management for all apps and battery saver (even with Naptime enabled) it dropped drastically.

Settings > Battery > Manage Apps Automatically > Off

Now I found out that speaker doesn't work...

..and the battery is still being drained way too fast.