[Recovery] Official TWRP for the Xiaomi Mi MIX (lithium)

Search This thread

cobben

Senior Member
Nov 13, 2016
317
86
New major official version available 3.3.0-0 as of 20190415 for most devices, but not lithium.

Article on XDA here about changes:

https://www.xda-developers.com/twrp-3-3-0-release/

Major changes for Treble A/B partitioned devices.

Don't know if there is anything here that lithium might need.
I have had no problems on Xiaomi.eu, but it is still on Android 8.0.
 
Hello I am Chinese, recently found that you can not use mi pay because Union Pay upgrade security policy, so from miui9 7.0 update to 8.0 found that the twrp on the xda forum can not decrypt the data, and do not want to format the data, research and modify it now can be used normally Control and decrypt data, no need to enter a password to unlock, but the pie did not try to use it to share now

https://drive.google.com/file/d/1yWmgOXD5Rps3K4WUuUD2FEg_ZK9YAsVL/view?usp=drivesdk



File from

https://forum.xda-developers.com/mi-mix/development/rom-resurrection-remix-t3751314

Hi mingyucheng692,

Can you please upload again your modified TWRP that supports encryption? I'm getting a "corrupt image file" message from your original .img file. Many thanks.
 

Aman-9876

New member
May 25, 2019
1
0
How do I know which firmware will work with my Xiaomi Mi Mix

Hi,

I've just unlocked the boot-loader of my Mi Mix and wanted to know which of the 2 firmware options I have to install, as I don't want to install the wrong firmware. I'm new to rooting, this will be my first time trying to root an android phone.
 

Inkypen

Senior Member
Aug 19, 2018
511
1,562
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
The main thing that really bugged me about the old TWRP version we have is that the clock was always wrong, so I've made the latest TWRP 3.3.1 for our device updated with Pie kernel. My device is not encrypted so I can't test that, but everything else works ok.
https://www.androidfilehost.com/?fid=1899786940962579411
 
Last edited:

laincat

Member
Feb 21, 2011
11
1
  • Like
Reactions: BarBoZza23

Inkypen

Senior Member
Aug 19, 2018
511
1,562
London
Samsung Galaxy Note 4
Xiaomi Mi 5s

laincat

Member
Feb 21, 2011
11
1
Yes I built Orange Fox as well, but unlike TWRP it only works on some phones. I have both 128gb and 256gb versions of Mix, Orange Fox works perfect on 256gb version but has corrupted graphics on 128gb version. TWRP works perfect on both. Try it and see, maybe it works OK for you.

thinkyou~!:p
 

Rommul

Senior Member
Mar 12, 2011
180
30
Bronx
The main thing that really bugged me about the old TWRP version we have is that the clock was always wrong, so I've made the latest TWRP 3.3.1 for our device updated with Pie kernel. My device is not encrypted so I can't test that, but everything else works ok.
https://www.androidfilehost.com/?fid=1899786940962579411

Flash with fastboot and everything works but it keeps asking for a password to decrypt data.

I press cancel and it bypasses that but is this going to stop me from flashing roms?

Thanks again.

---------- Post added at 07:40 PM ---------- Previous post was at 07:08 PM ----------

I found the answer. I had to format data in order to get rid of the encryption.
 

ShaneOss

New member
Sep 15, 2020
1
0
Thanks! This one is currently working after restoring MIUI global and then the recovery (twrp-3.2.1-raupe-blunden-15.1-vendor-fstab.img) again.
Cheers.
 
Last edited:
Jan 2, 2017
10
1
I cannot find a way to unstuck the screen. I tried 10 different TWRP.
I can't swipe nor flash nor boot.

EDIT : I use ADB Sideload instead and so I don't need touchscreen in TWRP
EDIT2: I reinstalled a working stable ROM and now touchcreen work in TWRP
 
Last edited:

Inkypen

Senior Member
Aug 19, 2018
511
1,562
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
Just a note to let you know I've built the latest TWRP 3.5.2 and OrangeFox R11.1 for lithium. The new OrangeFox is a flashable zip so you need to have some custom recovery already in order to install it. Also OF has graphical glitches on some variants of the Mix, so if that happens to you just use TWRP instead.
 
  • Like
Reactions: kpykpy

slyxion

New member
Apr 8, 2021
2
0
I cannot find a way to unstuck the screen. I tried 10 different TWRP.
I can't swipe nor flash nor boot.

