Hi there! I’ve decided to make an all-in-one guide compilation to help every noob out there unlock, root, and flash custom ROMs on their Xiaomi Mi5s. Truth be told, before getting my very own Mi5s, I knew nothing about rooting android phones and didn’t really care much for it. But seeing as it was a necessity for a non-Chinese user like me to flash a Play Store supported and Multilanguage translated custom ROM (care of xiaomi.eu), it is likely that there are others out there with the same predicament as I had, with fears and doubts with the admittedly very confusing process. Chapter 1: Unlocking your Mi5s > This is an essential step! If your device is not unlocked you will not be able to flash Official ROMs via MiFlash nor Custom ROMs via TWRP. Source Guide: http://xiaomitips.com/guide/unlock-mi-5-bootloader/ TLDR You have to apply for unlock permissions by logging in and filling up an application form at Xiaomi’s Official Unlock Request Site: http://en.miui.com/unlock/ From there, it’s a battle of luck and patience in getting your application approved by the MIUI team. They say it can take 7-10 days but mine got approved in 3 days. The reason I used was “My Mi5s came with a custom ROM. Please approve my unlock permissions so I can flash the official MIUI ROMs.” Translated by Google, you get: 我的Mi5s配有一个自定义ROM。请批准我的解锁权限，以便我可以刷新官方MIUI ROM。 Feel free to copy-paste this on your unlock application. You will then have to download and use Xiaomi’s Official Unlock Tool to unlock your Mi5s: MiFlashUnlock: http://bigota.d.miui.com/miflashunlock/MiFlashUnlock_1.1.0317.1_en.zip Important Note: You have to be logged into your Mi Account on your Mi5s before using the Unlock Tool! The process is very straightforward afterwards but you may encounter a few driver-related issues along the way that will cause the Unlock Tool to get stuck at or fail at 50%. Here are a few methods that may resolve this issue: 1. Manually uninstall the old drivers using “Device Manager”, restart your computer and reconnect your Mi5s. 2. Try different USB ports (preferably USB 2.0) on your PC, or try using a different PC with a different OS (preferably Windows 7). 3. Try using a different USB Type-C cable. Other Notes: - It may not necessarily be required for the phone to be at China Stable/Developer ROM to unlock your phone. In my case, my Mi5s was running on a custom ROM (V126.96.36.199.0.M), which prevented me from updating to the China Stable/Developer ROM using the System/Recovery Update Methods, but I was still able to unlock it. - You can apply for unlock permissions even if you don’t have a Xiaomi phone yet. Just register at the forums and you can apply in advance. - You can only unlock 1 phone every 30 days per account! You can however create multiple Xiaomi forum accounts linked to different phone numbers and have them all apply for unlock permissions. I wish you all have a hassle-free unlocking process. And for those successful, Congratulations on unlocking your Mi5s! Chapter 2: Flashing Official MIUI ROMs using MiFlash > Once your phone is unlocked you can directly proceed to Chapter 3 and start the process of flashing the xiaomi.eu ROMs, but I feel that it is necessary for all of us (especially noobs) to know how to use the Fastboot Update Method in flashing the Official Xiaomi ROMs using MiFlash. With it, we can always save our device from bricking/bootlooping, as long as we can still boot the device into Fastboot Mode (access it by pressing Volume- Key and Power Button when the phone is off). At the very least, I advise everyone to download these files beforehand and test it, before flashing custom ROMs. Source Guide: http://en.miui.com/a-234.html TLDR You first have to download the MiFlash program and install it: MiFlash: http://api.bbs.miui.com/url/MiFlash You then have to download the Fastboot version of the Mi5s China Stable/Developer ROMs. Stable: http://update.miui.com/updates/v1/fullromdownload.php?d=capricorn&b=F&r=cn&n= Developer: http://update.miui.com/updates/v1/fullromdownload.php?d=capricorn&b=X&r=cn&n= Honestly, the source guide above is very detailed and easy to follow so just use it. If successful, your phone will boot with the Official MIUI ROMs. Congratulations! Important Note: Do not use the “clean all and lock” option unless you plan on sticking with the official ROMs or have unlimited unlocks. Once again, the process is very straightforward but you may encounter a few driver-related issues which may be resolved by doing the following: 1. Manually uninstall the old drivers using “Device Manager”, restart your computer and reconnect your Mi5s. 2. Try different USB ports (preferably USB 2.0) on your PC, or try using a different PC with a different OS (preferably Windows 7). 3. Try using a different USB Type-C cable. Other Notes: - Your phone has to be unlocked for this method to work even if it’s flashing Official MIUI ROMs! Chapter 3: Using ADB to install TWRP > Basically, you are using this ADB program via command prompt on your PC to install TWRP into your Mi5s. TWRP is essentially a Custom Recovery Program that replaces the phone’s original Recovery Mode (access it by pressing Volume+ Key and Power Button when the phone is off). It is the program we use to flash the xiaomi.eu ROMs and root your Mi5s by flashing SuperSU. Source Guides: http://www.xda-developers.com/how-to-install-twrp/ http://xiaomitips.com/guide/how-to-flash-twrp-v3-0-2-1-on-mi-5/ Before we start, please download and install the following in your PC: 15 seconds ADB Installer v1.4.3: http://forum.xda-developers.com/showthread.php?p=48915118#post48915118 ADB Driver Installer (Universal): http://adbdriver.com/ - These will install all necessary adb drivers on your PC so that you may proceed smoothly. Next, download and extract (to a folder in desktop or Drive C:\) the latest TWRP program compatible with the Mi5s from here: ZCX-TWRP_MI5S_Capricorn_20161023.zip: http://www.miui.com/thread-5768960-1-1.html Note: I recommend that you factory data reset your device before proceeding. There is no need to login into your Gmail/Mi Accounts after the reset so just skip those steps. TLDR Step 1: Enable USB debugging by following this guide then connect your phone to your PC: http://xiaomitips.com/guide/how-to-enable-and-disable-miui-developer-mode/ Step 2: On your extracted ZCX-TWRP_MI5S_Capricorn_20161023.zip folder, simply rename the ZCX-TWR-3.0.2-X-MI5S-Capricorn-16.10.23.img file to twrp.img Step 3: Once again, on your extracted ZCX-TWRP_MI5S_Capricorn_20161023.zip folder, press Shift + Right click on any empty white space inside the folder and then select "Open command window here". Step 4: On the command window, enter the following: adb devices - This will check if the phone’s adb drivers are detected by the PC. If not, check your phone and let it authorize the PC to access your phone. Type “adb devices” again and it should detect your phone. Once it does, proceed to the next step. adb reboot bootloader - This will command your Mi5s to go into Fastboot Mode. Once you see the Fastboot Mi Bunny, you may proceed. fastboot flash recovery twrp.img - Wait a few seconds after it finishes and proceed. fastboot boot twrp.img - And you’re done! Your phone will now restart into the TWRP Recovery Menu. It’s initially in Chinese though, so change the language to English by following this guide: Now that you can read the options, try rebooting your phone and see if you can still access the TWRP Recovery Menu by pressing Volume+ Key and Power Button when the phone is off. If it does, the whole process was a success! Chapter 4: Using TWRP to flash the xiaomi.eu ROMs and rooting your device by flashing SuperSU Source Guide: https://xiaomi.eu/community/threads/6-11-10.36056/ Download your desired xiaomi.eu Stable/Weekly ROMs: Stable: https://www.androidfilehost.com/?fid=529152257862678079 Weekly: https://www.androidfilehost.com/?fid=457095661767113668 If you also plan on rooting your device, download the latest SuperSU here: http://forum.xda-developers.com/apps/supersu/stable-2016-09-01supersu-v2-78-release-t3452703 - click on the “TWRP / FlashFire installable ZIP” link Step 1: Copy the .zip files (xiaomi.eu ROM and/or SuperSU) to your Mi5s. No need for additional folders, the base of your storage would be best. Step 2: Turn your device off and boot into TWRP Recovery Menu by pressing Volume+ Key and Power Button. Step 3: Tap “Wipe” then swipe the “Swipe to Factory Reset” option. This step is optional, but it is recommended by other users as they claim that it prevents errors. Step 4: Tap the Home button and now tap “Install”, search for the .zip file of the xiaomi.eu ROM you want to use and flash it. Wait for it to finish flashing (takes about 3-5 minutes). Be patient! Step 5: After that, you’ll be given the options to Wipe or Reboot. Once again, other users highly recommend you Wipe first then Reboot. And you’re done! After about 5-10 minutes your phone should be booting with the xiaomi.eu ROM. Do the initial setup and enjoy your Mi5s running a better and optimized ROM! Congratulations! If you're satisfied with just flashing the xiaomi.eu ROM then this guide ends here. But for those who want to root their Mi5s all the way, read further. Rooting Guide: Step 1: Boot once again into the TWRP Recovery Menu. Step 2: Tap “Install” and select the .zip file of the SuperSU program and flash it. Step 3: Once again, you’ll be given the option to Wipe or Reboot. Simply Wipe first then Reboot. Step 4: Your phone will now reboot and SuperSU will now install itself on your Mi5s. This process can take 5-10 minutes so just be patient. Step 5: Once your phone has booted into your Homescreen search your app drawer for the SuperSU app. If it is there, Congratulations! Your Mi5s is now rooted! I hope this guide was helpful in some way to all of you out there confused by this whole flashing/fastbooting/rooting process. I know how terrifying it feels to blindly experiment on your hard-earned devices but I assure you the convenience of using the xiaomi.eu ROM is worth it.