[RECOVERY][OFFICIAL] TWRP for MIX 2S

Search This thread

jurrejonker

Member
Nov 8, 2018
18
5
Jubbega
And ?

What do you mean ?
How do you reboot to the recovery?

I'll share my 'routine' for flashing a recovery:
- plug my phone into my pc and accept debugging from device if needed
- I open up adb & fastboot in CMD
- i type in the command [adb reboot fastboot]
- type [fastboot boot recovery C/path/to/recovery.img] to see if it will actually boot into the recovery I'm wanting to upgrade to
- if all succeeds, I'll reboot into bootloader
- now to flash i type [fastboot flash recovery C/path/to/recovery.img]
- after the process is done i type [fastboot reboot] and when the screen is black and you feel a vibration I'll start holding volume down till you see the first TWRP logo (don't know what it's called)

Maybe this will help, maybe it doesn't.
 
  • Like
Reactions: Bradco

kleinholzinferno

Senior Member
Feb 4, 2009
375
114
How do you reboot to the recovery?

I'll share my 'routine' for flashing a recovery:
- plug my phone into my pc and accept debugging from device if needed
- I open up adb & fastboot in CMD
- i type in the command [adb reboot fastboot]
- type [fastboot boot recovery C/path/to/recovery.img] to see if it will actually boot into the recovery I'm wanting to upgrade to
- if all succeeds, I'll reboot into bootloader
- now to flash i type [fastboot flash recovery C/path/to/recovery.img]
- after the process is done i type [fastboot reboot] and when the screen is black and you feel a vibration I'll start holding volume down till you see the first TWRP logo (don't know what it's called)

Maybe this will help, maybe it doesn't.

Hold Volume up and you'll enter TWRP. Vol down enters Fastboot, or am I wrong?
 

Bradco

Senior Member
Sep 8, 2015
580
122
Limoges
How do you reboot to the recovery?

I'll share my 'routine' for flashing a recovery:
- plug my phone into my pc and accept debugging from device if needed
- I open up adb & fastboot in CMD
- i type in the command [adb reboot fastboot]
- type [fastboot boot recovery C/path/to/recovery.img] to see if it will actually boot into the recovery I'm wanting to upgrade to
- if all succeeds, I'll reboot into bootloader
- now to flash i type [fastboot flash recovery C/path/to/recovery.img]
- after the process is done i type [fastboot reboot] and when the screen is black and you feel a vibration I'll start holding volume down till you see the first TWRP logo (don't know what it's called)

Maybe this will help, maybe it doesn't.

I use power + volume UP to boot on recovery.

I used twrp by palash it work. It's wierd maybe if i Want twrp Official i must flash with fastboot.

PS : i flash twrp Official with m'y actualy twrp by palash .IMG file.
 

NoGoodUserNamesLeft

Senior Member
Feb 15, 2017
112
59
GT-i9250
LG Nexus 5X
SOLVED
Read my EDIT5 for the solution.



I am using official TWRP v3.3.1-0 and restoring from backup does not work.

When restoring data, I'm getting this error:
extractTarFork() process ended with ERROR: 255

If I deselect the data partition, I can restore the other partitions without errors (Recovery, System, Boot and Vendor).
If I select data as the only partition to restore, then it produces the same error.
The error message occurs right after the message "Restoring Data (excl. storage)".

The backup was created with the same TWRP version just today.
Decryption is working - I am getting asked for a PIN and can see the contents of /data/media/0/
I am using the global 9.6.27 firmware.

EDIT:
I have now tried to manually extract the data.ext4.win00# files using the terminal in TWRP (I got the idea from this post) and when extracting the 002 file there were several error messages about files/directories not being able to remove or getting to open (see second attached screenshot).

Does it mean TWRP created a bad backup? (EDIT: No, the TWRP backup is not a regular TAR archive, the backup is actually fine).

I am now trying to restore an older backup.

EDIT2:
Older backup didn't work as well.

