[Xiaomi Mi Note Pro] Aqq123:
The Initial Steps: Preparing the Device & Choosing the ROM

Starting with a Clean Slate

Download the latest Chinese Development ROM along with the userdata partition by clicking this direct download link. If the link does not work, go to this page and search for "小米Note 顶配 最新 开发版". Unpack, edit the file flash_all.bat to remove the fastboot reboot line at the end. Put device in fastboot mode, check that it is connected with fastboot devices and execute flash_all.bat.

This will completely wipe everything on your device, bringing it to a factory-like state (but with the latest developer version flashed). Later, if you make some extensive changes to the filesystem and want to roll back, this should do the trick.

Flashing TWRP Recovery

Attached to this post is the version I made for myself. It is TWRP 2.8.6.0 based on GanFan and Happy MIUI's Chinese version of June 13, 2015, an improvement upon the English version GanFan released earlier (May 27, 2015), which was the one posted before on XDA. The newer version was only posted in the Chinese forums. All credit for the underlying TWRP build is due to GanFan and Happy MIUI.

I have removed any customizations from the filesystem, bringing it back to stock TWRP, using TWRP for LG G3 Europe (d855) as a base, as it has the same screen resolution. I have then merged the TWRP Materialised Play theme directly into the image, along with the official "Light-Light Blue" splash screen (curtain). TWRP is version 2.8.6.0 but the integrated theme is 2.8.7.x, as it fixes some bugs and appears to work just fine.

To install: unzip first, fastboot erase recovery, then fastboot flash recovery <filename>. You can then do fastboot reboot while holding the Volume Up button to get into the recovery.

Changelog

2015-12-31: Updated to set the ro.product.device property to "leo" so that Edify scripts that check for compatibility will now work.

Outstanding Issues

Sometimes the screen might be difficult to unlock because the swipes need to be very precise for them to register. I recommend to disable the screen timeout in the TWRP settings once in the recovery mode.

Wiping all partitions by formatting them appears to be introducing some problem, probably due to fstab discrepancies. Consider changing the relevant setting to use rm -rf for wiping if you plan to use this function.

Choosing the ROM Base

There are a lot of MIUI releases, of which the notable include:

The Official China Developer ROM (click the second green button under the headline "开发版" to download). This is always the first version to get the new features. It also includes a lot of China-specific apps you might want to get rid of while not having any translations besides that of the few Asian countries where Xiaomi products are sold officially. Lastly, it is not de-odexed.

Xiaomi.eu's Unofficial International MIUI is de-odexed and includes translations to Western languages, along with minimal GApps and some configuration changes most of which are fine but some you might want to revert (more on this later).

MIUI Pro is an alternative quality de-odexed ROM to check out, being Russian-based it does not however include Western translations. It is closer to the stock ROM in some areas, while deviating more from it in some others.

I went through the most recent releases of each of the three ROMs comparing their differences before I made up my mind which one to choose as a base. Starting with the original MIUI and de-odexing it, perhaps also adding your own translations in the process, might be a lot of fun but it'll also take you some time, and will be mostly redoing the work that has already been done elsewhere, so for now I settled upon using Xiaomi.eu's release. I went through all the changes they're doing to the stock version and find most of them reasonable, while starting off their version saves me some work.

If you are inclined to start with the stock version, there's a certain tool called jBART (released by the author of MIUI Pro) that provides a GUI to do all this, making it much easier than it used to be (the tools used by Xiaomi.eu are not publicly available).

Having downloaded the ROM of your choice, you can now start making the changes as described below. It's a good idea to keep a record of all the changes you make against the original image so that you can re-create them in future versions or roll back if necessary. It'd be even better if after making the changes you go back to the clean slate and then re-apply them from your records, to make sure that nothing else was accidentally changed.