I very much hope that before installing the firmware you have made a backup.
Next, I will describe how to install the firmware I'm using TWRP.
How do you – you choose.
To install the MIUI you need TWRP recovery.
1. You copy all the information on your computer.
2. Before moving to the next step, make sure that TWRP has access to files through a point USB OTG instal. But do not install!
3. choose the WipeAdvance WIPe in TWRP menu. Select Partitions to Wipe:
Dalvik/ART Cache
System
Cashe
Data
Internal Storage
Storage,
Swipe…
4. Return to the main menu. Click InstallsSelect StorageUSB OTG. In the list of files, choose the firmware zip file.
5. Swipe…
If done correctly – the installation begins. We are waiting for the end.
Done…
6. Wipe Dalvik/Cache, Reboot system.
7. If you need Root – instal, not need – choose the appropriate button.
Reboot…
Logo Miui…Vibration …Start menu…