Disclaimer : I am not responsible for any bricked device, all responsibility bears the user.

Credits : This is not my work and all credits goes to Abhishek987 @ XDA Developers

Team Win Recovery Project (TWRP) is the most famous custom recovery used by the people who like to flash custom roms, patches, flashable zips etc. TWRP is released for Redmi Note 4 SD (Mido) officially. The latest version for Mido is TWRP 3.2.3-1.

This means that swiping to allow system modifications will prevent you from being able to boot if you are using the stock kernel. In order to bypass dm-verity's boot prevention, you will have to install a kernel that has dm-verity disabled in the fstab.

Installation By PC

1. Install fastboot tools - minimal adb and fastboot2. Download twrp image and rename it as "twrp.img", then copy it to the Minimal ADB and Fastboot folder

3. Download lazyflasher zip and copy it to device storage4. Boot the device to fastboot mode - press and hold power button and volume down button5. Connect device to pc6. Open command prompt from Minimal ADB and Fastboot7. Run command " fastboot flash recovery twrp.img "8. Twrp will be flashed immediately9. To boot in to twrp run " fastboot boot twrp.img " or disconnect device from pc and press and hold power button and volume up button10. Device will be booted to twrp

Yes, there is no problems with ota. When ever ota comes you need to download it but do not update from updater app. After download reboot to twrp recovery and flash the update zip. Whenever an official miui update flashed it replaces twrp with stock recovery. So after flashing miui update zip, immediately flash twrp from twrp itself. You need to select "flash image" option and select twrp image file. (You should have twrp image in storage). Proceed to flashing it will ask to select which partition to flash the image - select recovery partition and confirm. Then it will flash twrp again. After flashing twrp image, flash lazy flasher zip file. It is important to flash lazy flasher otherwise miui will not boot and it will stuck at mi logo. Reboot to system after flashing lazy flasher. You are done. This is the method to flash official miui update and preserve twrp on update. I follow this method and it always works fine. No need of flashing twrp again from computer.

Read the post carefully. If these lines are not there in build.prop, you have to add to them using buildprop editor or an app that is capable of editing build.prop file. Install build prop editor from here and add these lines and restart your phone.
Link - https://play.google.com/store/ap ... op.editor&hl=en