[guide][recovery][twrp] How To Install A Custom Recovery On Miui V6/v7


Dec 5, 2014
35
14
20
#1
DISCLAIMER
I'm not responsable in any way of any possible soft or hard brick of your phone, or whatever may happen to it!

REBOOT TO FASTBOOT
  1. Turn off your phone​
  2. Turn on your phone by pressing the Power button and Vol-​
  3. Connect it to your PC via USB

DOWNLOAD AND INSTALL ADB
If you have ADB already installed you can skip this step.
  1. Go to This Discussion
  2. Download the package
  3. Run it as Administrator
  4. Answer always Y or Yes to all the questions
  5. Wait for the installation to finish
  6. Done! You can find all the necessary in C:\adb

DOWNLOAD THE CUSTOM RECOVERY
Here are some useful links:
TWRP 2.8.7 Merged Partitions
TWRP 2.8.7 Unmerged Partitions
CWM 6.0.5.0 Unmerged Partitions

IF YOU CHOOSE TWRP MAKE SURE TO HAVE SYSTEM 1 ACTIVE, BECAUSE THIS RECOVERY FLASHES ONLY ON THAT SYSTEM AND YOU CAN'T CHANGE THE ACTIVE SYSTEM WITH TWRP (Thanks to @Jocke for this information)

These links are mirrors found in the italian forum (Thanks to @SkiFire13). I'm currently using the version for merged partitions and it works fine.
Now rename the file you have downloaded to "recovery.img" and move it to C:\adb

UNLOCK THE BOOTLOADER AND INSTALL A CUSTOM RECOVERY
  1. Click on Start > Computer > C:\
  2. Open the adb folder
  3. While pressing SHIFT right click in an empty spot in the folder and select "Open command windows here"
  4. Use this command to check if the phone is correctly plugged-in. If it outputs a hexadecimal string the phone is correctly connected (Look at the image below).
    Code:
    fastboot devices
  5. In order to unlock the bootloader use this command:
    Code:
    fastboot oem unlock
  6. To flash the recovery use this command:
    Code:
    fastboot flash recovery recovery.img
  7. Reboot to Recovery
FINISH
Now you have a phone with a custom recovery and an unlocked bootloader.
 
Last edited:
Jul 24, 2013
37
2
18
#8
It will also be deprecated but at least it was a way to have miui and AOSP or more together, as if they were separate systems. We are waiting for MultiROM or Efidroid (formerly Grub4android) ... but do not come.
However merged partition.
bay
 
Apr 26, 2013
9
1
13
#9
A perfect guide. Now I have a working custom recovery - Thanks!
But how can I switch between system 1 and 2? Is there an option in TWRP?
 
Sep 11, 2015
13
1
13
#15
I'm trying to install smiui from Rome kitchen with twrp for unmerged.
Flashing is OK except an mount error.
When I reboot I get inte än old miui rom.
To me it looks like I'm not booting into the newly flashed system.
Any help or suggestions?
 
Dec 5, 2014
35
14
20
#16
I'm trying to install smiui from Rome kitchen with twrp for unmerged.
Flashing is OK except an mount error.
When I reboot I get inte än old miui rom.
To me it looks like I'm not booting into the newly flashed system.
Any help or suggestions?
sMiUI is based on MiUI v7, witch is only for Merged partitions...I flash sMiUI with TWRP for Merged partitions and the only error I get is:
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata at /data: Device or resource busy
But it's just a bug, if you wait a little bit it flash the ROM without problems.

Inviato dal mio MI 2S utilizzando Tapatalk
 
Last edited:
Oct 18, 2013
16
3
13
#17
Hi guys, I flashed sMIUI v7 5.9.24 via MiRecovery and now I'm stuck on Mi Logo. I have merged partitions. I want to flash TWRP via fastboot to solve this problem and I have to unlock the bootloader to do this. Will unlocking the bootloader erase any data in the device or will it keep everything as it is now? I want to ensure that it will not erase/reset anything. Thanks for replies ;)
 
Sep 11, 2015
13
1
13
#18
Thanks for the info, didn't know smiui was for merged partitions.
I'm trying to flash Ivans aosp but it gives me an error that I can't install over a newer build.
What I want is an easy and slim aosp or miui with good battery.
Any help would be very appreciated.

I can flash smiui and I hey the same error as above but the phone boots into an old miui build jlb54.
 
Dec 5, 2014
35
14
20
#19
Thanks for the info, didn't know smiui was for merged partitions.
I'm trying to flash Ivans aosp but it gives me an error that I can't install over a newer build.
What I want is an easy and slim aosp or miui with good battery.
Any help would be very appreciated.

I can flash smiui and I hey the same error as above but the phone boots into an old miui build jlb54.
If you want to flash Ivans AOSP you have to do a full wipe, because MiUI and stock are very different and maybe they have different Android base

Inviato dal mio MI 2S utilizzando Tapatalk
 
Sep 11, 2015
13
1
13
#20
Thanks for your time and help.

By full wipe you mean with twrp, clear all data or flash miui with miflash and start over?
Just to be sure what I may need to do.
It is no problem, I have saved the data I wish to keep.
 
Jun 4, 2013
266
42
62
#21
FWIW, CWM Recovery didn't work so great when I tried to install the latest 5.9.24 sMiUI. Said it wasn't able to mount the sdcard to find the ROM zip file.

TWRP worked fine.
 
Dec 5, 2014
35
14
20
#22
Thanks for your time and help.

By full wipe you mean with twrp, clear all data or flash miui with miflash and start over?
Just to be sure what I may need to do.
It is no problem, I have saved the data I wish to keep.
Clear all data

Inviato dal mio MI 2S utilizzando Tapatalk
 
Sep 11, 2015
13
1
13
#23
HI, I have cleared all data but TWRP gives the error "can't install this zpackage over a newer build.
Error executing updater binary in zip".
When trying to flash ivan's aosp 5.5.7.
What could I do to be able to flash aosp?
Wipe the whole device with miflash and a older miui?
 
May 6, 2013
33
1
18
#24
Hello guys i need your help :/ i do all like in the guide, but when i reboot into recovery there isn`t a custom recovery.....its the normal mirecovery? I need help, i checked all if its correct :(
 
Sep 11, 2015
13
1
13
#25
Hi, used this guide to flash twrp for unmerged partitions. Had some real problems before I found the error. I couldn't change system in twrp and I think it flashed to system one. My problem was that system two was active. Meaning I always booted back into the old system two.

I have now flashed cwm and flashed the rom I want and everything seems to be working. Just so you know if you want to use twrp with unmerged partitions.