EDIT3:
I tried to fast boot OrangeFox recovery but it didn't work - the display stayed black instead of booting into OrangeFox. - (EDIT: I wrongfully fastbooted the ZIP instead of the IMG. This early mistake did cost me so much time...).

I will try to exclude the problematic folder during manual restoration.

EDIT4:
Excluding the problematic folders worked but the "invalid tar format" error message for the next two files stayed (see third attached screenshot).
Is there a way to find out what's wrong with the tar files?

EDIT4.1:
I installed Linux Mint in Virtual Box to try to extract the backup files using tar there.
It seems to be working in a way, but it's producing a bunch of error messages like "Ignoring unknown extended header keyword 'TWRP.security.e4crypt'", "Malformed extended header: missing equal sign" and "Exiting with failure status due to previous errors" (see 4th screenshot).

Looks like I'll have to start at 0 again. This makes me want to stay away from custom ROMs :(

EDIT5: SOLUTION
I got the OrangeFox recovery working and I was able to restore from my backup! Holy f***ing s**t!
I used this version: OrangeFox-R10.0-1-Stable-polaris from https://sourceforge.net/projects/orangefox/files/polaris/
The backups created with TWRP were not bad, it's just the restore functionality, that's broken.


Besides that: shouldn't the backup and restore functionality be disabled in TWRP if it's not really working?
This is a huge issue - recovery from backup is one of the main functions of TWRP.
 

Attachments

  • 47tjc5B.png
    47tjc5B.png
    137.9 KB · Views: 283
  • Screenshot_2019-09-23-17-35-28_crop.png
    Screenshot_2019-09-23-17-35-28_crop.png
    192 KB · Views: 281
  • xUh8nRb.png
    xUh8nRb.png
    49.9 KB · Views: 273
  • LinuxMint_tar_002_and_003.png
    LinuxMint_tar_002_and_003.png
    83.9 KB · Views: 165
Last edited:

jurrejonker

Member
Nov 8, 2018
18
5
Jubbega
SOLVED
Read my EDIT5 for the solution.


I am using official TWRP v3.3.1-0 and restoring from backup does not work.

When restoring data, I'm getting this error:
extractTarFork() process ended with ERROR: 255

If I deselect the data partition, I can restore the other partitions without errors (Recovery, System, Boot and Vendor).
If I select data as the only partition to restore, then it produces the same error.
The error message occurs right after the message "Restoring Data (excl. storage)".

The backup was created with the same TWRP version just today.
Decryption is working - I am getting asked for a PIN and can see the contents of /data/media/0/
I am using the global 9.6.27 firmware.

EDIT:
I have now tried to manually extract the data.ext4.win00# files using the terminal in TWRP (I got the idea from this post) and when extracting the 002 file there were several error messages about files/directories not being able to remove or getting to open (see second attached screenshot).

Does it mean TWRP created a bad backup? (EDIT: No, the TWRP backup is not a regular TAR archive, the backup is actually fine).

I am now trying to restore an older backup.

EDIT2:
Older backup didn't work as well.

EDIT3:
I tried to fast boot OrangeFox recovery but it didn't work - the display stayed black instead of booting into OrangeFox. - (EDIT: I wrongfully fastbooted the ZIP instead of the IMG. This early mistake cost me a lot of time...).

I will try to exclude the problematic folder during manual restoration.

EDIT4:
Excluding the problematic folders worked but the "invalid tar format" error message for the next two files stayed (see third attached screenshot).
Is there a way to find out what's wrong with the tar files?

Looks like I'll have to start at 0 again. This makes me want to stay away from custom ROMs :(

EDIT5: SOLUTION
I got the OrangeFox recovery working and I was able to restore from my backup! Holy f***ing s**t!
I used this version: OrangeFox-R10.0-1-Stable-polaris from https://sourceforge.net/projects/orangefox/files/polaris/
The backups created with TWRP were not bad, it's just the restore functionality, that's broken.


