[Xiaomi Mi Max 2  Guides, News, & Discussion] prathameshsd:
TWRP

Team Win Recovery Project is a custom recovery which is flashed over the stock recovery as it gives user more options such as flashing custom ROMs, kernels & scripts, take full system backups, restore backups, root etc.

TYPES OF TWRP

1. TWRP by iscle: https://xdaforums.com/mi-max-2/development/recovery-twrp-3-1-1-0-touch-recovery-t3652762

Based on Stock TWRP 3.1.1-0 with no modifications.

Ported from Redmi Note 4 (mido)

English language as default

Need to flash dm-verity zip immediately after flashing this TWRP, else your phone wont boot.

2. TWRP by xuefer: https://xdaforums.com/mi-max-2/development/twrp-max2-oxygen-t3634437

Built using LineageOS 14.1 source

Built and tweaked for Mi Max 2 (oxygen)

Decryption support added for /data

Faster transfer using adb push

Extra fonts added

FLASHING TWRP

Unlock bootloader here: https://xdaforums.com/mi-max-2/how-to/guide-unlocking-bootloader-mi-max-2-t3641257

Install "Minimal ADB+Fastboot Drivers": https://xdaforums.com/showthread.php?t=2317790

Download TWRP file and copy the file in the C:\Program Files (x86)\Minimal ADB and Fastboot folder

Download dm-verity disabler and copy the file in your phone: https://build.nethunter.com/android-tools/no-verity-opt-encrypt/

Switch off phone. Hold Power + Volume Down to boot into fastboot mode. Connect it to PC.

Inside the folder where TWRP file is present, open command prompt window.

Type "fastboot devices". Your phone will get detected with serial number.

Type "fastboot flash recovery <recovery_name.img>". TWRP will get flashed on your device.

E.g. "fastboot flash recovery twrp_3.1.1-0.img".

Type "fastboot boot <recovery_name.img>". You will boot into TWRP. Disconnect phone from PC.

E.g. "fastboot boot twrp_3.1.1-0.img".

On the screen, swipe to allow modifications and select your language. Uncheck "Keep system read-only"

Select Install and then choose the dm-verity disabler zip and swipe to flash.

Select Backup and check all partitions. Swipe to backup. The backup will be stored in "TWRP" folder

Select Reboot and then system. You will be asked if you want to disable the stock recovery. Swipe to disable.

You will boot into MIUI with TWRP installed.

TWRP ZIPs

These zips are meant to be flashed with TWRP with a specific order. Before flashing any zip make sure you have taken full backup of your device partitions using TWRP.

1. no-verity-opt-encrypt: https://build.nethunter.com/android-tools/no-verity-opt-encrypt/

Also called as dm-verity disabler/lazy flasher

"dm-verity" is a feature in the MIUI kernel which checks and prevents the phone from booting normally if you modify the phone. (e.g. flash TWRP)

To prevent that, you need to flash the dm-verity disabler zip which removes dm-verity check and also decrypts the /data partition so that you can boot into MIUI normally.

Else you can flash a custom ROM immediately after flashing TWRP which removes the MIUI system and kernel

2. Xiaomi.EU ROM Patch: https://xdaforums.com/mi-max-2/development/xiaomi-eu-rom-patches-dpi-change-t3656296

You need to install Xiaomi.EU ROM before installing these zips via TWRP.

MIUI to Google Apps: Replaces default MIUI apps with Google apps.

Google Now/Pixel Launcher: Replaces stock MIUI launcher and enables Google Assistant via build.prop tweak.

DPI changer: Change values from stock 440 (low res, bigger) to 325 (high res, smaller).

3. Hardware Key Disabler : https://xdaforums.com/mi-max-2/themes/mod-disable-hardware-keys-lineageos-rom-t3696108

This mod enables on screen navigation bar and disables the hardware keys

You can revert back to stock configuration by flashing "enable_HWkeys.zip"