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

Discussion in 'Xiaomi Mi 2 / Mi 2S' started by AndColla, Sep 25, 2015.

  1. AndColla

    AndCollaMembers

    Dec 5, 2014
    35
    14
    20
    Male
    Student
    Italy
    #1AndColla,Sep 25, 2015
    Last edited: Oct 2, 2015
    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
      [​IMG]
    7. Reboot to Recovery
    FINISH
    Now you have a phone with a custom recovery and an unlocked bootloader.
     
    jauling, tkyd2003, rosewid and 2 others like this.
  2. Luigi-Bros

    Luigi-BrosMembers

    Nov 2, 2014
    127
    49
    40
    Male
    Italy
    Thanks bro work perfectly :D
     
    AndColla likes this.
  3. Alberto_

    Alberto_Members

    Jul 24, 2013
    37
    2
    18
    Male
    same procedure for the CWM 6.0.5.0?
     
  4. AndColla

    AndCollaMembers

    Dec 5, 2014
    35
    14
    20
    Male
    Student
    Italy
    If you have a .img file it should work
    PS if you have a working link send it to me, so i can add it to the guide

    Inviato dal mio MI 2S utilizzando Tapatalk
     
  5. Alberto_

    Alberto_Members

    Jul 24, 2013
    37
    2
    18
    Male
  6. Alberto_

    Alberto_Members

    Jul 24, 2013
    37
    2
    18
    Male
    tried works!
    ok, it is useful to toggle between 1 and 2 system and to do backups and restore systems but the TDB will work ???
     
  7. AndColla

    AndCollaMembers

    Dec 5, 2014
    35
    14
    20
    Male
    Student
    Italy
    TDB is deprecated...However, is it for Merged or Unmerged?
     
  8. Alberto_

    Alberto_Members

    Jul 24, 2013
    37
    2
    18
    Male
    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
     
  9. Schexi

    SchexiMembers

    Apr 26, 2013
    9
    1
    13
    Male
    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?
     
  10. ramir0

    ramir0Members

    Aug 22, 2015
    156
    45
    40
    Male
    i cant download cwm, its just me?
     
  11. jauling

    jaulingMembers

  12. ramir0

    ramir0Members

    Aug 22, 2015
    156
    45
    40
    Male
    i checked it, but its .zip. Via adb i think the only way its .img
     
  13. cbpbxecmecmbeh

    Sep 19, 2013
    389
    82
    50
    Extract the image then :)
     
    ramir0 and jauling like this.
  14. ramir0

    ramir0Members

    Aug 22, 2015
    156
    45
    40
    Male
    i didnt know that was possible xd
     
  15. Jocke

    JockeMembers

    Sep 11, 2015
    13
    1
    13
    Male
    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?
     
  16. AndColla

    AndCollaMembers

    Dec 5, 2014
    35
    14
    20
    Male
    Student
    Italy
    #16AndColla,Sep 29, 2015
    Last edited: Sep 29, 2015
    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
     
  17. silverbath

    silverbathMembers

    Oct 18, 2013
    16
    3
    13
    Male
    Slovakia
    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 ;)
     
  18. Jocke

    JockeMembers

    Sep 11, 2015
    13
    1
    13
    Male
    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.
     
  19. AndColla

    AndCollaMembers

    Dec 5, 2014
    35
    14
    20
    Male
    Student
    Italy
    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
     
  20. Jocke

    JockeMembers

    Sep 11, 2015
    13
    1
    13
    Male
    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.
     
  21. jauling

    jaulingMembers

    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.
     
  22. AndColla

    AndCollaMembers

    Dec 5, 2014
    35
    14
    20
    Male
    Student
    Italy
    Clear all data

    Inviato dal mio MI 2S utilizzando Tapatalk
     
  23. Jocke

    JockeMembers

    Sep 11, 2015
    13
    1
    13
    Male
    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?
     
  24. kribabic

    kribabicMembers

    May 6, 2013
    33
    1
    18
    Male
    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 :(
     
  25. Jocke

    JockeMembers

    Sep 11, 2015
    13
    1
    13
    Male
    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.
     

Share Our Site