EDIT : I use ADB Sideload instead and so I don't need touchscreen in TWRP
EDIT2: I reinstalled a working stable ROM and now touchcreen work in TWRP
not trying to necro this post but have you tried mrraines's twrp? cuz some of the devices are kinda janky and not similar to each other. Mine only works with mrraines' twrp
 

Inkypen

Senior Member
Aug 19, 2018
511
1,562
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
I've built new versions of TWRP and Orangefox. There is nothing really new in the recovery side of things, but I added a kernel patch which I hope will fix the unresponsive touch screen. I can't test it myself because I don't have this problem on any of my mix devices.

TWRP: https://www.androidfilehost.com/?fid=14943124697586363108
OrangeFox: https://www.androidfilehost.com/?fid=14943124697586363157

EDIT: Apparently the latest version of TWRP has some graphic corruption issues on 128gb models. I have made an older version of TWRP available that works just fine, also confirmed touchscreen is working fine (tested on a device with unresponsive touch panel)
 
Last edited:

billy_overheat

Senior Member
I've built new versions of TWRP and Orangefox. There is nothing really new in the recovery side of things, but I added a kernel patch which I hope will fix the unresponsive touch screen. I can't test it myself because I don't have this problem on any of my mix devices.

TWRP: https://www.androidfilehost.com/?fid=14943124697586363108
OrangeFox: https://www.androidfilehost.com/?fid=14943124697586363157

EDIT: Apparently the latest version of TWRP has some graphic corruption issues on 128gb models. I have made an older version of TWRP available that works just fine, also confirmed touchscreen is working fine (tested on a device with unresponsive touch panel)
I just tried yours and both are not working. May I know what's the problem yeah? I wonder. I've tried many twrp and orangefox and dont seem to find anything which will work. all touch failed.
 

Inkypen

Senior Member
Aug 19, 2018
511
1,562
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
I just tried yours and both are not working. May I know what's the problem yeah? I wonder. I've tried many twrp and orangefox and dont seem to find anything which will work. all touch failed.
Try this one, literally just finished building it. It's updated with kernel 4.4 in preparation for file based encryption but works fine with unencrypted 3.18 devices. Tested by a user in the mix telegram group (https://t.me/xdamimix) and confirmed working
 

billy_overheat