Besides that: shouldn't the backup and restore functionality be disabled in TWRP if it's not really working?
This is a huge issue - recovery from backup is one of the main functions of TWRP.
You my friend are one hell of a go-getter, props ro you??
 

NoGoodUserNamesLeft

Senior Member
Feb 15, 2017
112
59
GT-i9250
LG Nexus 5X
When creating a backup using the TWRP GUI it will create .win files for each partition but when creating a backup using the command adb backup --twrp it will create a single .ab file.

Why do you get two different results?
Is there an ADB command which will create .win files for each partition?
 

tom65824

Senior Member
Aug 3, 2018
68
14
Hi.. Ive Just installed orangefox. What is needed (which Partition Do you choose) to Backup Lineage?
Thanks in advance :)
 

NoGoodUserNamesLeft

Senior Member
Feb 15, 2017
112
59
GT-i9250
LG Nexus 5X
Hi.. Ive Just installed orangefox. What is needed (which Partition Do you choose) to Backup Lineage?

Here is the OrangeFox thread on XDA: https://forum.xda-developers.com/xi.../official-orangefox-recovery-project-t3900524

Here is the OrangeFox FAQ: https://files.orangefox.tech/FAQ.pdf
where it says:

I want to make a backup of my ROM. Which partitions must I backup?

At the very least, backup Boot, System, Data, and Vendor
 
  • Like
Reactions: tom65824

graw2

Senior Member
Sep 17, 2014
164
20
Please prepare for support Android 10 as Android 10 based MIUI coming soon...
Thanks!
 

graw2

Senior Member
Sep 17, 2014
164
20
@notsyncing
Hi,
Android 10 based MIUI11 is here. Could you pls arrange supported twrp recovery?

