[Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D] Robbo.5000:
Here's a quick guide to some of the basics.

Which recovery.

----------------------------

Use the latest from here.

https://xdaforums.com/k20-pro/devel...icial-twrp-xiaomi-redmi-t3944363/post79823568

Do not use Orange Fox unless you intend to stick with stock MIUI. Orange Fox has extra features, which are almost all aimed at MIUI, but it often causes issues flashing custom ROMs, so it's a long way from the best option if you want to use custom ROMs. Orange Fox, along with other TWRP derivatives, allow complete access to virtually all of the phone, so it is very easy to accidentally hard brick the phone if you don't fully understand what your doing.

Ignore anyone who tells you to use Orange Fox when using custom ROMs.

Do I need to permanently disable encryption

-------------------------------------------------------------------------

No.

There is not a single reason to permanently remove encryption, other than personal preference.

It is recommended to have encryption removed when flashing, but this is easily done by temporarily removing lock screen security before flashing and adding it back after.

Ignore anyone who tells you that you need to flash a DFE (disable force encrypt) script.

Should I wipe all my partitions when flashing

------------------------------------------------------------------------------

No.

When clean flashing you only need to do a factory reset in TWRP.

There is absolutely no need to wipe system or vendor partitions. Ordinarily, when flashing, there is no need to go into the advanced wipe menu. I've had this phone 15 months and have never used the advanced wipe menu and have never had any issues.

When you flash a custom ROM, it will automatically wipe system first, so you don't need to do this yourself.

When you flash a vendor file, it will automatically wipe vendor first, so you don't need to do this yourself.

Even though almost all (it may actually be all) ROM flashing instruction tell you to wipe system, it is not needed.

Ignore anyone who tells you to wipe anything more than data, cache and dalvik.

Do I need to update my vendor and firmware when flashing a new ROM

-----------------------------------------------------------------------------------------------

Probably not.

If you currently have MIUI installed and it's up to date, then you will have the latest firmware and vendor and won't need to flash them.

If you're moving from one custom ROM to another, then it depends on how up to date your current ROM is. If the vendor and firmware requirements of the new ROM match the requirements of your current ROM, then will have the current vendor and firmware already installed and so do not need to flash them again.

Only when the new ROM needs a later version of vendor and firmware than you have currently installed will you need to flash them. This isn't such a common occurrence, so you'll not need to flash vendor and firmware often.

How to install a custom ROM over MIUI and remain encrypted

-------------------------------------------------------------------------------------------------

Assuming you have already unlocked the bootloader.

1 Boot into fastboot

2 Flash TWRP (fastboot flash recovery <path to TWRP file>

3 Immediately boot to TWRP (fastboot oem reboot-recovery)

4 Select Wipe Menu and Factory Reset

5 Return to Wipe Menu and Format Data

6 Return to Main Menu, then select Boot Menu

7 Select Boot to Recovery (this reboots TWRP to ensure the data partition is properly mounted after formatting)

8 Copy ROM and extras over to phone and flash them.

9 Reboot and enjoy.

Do not add any extra steps, do not miss any steps out

How to dirty flash a custom ROM update when encrypted

---------------------------------------------------------------------------------------------

1 Remove lockscreen security (this removes encryption)

2 Boot to TWRP

3 Flash the ROM update (plus vendor and firmware if the requirements for these have changed in the updated ROM)

4 Select to wipe cache and dalvik when the update finishes.

5 Reboot the ROM

6 Restore lockscreen security

How to clean flash a new custom ROM over another custom ROM

--------------------------------------------------------------------------------------------------------

1 Remove lockscreen security

2 Boot to TWRP

3 Select Wipe Menu and Factory Reset

4 Flash the ROM plus the extras you want (this includes new vendor and firmware if the requirements are different to your current ROM)

5 Reboot the ROM

6 Add lockscreen security