6.12.22 On Mi5


Amineleg

Members
Dec 18, 2016
23
15
hello guys I've bought a new mi5 and it came with a vendor rom, i have the deep flash cable so unlocking the bootloader isn't a problem. I want to flash xiaomi.eu rom running on android 7, but i got confused on the steps to follow.
can someone please tell me what should i do step by step?
 
Hi there, basically you'd want to do the following steps:

PRERREQUISITES:
- Have the fastboot and ADB tools installed and running (you can get them easily installing the Android SDK, available here: https://developer.android.com/studio/index.html ; you just need the command line tools, not the full Android Studio)
- Download TWRP for the Mi 5 (see step 3)
- Download your desired xiaomi.eu version ROM (see step 4) and copy it to the internal storage of the phone

1) Request unlocking permission from Xiaomi at http://en.miui.com/unlock/ , using the MI account set up on your phone. Wait for permission approval, this could take from a couple days to a couple weeks.
2) With your unlocking permission approved, unlock your bootloader using the MiFlashUnlock tool (I've used version 1.1.0317.1 successfully on two devices, but newer versions should work OK too; you should get a download link for this tool when you are granted unlocking privileges on the previous step). Note that a deep flash cable isn't needed for unlocking bootloader, the USB cable included with your device will work just fine.
3) Once the bootloader is unlocked, you should download and flash the latest TWRP recovery. You can get it here: https://dl.twrp.me/gemini/ (as of this writing, the latest version is 3.0.2-3, which works great). Flash it by opening a command prompt, navigating where your TWRP image file is, and issuing the following commands (adjust the file name if your twrp image file is called something other than twrp.img):

fastboot flash recovery twrp.img
fastboot boot twrp.img


If successful, you should have TWRP as your recovery, and booted into it.

4) Enter TWRP, enabling writing to system partition, and select the "Install" option, then navigate where you copied the xiaomi.eu ROM, then select it and flash it.
5) Don't reboot yet. Go back to the root menu in TWRP, and select "Wipe", then select the factory reset option (thus wiping /data, /cache/, and /dalvik). When complete, reboot the phone into system. You should be booting into xiaomi.eu :) (be advised, this first boot takes a longer time than usual).

I had to do an extra step, because my storage was encrypted; when booting into TWRP, it asked for a decryption password to mount my internal storage (obviously I didn't have said password), so I had to format the data and internal storage partitions to remoev encryption (those options are available in the Wipe menu). Afterwards, still in TWRP and with the phone connected to my laptop with the USB cable, I copied the xiaomi.eu ROM to the freshly formatted internal storage and then proceeded with step 4 (while in TWRP, the phone is seen by the PC as external storage). I'm not sure if this is the case for everyone.

I'm recalling these steps from memory, so if anyone wants to add something up or correct some of my steps, please do :)
 
  • Like
Reactions: Acalanata
Hi there, basically you'd want to do the following steps:

PRERREQUISITES:
- Have the fastboot and ADB tools installed and running (you can get them easily installing the Android SDK, available here: https://developer.android.com/studio/index.html ; you just need the command line tools, not the full Android Studio)
- Download TWRP for the Mi 5 (see step 3)
- Download your desired xiaomi.eu version ROM (see step 4) and copy it to the internal storage of the phone

1) Request unlocking permission from Xiaomi at http://en.miui.com/unlock/ , using the MI account set up on your phone. Wait for permission approval, this could take from a couple days to a couple weeks.
2) With your unlocking permission approved, unlock your bootloader using the MiFlashUnlock tool (I've used version 1.1.0317.1 successfully on two devices, but newer versions should work OK too; you should get a download link for this tool when you are granted unlocking privileges on the previous step). Note that a deep flash cable isn't needed for unlocking bootloader, the USB cable included with your device will work just fine.
3) Once the bootloader is unlocked, you should download and flash the latest TWRP recovery. You can get it here: https://dl.twrp.me/gemini/ (as of this writing, the latest version is 3.0.2-3, which works great). Flash it by opening a command prompt, navigating where your TWRP image file is, and issuing the following commands (adjust the file name if your twrp image file is called something other than twrp.img):

