After many hours of frustration and bootloops I found the solution for installing custom ROMs for the first time on my Mi 10 T Pro. It always involves losing your data. I am in doubt that there's a good process at the moment that'll allow you to keep your data when moving away from the stock ROM. The process goes like this:
1. Put the phone into fastboot mode. Do not install any TWRP but simply boot into it with i.e.
In my test I found a very slick looking TWRP called Pitch Black but that did not even let me boot into recovery and caused a bootloop into recovery when flashed. So again, LEAVE OUT THE FIRST STEP on the ROM release pages that says "fastboot flash recovery twrp.img" for Mi 10 T/Pro.
2. When in TWRP transfer your ROM (and Magisk if you want root) from your PC to the internal storage. With the correct drivers on your PC you should be able to do a data transfer as always. Flash ROM and optionally Magisk. Do not flash DMVerity remover or any such software that you might have read about on other pages!
3. After you have successfully flashed ROM and Magisk, reboot once again into recovery, not into system.
4. You'll now find yourself in stock recovery. You'll have to do a data wipe. After that you can boot into the system of your new ROM. That's it.
You might be able to flash TWRP permanently after this but I would advise against it. Incompatible TWRP is the main source of bootloops (fastboot and recovery loops amongst them). For some reason stock recovery is the only way to correctly wipe the data partition. This might have something to do with the filesystem and/or SE Linux context but until somebody finds out a secure alternative method I for my part will not flash TWRP.
If you want to upgrade your custom ROM the next time, you should be able to do it with steps 1-3, booting into system after that.
1. Put the phone into fastboot mode. Do not install any TWRP but simply boot into it with i.e.
fastboot boot twrp.img
In my test I found a very slick looking TWRP called Pitch Black but that did not even let me boot into recovery and caused a bootloop into recovery when flashed. So again, LEAVE OUT THE FIRST STEP on the ROM release pages that says "fastboot flash recovery twrp.img" for Mi 10 T/Pro.
2. When in TWRP transfer your ROM (and Magisk if you want root) from your PC to the internal storage. With the correct drivers on your PC you should be able to do a data transfer as always. Flash ROM and optionally Magisk. Do not flash DMVerity remover or any such software that you might have read about on other pages!
3. After you have successfully flashed ROM and Magisk, reboot once again into recovery, not into system.
4. You'll now find yourself in stock recovery. You'll have to do a data wipe. After that you can boot into the system of your new ROM. That's it.
You might be able to flash TWRP permanently after this but I would advise against it. Incompatible TWRP is the main source of bootloops (fastboot and recovery loops amongst them). For some reason stock recovery is the only way to correctly wipe the data partition. This might have something to do with the filesystem and/or SE Linux context but until somebody finds out a secure alternative method I for my part will not flash TWRP.
If you want to upgrade your custom ROM the next time, you should be able to do it with steps 1-3, booting into system after that.