Senior Member

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    Team Win Recovery Project 3.0.2-0



    This is for the Xiaomi Mi MIX only, do not flash on other models!

    WARNING: As of Android Marshmallow, factory boot images have dm-verity enabled, which prevents you from booting if you swipe to enable system modifications!
    SOLUTION: Follow the full rooting steps below in order to allow system modifications without the risk of a boot loop!

    WHAT IS TWRP?

    Oh come on, you know what it is - don't try to fool me!
    In case you're serious, though...

    Team Win Recovery Project is a custom recovery for Android devices.
    It allows you to back up and restore your data, flash custom ROMs to your device, repair broken file systems, and root your device.

    Read more about TWRP here: https://twrp.me/about/

    DOWNLOAD

    You can find the device page here:
    For official stock/dev firmware: http://teamw.in/devices/xiaomimimix.html

    For (slightly newer) firmware: https://build.nethunter.com/test-builds/twrp/xiaomi/twrp-3.0.2-0-rc1-eu-lithium.img
    For (the latest EU) firmware: https://build.nethunter.com/test-builds/twrp/xiaomi/twrp-3.0.2-0-rc2-eu-lithium.img
    (touchscreen will not respond if not matching firmware)

    You can find up to date fastboot & adb binaries here!

    FULL STEPS FOR OBTAINING ROOT

    Follow these instructions until someone nice comes along and makes a video from them (without ads):

    1. You must first unlock your device. To do this, follow the instructions on the MIUI forums. (tedious, I know)
      Transparent.gif
    2. Extract adb & fastboot to your computer.
      Transparent.gif
    3. Download TWRP for Xiaomi Mi MIX (lithium).
      Transparent.gif
    4. Reboot your device into fastboot mode. To do this, select reboot from the power menu and hold the [Volume Down] + [Power] buttons while your device reboots.
      Transparent.gif
    5. Once you're in fastboot mode, you're ready to flash TWRP. To do this, run these commands in order:
      fastboot flash recovery twrp.img
      fastboot boot twrp.img

      Transparent.gif
    6. At this point, you will reach the screen asking you if you want to allow system modifications.
      By swiping right, you will trigger dm-verity, and if you don't follow the next step you will be unable to boot!
      If you are going to root your device and follow the rest of these steps, then it is safe to swipe right and enable modifications.
      Transparent.gif
    7. If you want to be rooted with SuperSU:
      Download the latest SuperSU by Chainfire.
      Without exiting TWRP, transfer the SuperSU zip to your device over MTP* and flash it using [Install] in TWRP.

      If you want to be rooted with something else or just want a bootable system:
      Download the latest dm-verity and forced encryption disabler zip.
      Without exiting TWRP, transfer the no-verity-opt-encrypt zip to your device over MTP* and flash it using [Install] in TWRP.
      This will also allow you to use [Format Data] to completely disable your encryption if desired.
      Transparent.gif
    8. Go to [Reboot] -> [System].
      Transparent.gif
    9. Wait 2-5 minutes for your device to finish setting itself up. (SuperSU will reboot you a few times)
    * MTP, known as Media Transfer Protocol, is the same way you transfer files from your PC to your device when booted into system.


    CHANGES
    • v3.0.2-0 - Official release on twrp.me
    • v3.0.2-0-rc1 - Initial release candidate and first XDA build

    FEATURES
    • MTP support
    • USB Mass Storage support
    • Micro SDcard and USB OTG storage support
    • f2fs file system support (read, write, format, backup & restore)
    • exFAT file system support (read, write, format, backup & restore)
    • NTFS file system support (read, write, format)
    • ADB root
    • Full SELinux support
    • Built in android 6.0 tree

    KNOWN ISSUES
    • There's absolutely none that I know of. Rejoice. You even have working hardware encryption!

    CONTACT & SUPPORT

    You can find us on IRC at #twrp on chat.freenode.net.
    You can also post in this thread and I will attempt to answer any questions you may have.

    SOURCE CODE

    TWRP: https://github.com/omnirom/android_bootable_recovery (android-6.0)
    Device tree (Official): https://github.com/TeamWin/android_device_xiaomi_lithium (android-6.0)
    Device tree (Development): https://github.com/jcadduono/android_device_xiaomi_lithium (android-6.0)
    Kernel: Unavailable (waiting on Xiaomi source release, using MIUI stock binary for now)

    CONTRIBUTIONS

    Gerrit for TWRP: http://gerrit.omnirom.org/
    Gerrit for officially supported devices: http://gerrit.twrp.me/

    Thank you to @wolfgart for requesting device support and reporting feedback on my initial builds.
    10
    I also have a device tree but based on gemini.

    https://github.com/blunden/android_device_xiaomi_lithium/commits/android-7.1

    It includes a prebuilt kernel with the touch firmware fix that I merged into Lineage 14.1 and 15.1 enabled.

    https://github.com/LineageOS/androi...mmit/42a64be1431033426c593c50f83a7c5586dcfcc8

    @PsyMan What's your progress so far? Any issues remaining?

    This is the modified one I'm currently using for lithium 15.1 if someone needs it.

    http://www.mediafire.com/file/03nd3n0va0ndej5/
    8
    So I've always been using the official twrp image and just creating a new img with the bootimg tools here: https://forum.xda-developers.com/mi...omi-mi-mix-t3498960/post70648774#post70648774

    I'm using Official LineageOS. And everything has always worked fine, including decrypting, is there anything I'm missing by not using the version by @raupe ?

    Hi @iNewbcake,

    if you like you can read why i've begun a dev from the scratch here and here and here.

    The goal is also to not modify a TWRP every time Xiaomi or LOS-Team changes their kernel(-settings).
    Also be aware that not every user of this forum is as skilled as you or willing to manually replace the kernel.

    In result you found a good working solution for yourself.
    ... my approach is a litte different:
    I like the idea to have a solution for the community and setup possibilities optimize the result by collaborating via github for everyone who's interested or likes to share some code snippets.
    I hope this helps to not reinvent the wheel (again) - source files and setup instructions for build environment will be published within a couple of days.

    But collaboration means also feedback - there is a little lack of that in the past days compared to the beginning of my research.
    The idea is to get more reactions once the sources are published on github. - Because of the essential weight of feedback in development and bug fixing by the community and devs.
    7
    Does this mean RIP TWRP for the mi mix? Or are there alternatives?
    No, it doesn't. Since my Mix is my daily device I'll keep it working as long as I can. I won't however make minor updates.
    7
    The main thing that really bugged me about the old TWRP version we have is that the clock was always wrong, so I've made the latest TWRP 3.3.1 for our device updated with Pie kernel. My device is not encrypted so I can't test that, but everything else works ok.
    https://www.androidfilehost.com/?fid=1899786940962579411