fastboot flash recovery twrp.img
fastboot boot twrp.img


If successful, you should have TWRP as your recovery, and booted into it.

4) Enter TWRP, enabling writing to system partition, and select the "Install" option, then navigate where you copied the xiaomi.eu ROM, then select it and flash it.
5) Don't reboot yet. Go back to the root menu in TWRP, and select "Wipe", then select the factory reset option (thus wiping /data, /cache/, and /dalvik). When complete, reboot the phone into system. You should be booting into xiaomi.eu :) (be advised, this first boot takes a longer time than usual).

I had to do an extra step, because my storage was encrypted; when booting into TWRP, it asked for a decryption password to mount my internal storage (obviously I didn't have said password), so I had to format the data and internal storage partitions to remoev encryption (those options are available in the Wipe menu). Afterwards, still in TWRP and with the phone connected to my laptop with the USB cable, I copied the xiaomi.eu ROM to the freshly formatted internal storage and then proceeded with step 4 (while in TWRP, the phone is seen by the PC as external storage). I'm not sure if this is the case for everyone.

I'm recalling these steps from memory, so if anyone wants to add something up or correct some of my steps, please do :)
thank you very much, you've done a great effort to help me, I really appreciate it.Thank you again.
 
Jamie's guide it's okay. What I need to add is BEFORE flashing 6.12.22 you need to flash last Android 6 developer version 6.11.10. Reboot go through initial setup reboot to recovery, wipe ONLY data/cache/dalvik cache. DO NOT wipe system. After that you can flash 6.12.22.

And oh...The TWRP password is your lockscreen PIN.
 
  • Like
Reactions: Jaime DLH
Jamie's guide it's okay. What I need to add is BEFORE flashing 6.12.22 you need to flash last Android 6 developer version 6.11.10. Reboot go through initial setup reboot to recovery, wipe ONLY data/cache/dalvik cache. DO NOT wipe system. After that you can flash 6.12.22.

And oh...The TWRP password is your lockscreen PIN.
Thanks Vladimir, just two points:

1) I agree, installing the dev version may be needed for unlocking bootloader, but might not be absolutely necessary, especially if the vendor ROM that came in your phone is based on a dev version. My phone came with a vendor ROM, seemingly based on xiaomi.eu dev (an older, MIUI 7 version), but I was able to unlock bootloader with it. I'd suggest to try unlocking the bootloader with your current ROM first, and if that doesn't work, flash the dev version that you mention (official MIUI 6.11.10) and then proceed with step 2.
2) TWRP password, at least in my case, was *NOT* the lockscreen PIN. I'm absolutely, positively sure. Tried and retried with the PIN, to no avail. The only solution was to remove encryption by formatting, as I explain in my post above.
 
Last edited:
Thanks Vladimir, just two points:

1) I agree, installing the dev version may be needed for unlocking bootloader, but might not be absolutely necessary, especially if the vendor ROM that came in your phone is based on a dev version. My phone came with a vendor ROM, seemingly based on xiaomi.eu dev (an older, MIUI 7 version), but I was able to unlock bootloader with it. I'd suggest to try unlocking the bootloader with your current ROM first, and if that doesn't work, flash the dev version that you mention (official MIUI 6.11.10) and then proceed with step 2.
2) TWRP password, at least in my case, was *NOT* the lockscreen PIN. I'm absolutely, positively sure. Tried and retried with the PIN, to no avail. The only solution was to remove encryption by formatting, as I explain in my post above.


When I was talking about flashing 6.11.10 I was talking about it as a necessary step before flashing 6.12.22. Flashing 6.12.22 over any other base will cause a hard brick. 6.12.22 MUST be flashed over 6.11.10 and without system wipe.
 
Ah, I understand... It's because of the new Android base (Android Nougat)! My apologies, I use only stable .eu, so I haven't any experience with the dev Nougat ROMs :)

Best regards,