Sent from my MIX 2S using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 75
    Self-made TWRP 3.2.3-0 recovery for MIX 2S

    It's official now!
    Please go to https://twrp.me/xiaomi/xiaomimimix2s.html to download.

    Updates:

    v15 (2019-01-09):
    Built against latest omni-9.0 tree and lineage-16.0 polaris kernel
    This should fix the decryption issue on android 9.0 roms with 2019-01 security patches. If v14 works for you, then no need to flash this.

    v14 (2018-12-09):
    Built against latest omni-9.0 tree
    This should fix the decryption issue on latest android 9.0 roms. If v13 works for you, then no need to flash this.

    v13 (2018-11-21):
    Fixed wiping issue

    v12 (2018-11-16):
    Built against latest omni-9.0 tree
    This should fix the decryption issue on latest android 9.0 roms. If v11 works for you, then no need to flash this.

    v11 (2018-10-12):
    Built against latest omni-9.0 tree
    This should fix the decryption issue on latest android 9.0 roms

    v10 (2018-09-25):
    Fixed wiping issue

    v9 (2018-09-24):
    Built against omni-9.0 tree, updated blobs from MIUI 10 Pie
    Fixed android 9.0 decryption
    NOTE: If you are on android 8.0/8.1, please use v8, I don't know if v9 would work with oreo

    v8 (2018-08-03):
    Synced with latest twrp code, version number now 3.2.3-0

    v7 (2018-07-20):
    Updated kernel and blobs to MIUI 10 8.7.19, fixed the non-booting issue after 8.7.16. Thanks for @simonsmh for fixing!
    Synced with latest twrp code, version number now 3.2.2-0
    Re-enabled MTP mode. If you have problems like crashing, please detach your device from usb.

    v6 (2018-06-09):
    Fixed wrong color in screenshots (thanks @wzsx150 for reporting)
    Disabled USB MTP mode.

    Note: This version has disabled USB MTP mode to take a try to fix the non-responsive problem as @TimesLeader suggested. If you need MTP feature, please stick to v5 and wait for TWRP fixing it.

    v5 (2018-06-06):
    Synced with latest omni and TWRP code (git-25b850d to git-ff9d097).
    touch vibration now works.
    removed the TW_BLANK_SCREEN_ON_BOOT option.

    note: If you encountered the non-responsive problem, please try to get me some logs (adb logcat, dmesg, etc). Reboot will recover from it.

    v4 (2018-06-03):
    Synced with latest TWRP code (git-72638b6 to git-bf4f24f, reverted 34ad728).
    Thanks @simonsmh for various fixes and cleanups!

    v3 (2018-05-26):
    No longer laggy UI! Thanks TWRP for their fix!
    Also thanks @joemossjr for a stuck-in-blank-screen problem.

    v2 (2018-05-21):
    Fixed the keystore problem. Now you can safely decrypt the /data partition.

    Disclaimer:

    Use this at your own risk!

    Works:

    ADB
    Decryption of /data
    Screen brightness settings
    Smooth UI
    Touch vibration


    Usage:

    Reboot to fastboot mode (unplug, poweroff, vol-dn+power until fastboot appears), then execute:

    fastboot boot recovery.img

    If your phone got stuck in "Downloading boot.img...", just reboot phone (long press power button) and try again.

    Flash to recovery partition (thanks for @sytayeth for testing):

    fastboot flash recovery recovery.img

    Source code and compile guide:

    https://github.com/notsyncing/android_device_xiaomi_polaris

    v15 Download: https://drive.google.com/open?id=10jqnlc0sVv0oWH2hYkxUglO5QhJwmnQd
    sha256: 508695c7b82933c413cf6521a3deb1b012fe34e155ebf21d2a6f2e69338e9ce4
    md5: baf3fa355339e0574b95897ec6a961a7

    v14 Download: https://drive.google.com/open?id=1Mhe0BF613HGWwt1gc_95vuXB-ETci6sb
    sha256: 16a977900abf77dedf75195239f122e0368d512ba9feb7fe0803823a3585c607
    md5: bbb2b7054cd52b72326bf2c39188ebe2

    v13 Download: https://drive.google.com/open?id=1nzqC1gKeI-XogjcUX4ZURz0OUT9Rshcg
    sha256: dc4c37fdeeaa2a12de9c54c292f0275de02497b0ec0866dca254b625fbc494a7
    md5: 404b9d4f22fa22d862c7b60db9d933bc

    v8 Download: https://drive.google.com/open?id=1Ge3WuWjjKoHWPIe9jvCtK2kGihHDE8Pm

    v8 recovery.img:
    sha256: 12b864620650ce55efa9971be89c14eb497cc9ca65cea2e5cee3d5e7b623bb9e
    md5: 6c55b55b6408111e9b8bbc50b4364317

    Thanks:

    @Travismills82 for his TWRP tree used as skeleton: https://github.com/travismills82/twrp_android_device_samsung_star2qltechn
    @teamwin for sagit TWRP tree used for partial decryption works: https://github.com/TeamWin/android_device_xiaomi_sagit
    @TimesLeader for dipper TWRP tree used for adb works:android_device_xiaomi_dipper
    @wuxianlin for enchilada TWRP tree used for init.rc works:android_device_oneplus_enchilada
    28
    It's official now! People can go to https://twrp.me/xiaomi/xiaomimimix2s.html to download the latest TWRP for MIX 2S.
    13
    TWRP 3.3.1-0 Unofficial v3 by palaych​

    • Add Vendor to the Wipe section
    • Update los kernel sources and compile with clang 9.0.5
    • Update twrp sources

    Download: https://drive.google.com/file/d/1JuD_pDGYoUqxq6ywXGtZbENwiFIsCYbG/view?usp=drivesdk
    13
    TWRP 3.3.1-0 Unofficial v1 by palaych

    Base on official device repo ( https://github.com/TeamWin/android_device_xiaomi_polaris ), tnx official maintainer.
    Update twrp sources.
    Work encryption with Android_r37+.

    Download: https://drive.google.com/file/d/17Mp1QqpNs4W5F9WSqxxM3kfLKy_h_P8a/view?usp=sharing
    10
    v7 is out now. The non-booting issue should be fixed. Please see OP for download.