[RECOVERY][grus] KudProject's Unofficial TWRP 3.5.2_9-1 [16-05-2021] - Xiaomi Mi 9 SE ROMs, Kernels, Recoveries, & Other

This is basically a tl;dr thread.
I don't want to make a thread that everyone will lazy to read.​
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. It's a fully touch driven user interface; no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Disclaimer​
Code:
/*
* Your warranty might not be void (thanks Xiaomi). However...
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this RECOVERY
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Requirements​
Xiaomi Mi 9 SE (of course)
Unlocked bootloader
Some knowledge on how to deal with your device... and patience.
Flashing Instructions​I assume you've done (very) basic steps on preparing to flash your device.
Reboot device to bootloader. If device is powered off, press and hold Power + Volume Down button until tinkering Mi Bunny with "FASTBOOT" text appears.
Optional: Flash stock vbmeta with the following command (attached if needed):
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Under same directory as TWRP image and ADB/Fastboot executables (if ever required), type this command:
Code:
fastboot flash recovery twrp-3.x.x-y-KudProject-grus.img
Where x and y are version of TWRP you're going to flash.
IMPORTANT: After flashing, immediately press and hold Power + Volume Up for about 10 seconds to reboot to recovery.
Swipe the option to allow modifications. This will prevent stock ROM from replacing recovery, however be aware that you might need to reflash stock vbmeta with disabled verity after that to be able to boot stock ROM!
Downloads
Webserver | MEGA
Old releases only: OSDN | AndroidFileHost
Known Issues​
/dev/null
Special Thanks​
Dees_Troy and everyone behind TWRP
Everyone on Mi 9 SE community
Device Sources​
TWRP repository fork
Device tree
Kernel source

Changelogs​twrp-3.5.2_9-1-KudProject-grus
Merged TWRP source changes up to 25 April 2021 (UTC+8)
Updated kernel to MoeSyndrome kernel based on Android 10
Mount firmware partition as read-only
Added support for formatting Cust partition in GUI
twrp-3.4.0-0-KudProject-grus
Merged TWRP source changes up to 22 June 2020 (UTC+8)
Supports decryption of userdata on Android 10-based MIUI and custom ROMs using Android 10 crypto blobs (might not be backwards compatible)
Restored system and vendor (non-image) backup support
Added support for backing up persist (and the image)
Build some blobs from source
Updated remaining blobs from V11.0.2.0.QFBEUXM
Updated prebuilt kernel to latest Pie
twrp-3.3.1-3-grus-20190802
Switched to source-built kernel
Updated blobs from MIUI China developer 9.7.4
Added support for F2FS in kernel (tell me if decryption breaks on this file system though)
Added persist into fstab
Added vendor-side touch firmware
Get CPU temperature from proper thermal zone
Disabled vbmeta checks
Only allow image backups for system and vendor
Symlinked /system to /system_root/system for backward compatibility
Misc stuffs
TWRP and f2fs-tools upstream changes
twrp-3.3.1-2-grus-20190609
Fixed wrong USB-OTG mount point
twrp-3.3.1-1-grus-20190603
Updated prebuilt kernel and DTBO from MIUI China developer 9.5.30
Corrected vendor image flashing
Support for wiping /vendor
Support for flashing and backup up (as part of boot) DTBO
Defined TW_SCREEN_BLANK_ON_BOOT
(Properly) excluded TWRP app
Included private recovery configuration
twrp-3.3.1-0-grus-20190531
Initial build.

Notes​
Don't use fastboot boot to boot the recovery; it'll proceed to boot system instead using recovery's kernel. If this happens with your current kernel's boot image security patch being older than recovery one, you're basically busted as FBE keys are upgraded the time newer combination of system + vendor + boot image security patches are detected.
If you're out of luck in this situation, the only way to resolve is to format data (just backup your data to somewhere safe before doing so).
If you flash disabled vbmeta, you can't flash stock MIUI zips until the original vbmeta is restored.

Wrapped key support is added into recovery just for anticipation, although not defined by default in fstab.
I can't test it since EEA device so far is on March ASB as of V10.2.5.0 stable.
Otherwise, basic functionalities including decryption should work.
Edit: grus doesn't have anti rollback enabled at this moment, but Xiaomi may enable it in the future...

it is save changed from wzsx150 twrp ? or must on fastboot ?

bonbibonkers said:
it is save changed from wzsx150 twrp ? or must on fastboot ?
Click to expand...
Click to collapse
If already on any version of TWRP, just flash it using Flash Image option to recovery partition.

ok, gonna test it out , many thanks great work ??

Thanks! working so far so good

krasCGQ said:
If already on any version of TWRP, just flash it using Flash Image option to recovery partition.
Click to expand...
Click to collapse
Working fine when flashing from wzsx150 twrp version.

krasCGQ said:
If already on any version of TWRP, just flash it using Flash Image option to recovery partition.
Click to expand...
Click to collapse
i already flash it, worked good. but the CPU Temps is little misreading, i think.... it can go up to 80° C lol

rzki03 said:
i already flash it, worked good. but the CPU Temps is little misreading, i think.... it can go up to 80° C lol
Click to expand...
Click to collapse
Just ignore it. That same CPU temperature glitch also happens on sirius.

Wow, finally an *actual* twrp
Sent from my Mi 9 SE using Tapatalk

krasCGQ said:
Just ignore it. That same CPU temperature glitch also happens on sirius.
Click to expand...
Click to collapse
okay then. thank you!

@krasCGQ
Hey, in next release can you add the option to backup and recover dtbo partion/image like with this recovery https://forum.xda-developers.com/mi-9-se/how-to/recovery-twrp-lr-team-wzsx150-v3-3-0-t3926219 ?
Thanks

denzel09 said:
@krasCGQ
Hey, in next release can you add the option to backup and recover dtbo partion/image like with this recovery https://forum.xda-developers.com/mi-9-se/how-to/recovery-twrp-lr-team-wzsx150-v3-3-0-t3926219 ?
Thanks
Click to expand...
Click to collapse
So this release doesn't have Backup/Restore working?

luisbelmont said:
So this release doesn't have Backup/Restore working?
Click to expand...
Click to collapse
Yes, it has. My request was a bit different.

denzel09 said:
Yes, it has. My request was a bit different.
Click to expand...
Click to collapse
Oh, perfect! Thank you. What advantages does your request have?

luisbelmont said:
Oh, perfect! Thank you. What advantages does your request have?
Click to expand...
Click to collapse
To backup and recover dtbo image before and after flashed this custom kernel: https://forum.xda-developers.com/mi...nel-okitakernel-v1-0-mi-9-se-27-2019-t3934029

Thanks for the work! Great seeing you here after ZenFone 2 and Redmi Note 4. Hopefully a KudKernel will be in the works(if not already).

puppetminds said:
Thanks for the work! Great seeing you here after ZenFone 2 and Redmi Note 4. Hopefully a KudKernel will be in the works(if not already).
Click to expand...
Click to collapse
Kinda off-topic, but well rebasing over CAF is a tough job...
Sent from my Mi 9 SE using XDA Labs

Related

[RECOVERY][unified] Official TWRP touch recovery for OnePlus 3/3T

Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Code:
#include <std_disclaimer.h>
/*
* Your warranty is not void.
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Features:
All function in a normal TWRP
Multi-language support
USB OTG
Decrypt /data
F2FS
Tips:
kernel is based on CAF Oreo-MR1 tag: LA.UM.6.5.r1-05300-8x96.0
All QSEE blobs(decrypt related) are pulled from OxygenOS Open Beta 30
I just tested compatibility with encrypted Oreo OxygenOS and LineageOS, no guarantee it works with any pre-Oreo encrypted /data
Install guide:
1. Install fastboot tools from google's sdk on your PC
2. Enter fastboot mode
3. Unlock your bootloader
4. Run "fastboot flash recovery imgfilename.img" in command line
5. Reboot and enjoy it
Download:
https://twrp.me/oneplus/oneplusthree.html
Source code:
https://github.com/omnirom/android_bootable_recovery
https://github.com/TeamWin/android_device_oneplus_oneplus3
https://github.com/dianlujitao/android_kernel_oneplus_msm8996/tree/staging/lineage-15.1
XDA:DevDB Information
TWRP, Tool/Utility for the OnePlus 3
Contributors
dianlujitao
Version Information
Status: Snapshot
Created 2018-01-31
Last Updated 2018-02-01
@dianlujitao Download link leading to github not to download page
vny10 said:
@dianlujitao Download link leading to github not to download page
Click to expand...
Click to collapse
No mate the link automatically downloads the file.
ps_minky16 said:
No mate the link automatically downloads the file.
Click to expand...
Click to collapse
Fixed now
@dianlujitao
what happens to this thread now > [Recovery] Official TWRP for the OnePlus 3 & 3T
@jcadduono retired as its Maintainer?
and TWRP OnePlus 3 page reflects build twrp-3.2.1-0-oneplus3.img with build date as: 2017-12-09 23:34:16 EST
kamilmirza said:
@dianlujitao
what happens to this thread now > [Recovery] Official TWRP for the OnePlus 3 & 3T
@jcadduono retired as its Maintainer?
and TWRP OnePlus 3 page reflects build twrp-3.2.1-0-oneplus3.img with build date as: 2017-12-09 23:34:16 EST
Click to expand...
Click to collapse
As you can see, the (old) manteiner abandoned the thread.
For the download, as you can read: "http://build.twrp.me/twrp-3.2.1-0-oneplus3.img(will be available on TWRP site soon)"
It means that for now you have to download the new TWRP build from that link.
And it will be avaible on official TWRP website later.
I'm on Nougat currently, if I flash this via and old bluespark TWRP will I end up in bootloop?
Korax94 said:
I'm on Nougat currently, if I flash this via and old bluespark TWRP will I end up in bootloop?
Click to expand...
Click to collapse
if you flash it within TWRP - then no, you will not end up in bootloop
i can flash this twrp on last blu spark right? i am currently on omni.
your answer is literally one post above
Is there a workaround for the slow TWRP loading issue.
I always had this with every version when it takes more than a minute for the TWRP to load.
Op3t
dinindourden said:
Is there a workaround for the slow TWRP loading issue.
I always had this with every version when it takes more than a minute for the TWRP to load.
Op3t
Click to expand...
Click to collapse
you must be on F2FS
going EXT4 reduces startup significantly
Sent from my OnePlus 3T using XDA Labs
kamilmirza said:
you must be on F2FS
going EXT4 reduces startup significantly
Click to expand...
Click to collapse
Thanks for the tip, I will back up and try.
dinindourden said:
Is there a workaround for the slow TWRP loading issue.
I always had this with every version when it takes more than a minute for the TWRP to load.
Op3t
Click to expand...
Click to collapse
That's weird, I'm on stock file format too (eversince) and never ever experienced a "one minute TWRP splash screen", it's more like 10 seconds, no matter what TWRP version or how full storage is...
Sent from my OnePlus 3T using XDA Labs
dinindourden said:
Is there a workaround for the slow TWRP loading issue.
I always had this with every version when it takes more than a minute for the TWRP to load.
Op3t
Click to expand...
Click to collapse
Only time I had very slow twrp load, was when I was using a certain theme, was very gfx intensive. Stock twrp or basic themes load fast.
TWRP website has been updated with the unification between OP3 and 3T.
https://twrp.me/oneplus/oneplusthree.html
dinindourden said:
Is there a workaround for the slow TWRP loading issue.
I always had this with every version when it takes more than a minute for the TWRP to load.
Op3t
Click to expand...
Click to collapse
Welcome to ext4. As time goes on, it'll take a longer time to mount f2fs partition.
kamilmirza said:
@dianlujitao
what happens to this thread now > [Recovery] Official TWRP for the OnePlus 3 & 3T
@jcadduono retired as its Maintainer?
and TWRP OnePlus 3 page reflects build twrp-3.2.1-0-oneplus3.img with build date as: 2017-12-09 23:34:16 EST
Click to expand...
Click to collapse
jcadduono hasn't been active since Nougat. In fact official Nougat TWRP is based on my tree, but I'm not actually "maintaining" it. Now some people cannot mount /data in TWRP after installing Oreo, time to fix it and keep it up-to-date.
Hi there, I'm currently on OOS Beta 22 on my 3T. I wanted to root my device with magisk. But I have come across so many posts describing about decryption problem, such as 3T stock bootimage has dm-verity which prevents from booting if I swipe to enable system modifications. To get rid of this I have to flash 'dm-verity forced encryption disabler script'. But I read in the OP that all the blobs related to these problem has been fixed by the dev! If so do I have to flash this zip in BTW the rooting procedure.
just installed the latest and now it won't accept my password. i tried changing it and disabling it from the security settings but it does not work. the previous twrp i used never ascked for passes. log attached.

[Recovery][TWRP][OFFICIAL] for Mi A2 (jasmine_sprout)

Team's Win Recovery Project 3.x, or TWRP3.x for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Cautious :-
Quote:
/*
* Your warranty is now void.
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
What's new in 3.1.1-0:
Backups will now include adopted storage keys (Dees_Troy)
Fixed an adb restore issue (bigbiff)
Fixed rebooting when no OS is present (Dees_Troy)
Fixed line wrapping in the GUI terminal (_that)
Updated TWRP source code to AOSP 7.1.2 (Dees_Troy)Updated TWRP source code to AOSP 7.1.2
What's new in 3.2.1-1:
* minui fixes (cryptomilk)
* Better android-8.0 compatibility in ROM trees (Dees_Troy)
* Fix missing library in android-8.0 (nkk71)
* Fix inconsistent SDCard naming (DevUt)
* Default to TWRP restore instead of adb backup restore to fix restore on fresh TWRP boot (jlask)
What's new in 3.2.0-0:
* Allow restoring adb backups in the TWRP GUI (bigbiff)
* Fix gzip backup error in adb backups (bigbiff)
* Fix a bug in TWRP's backup routines that occasionally corrupted backup files (nkk71)
* Better support for installing Android 8.0 based zips due to legacy props (nkk71)
* Support vold decrypt with keymaster 3.0 in 8.0 firmwares (nkk71)
* Decrypt of synthetic passwords for Pixel 2 (Dees_Troy)
* Support newer ext4 FBE policies for backup and restore in libtar (Dees_Troy)
* v2 fstab support (Dees_Troy)
* Bring TWRP forward to android 8.0 AOSP base (Dees_Troy)
* Various other minor bugfixes and tweaks
What's new in 3.3.0-0:
(Dees_Troy)
Detect mkfs.f2fs version to properly format on f2fs partitions (Dees_Troy)
Allow TWRP to use md5 and sha256 checksums for zip installs (bigbiff)
TWRP can use /data/cache/recovery and /persist/cache/recovery on AB devices with no cache partition (bigbiff)
Switch part of advanced menus in TWRP to use a listbox of options (Dees_Troy)
Use magiskboot to allow repacking boot images for installing TWRP (Dees_Troy with thanks to topjohnwu of course)
What's new in 3.3.1-0:
* Fix selinux issues during formatting - dianlujitao
* Various fixes for toybox and toolbox builds - CaptainThrowback and bigbiff
* Flash both A and B partitions when installing a recovery ramdisk - Dees_Troy
* Add option to uninstall TWRP app from /system - Dees_Troy
* Create digest for subpartitions - bigbiff
Code:
/*
Whats Working?
All paritions are mounting.
Can change Slot A/Slot B on twrp.
Add system_image mount point to flash system images.
Fixed MTP and OTG issues.
Fixed JDI Pannels issue on pie
Added Pie Support.
Fixed Pie permanent twrp.
Added Pie decryption support. (thanks to @[URL="https://4pda.ru/forum/index.php?showuser=6362530"]d4e8ede8f1f2[/URL])
Added Splash img support.
*/
Code:
Flashing Commands:
fastboot boot recovery.img
Downloads :TeamWin
Status : OFFICIAL
Created 2018-11-02
Last Updated 2019-06-24
Another recovery ?
Hi Folk,
We got 4 available recovery as far as now but 100% get buggy for now.
I see many thanks : do someone have tested this Recovery for Mi A2 ? Do it can flash LOS on both slot A and B without failed ?
Thank for your enlightenment.
? Mumu said:
Hi Folk,
I see many thanks : do someone have tested this....
Click to expand...
Click to collapse
I have backed up and restored with this. It works well. Have not flashed any roms though.
I updated my phone to the November beta and could not boot into this twrp as it did not recognize the device was encrypted. The temporary twrp from TingyiChen did work however. Had to wipe and install the October version to get everything back to normal. Will wait for the official release to test some more. Just a heads up to be aware that the next os update might cause some complications.
@Manish4586
I can confirm the latest security update breaks encryption detection by this twrp version. I just updated to the official ota for November and twrp loads but does not ask for the decryption pattern and thus the drive is not decrypted.
And, it seems in a near future that TWRP will be official to Mi A2 - https://github.com/TeamWin/android_device_xiaomi_jasmine
If you take a look at this repo, it's forked from the one that is the unofficial and linked on this thread.
It works well but It has encryption issue. I have a fix for this issue:
-find /vendor/etc/fstab.qcom file and replace line 10:
"
Code:
/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,resize,slotselect,verify
"
-reboot fastboot mode and run it:
"fastboot -w"
parduscix said:
It works well but It has encryption issue. I have a fix for this issue:
-find /vendor/etc/fstab.qcom file and replace line 10:
""
-reboot fastboot mode and run it:
"fastboot -w"
Click to expand...
Click to collapse
This format userdata and others partitions
Totally useless.
Same of format data using TWRP
How to flash twrp I'm going in miA2. I have tried but failed no command show
razahaider03 said:
How to flash twrp I'm going in miA2. I have tried but failed no command show
Click to expand...
Click to collapse
unlock bootloader, then boot to fastboot and boot the recovery
Ironmaniaco said:
And, it seems in a near future that TWRP will be official to Mi A2 - https://github.com/TeamWin/android_device_xiaomi_jasmine
If you take a look at this repo, it's forked from the one that is the unofficial and linked on this thread.
Click to expand...
Click to collapse
It's official now.
Manish4586 said:
Flashing Commands:
fastboot boot recovery.img
flash twrp-flasher-xxx.zip from twrp
Click to expand...
Click to collapse
Where do I download the twrp-flasher zip? I only found the .img in the website. Or is fastboot recommended?
Thanks.
Now we have TWRP fixed on smartphone?
Or we have to flash TWRP after flash every ROM?
Thx man. Its working.
I booted into twrp and then flashed the installer zip which is i took from your sourceforge account.
Now im able to boot into recovery without fastboot. ??
satti8893 said:
Thx man. Its working.
I booted into twrp and then flashed the installer zip which is i took from your sourceforge account.
Now im able to boot into recovery without fastboot. ??
Click to expand...
Click to collapse
Have a nice day
jaycedam said:
Where do I download the twrp-flasher zip? I only found the .img in the website. Or is fastboot recommended?
Thanks.
Click to expand...
Click to collapse
It will be available on twrp download soon.
tsulolxd said:
Now we have TWRP fixed on smartphone?
Or we have to flash TWRP after flash every ROM?
Click to expand...
Click to collapse
We have to flash twrp.zip
Manish4586 said:
We have to flash twrp.zip
Click to expand...
Click to collapse
Where do I find this zip? It's working on Android Pie?
Hi Manish4586, I'm in PBRP and Pixel Experience right now, how to change to TWRP OFFICIAL for Mi A2? I try from fastboot it didn't work, plase help.
I installed the zip via sideload, it's ok or do I have to flash the img?

[UNOFFICIAL][ENCRYPTION][wrappedkey] TWRP 3.3.1-6: proper system_as_root & decryption

[UNOFFICIAL][ENCRYPTION][wrappedkey] TWRP 3.3.1-6: proper system_as_root & decryption
Code:
/*
* I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed (like it did for me...).
* Please do some research if you have any concerns about features included in the products you find here before flashing it!
* YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you.
* Your warranty will be void if you tamper with any part of your device / software.
* Same statement for XDA.
*/
Introduction
This is an unofficial build of TWRP for Redmi Note 7 Pro (violet). Differences with the official one include:
- Supports CAF-based wrappedkey encryption (decryption) properly (tested with MIUI 10.3.5.0)
- Supports decrypting devices that have screen lock set up after Android 9 May update, which introduced a new key derivation function.
- Mounts the system partition at /system_root as per AOSP standards. This makes the auto-backup scripts (e.g. GApps / Magisk survival script) work properly during updates, and you no longer need any 'patch' to flash GApps / Magisk properly. However, this may break some existing ROMs. See below FAQ section for details.
- Appended DTBO to the recovery image so it doesn't depend on the dtbo partition. No standalone DTBO image required.
Flashing instructions
- Download and extract the img file
- Reboot to fastboot mode
- fastboot flash recovery whatever_img_file_you_extracted.img
- Reboot and press Volume + to enter recovery
- DO NOT try to run 'fastboot boot recovery.img', it won't work.
- DO NOT flash the fcrypt disabler if you use my recovery. There is no need to do so, and it is possible to mess stuff up if you don't know what you are doing.
- You have to format the data partition if and ONLY IF:
1) You were not encrypted, now going to an encrypted state, or vice-versa OR
2) You were on a ROM other than MIUI that does not support "wrappedkey" (ROMs would often state it supports wrappedkey if it does), now going to a ROM that supports it
Limitations
DO NOT boot this recovery with empty system and vendor partitions. It will fail to decrypt any data partition with empty /system and /vendor. DO NOT wipe system and vendor partitions without installing a new one before rebooting. I am working to remove this limitation.
Now works even with empty system and vendor partitions after 3.3.1-5. No need to worry about formatting system and vendor breaking TWRP any more.
The restore zip created by the Migrate app is NOT compatible with this recovery. It's a problem of the Migrate app, not this recovery. Please DO NOT try to flash the restore zip created by Migrate.
FAQ
- Q: Do I need any specific DTBO image to make this recovery working?
- A: Nope. It is appended to the recovery image so it will work with any DTBO.
- Q: What is wrappedkey?
- A: It's a different mode of FBE implemented in CAF, the Qualcomm branch of AOSP.
- Q: This cannot install ROM X, why?
- A: Because it mounts the system partition at /system_root, which is AOSP standard behavior for A-only system_as_root devices, but is broken in some custom ROMs currently (MIUI should work though). To make any ROM work again, they will need to include this commit from LineageOS Gerrit https://review.lineageos.org/c/LineageOS/android_build/+/247066
- Q: Decryption doesn't work with ROM X, why?
- A: Decryption should work for most ROMs based on the CAF branch (not AOSP). CAF ROMs (including official MIUI) use a different scheme for key storage, which is why TWRP hasn't supported it till now. I have ported the CAF encryption changes (wrappedkey) to TWRP, but unfortunately this will break ROMs that do not support the CAF wrappedkey mode of encryption. Here is a list of patches non-CAF ROMs need to support CAF-encrypted /data partitions https://mokeedev.review/q/topic:%22fbe-wrapped-key%22+(statuspen%20OR%20status:merged). If you confirm your ROM is CAF-based but the decryption still does not work, please open an issue on my GitHub repository which you could find below. (XDA threads are no good for issue tracking, sorry)
- Q: Why not contribute to the official TWRP?
- A: All the patches to the TWRP code base have been submitted to the official gerrit code review, though not merged yet, which you can see below.
Downloads
3.3.1-6: https://mega.nz/#!3QIRQYhK!Jq5QrGfJw5VCYZ8sq_BO1qNZecrFqlM9IB1IdSwogvI
changes: updated kernel to support pstore instead of /proc/last_kmsg. If you don't know what this is, it's probably not relevant to you.
Here you can find an unofficial LOS build with wrappedkey encryption and also proper system_as_root support for those survival scripts https://forum.xda-developers.com/redmi-note-7-pro/development/unofficial-lineageos-16-caf-encryption-t3933532. In addition, all official MIUI builds should flash just fine.
History versions:
3.3.1-5: https://mega.nz/#!nMowHKiL!zRvoTM0iIZKArmUDnZzaEFtXQv0_q7hIHUCmTHTOmOM
changes: 1) Now works even with empty /system and /vendor partition 2) Fixed brightness problem; 3) Enabled EDL Reboot
3.3.1-3: https://mega.nz/#!yAYXxAzZ!FNMYLzLphnSmJ-DbBx-OZUgxxYiftgn8e4Jn3kxiQik
Patches and sources
Patches for TWRP are available here:
https://gerrit.omnirom.org/#/c/34091/
https://gerrit.omnirom.org/#/c/34093/
https://gerrit.omnirom.org/#/c/34092/
https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/34096/
Patches for ROMs to support wrapped key have been given in the above sections.
Source of the current device tree for TWRP: https://github.com/PeterCxy/android_device_xiaomi_violet-twrp
Kernel source: https://github.com/PeterCxy/android_kernel_xiaomi_sm6150, note that the device tree uses a prebuilt kernel image.
Contributors
PeterCxy, Dyneteve, merothh
Source Code: https://github.com/PeterCxy/android_device_xiaomi_violet-twrp
Now fixed and tested with MIUI.
PeterCxy said:
Now fixed and tested with MIUI.
Click to expand...
Click to collapse
Could you please tell us what is fixed and what is wrong with the previous one? Just out of curiosity.
I’m not new to installing custom recoveries and installing ROM, but I am new to Xiaomi devices.
In the simplest form possible,
With this I should be able to just run the ‘fastboot install recovery twrp.img’ and not have to run “fastboot erase userdata’?
also
Do I still need to flash the zip I have that disables forced encryption?
Could you provide instructions to flash this ?
Or is it just the same as the 'official one'?
Can confirm this successfully decrypts storage, running xiaomi.eu on my phone. Thanks for your work.
Dwughjsd said:
Could you please tell us what is fixed and what is wrong with the previous one? Just out of curiosity.
Click to expand...
Click to collapse
It did not decrypt MIUI 10.3.5.0 successfully due to magic (I missed some commits from qcom). It was fixed by pulling more commits in.
Jpwner said:
I’m not new to installing custom recoveries and installing ROM, but I am new to Xiaomi devices.
In the simplest form possible,
With this I should be able to just run the ‘fastboot install recovery twrp.img’ and not have to run “fastboot erase userdata’?
also
Do I still need to flash the zip I have that disables forced encryption?
Click to expand...
Click to collapse
You won't need to erase userdata or flash fcrypt disabler anymore, if all the ROMs will update to support the wrappedkey encryption
Naveenthemi said:
Could you provide instructions to flash this ?
Or is it just the same as the 'official one'?
Click to expand...
Click to collapse
just fastboot flash recovery whatever_you_downloaded_and_extracted.img
PeterCxy said:
just fastboot flash recovery whatever_you_downloaded_and_extracted.img
Click to expand...
Click to collapse
So it's possible for me to flash OTA Updates without encountering a bootloop and such?
Can someone please provide an alternate download link? The Mega link doesn't seem to work for me.
EDIT: Worked on a different device. Thanks.
Naveenthemi said:
So it's possible for me to flash OTA Updates without encountering a bootloop and such?
Click to expand...
Click to collapse
+1
Please answer
Good job! ?
I want you to know that your patch has been merged with the official one. I was away for a while so I hope you understand the little unfortunate delay.
In latest update can we flash any custom roms without any issue?
Yogendra Kher said:
In latest update can we flash any custom roms without any issue?
Click to expand...
Click to collapse
You have to wait until custom ROMs pull in necessary system_as_root changes. Currently it seems only my LOS build pulled that in
PeterCxy said:
You have to wait until custom ROMs pull in necessary system_as_root changes. Currently it seems only my LOS build pulled that in
Click to expand...
Click to collapse
Is it possible to flash OTA updates without encountering bootloops and such? (MIUI)
Naveenthemi said:
Is it possible to flash OTA updates without encountering bootloops and such? (MIUI)
Click to expand...
Click to collapse
Should work fine with MIUI. At least from what I have tested.
kushal.purkar said:
+1
Please answer
Click to expand...
Click to collapse
PeterCxy said it would as far as his testing had been done.
Gapps aroma not installing in this one as well. error 255
Can I flash Magisk and root my phone with this build.?
Do you have any Magisk zip file that will work.?
Thank you for your work

[RECOVERY][3.4.0-10][pyxis/vela]Official/Unofficial TWRP Xiaomi Mi 9 Lite/CC 9(Stable)

Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Features:
- Decryption works
- Otg works
- Backups works
- Flash Rom works
- Fastboot boot command support
- Compatibility.zip error fixed
- Vela fully supported
- Android Q Support
- Android 11 Decryption
Download:
TWRP 3.4.0-10 Unofficial by mauronofrio
TWRP 3.4.0-0 Unofficial by mauronofrio
TWRP 3.3.1-3 Unofficial by mauronofrio
TWRP 3.3.1-2 Unofficial by mauronofrio
TWRP 3.3.1-0 Unofficial by mauronofrio
Official Builds(The unofficial one is always more updated and more supported)
To Flash the TWRP:
if it's the first time you flash the TWRP or you are getting problems of TWRP lost or device doesn't boot after flashed magisk or something else you need to flash a script to patch your vbmeta:
VBMETA PATCHER
To flash the TWRP:
Code:
fastboot flash recovery twrp-3.3.1-xx-xxxxxx-mauronofrio.img
Then reboot in TWRP manually or using a fastboot command.
Code:
fastboot boot twrp-3.3.1-xx-xxxxxx-mauronofrio.img
or
Code:
fastboot oem reboot-recovery
Flash the VBMETA PATCHER and reboot.
REMEMBER: is important that from fastboot you directly go in TWRP mode or the TWRP will be overwritten.
Reccomended ADB and Fastboot binaries:
Adb and Fastboot Installer
Source code:
https://github.com/omnirom/android_bootable_recovery
https://github.com/mauronofrio/android_device_xiaomi_pyxis ( It will be available when the twrp will be fully tested)
Using precompiled stock kernel
My Telegram TWRP Support Group:
https://t.me/twrp_Mauronofrio
Donations:
Credits:
Created 2020-01-04
This TWRP is not tested, but it should work for all. This TWRP should support pyxis and vela at the same time. If someone test it, please let me know. TWRP is perfectly working
mauronofrio said:
This TWRP is not tested, but it should work for all. This TWRP should support pyxis and vela at the same time. If someone test it, please let me know.
Click to expand...
Click to collapse
Worked Perfectly
Many thanks
and best regards
m_a_omar said:
Worked Perfectly
Many thanks
and best regards
Click to expand...
Click to collapse
On which device you tested it?
Thanks for your work.
Installed without problems. Now I make a copy of security and restored, no issues. Later I try to flash a ROM.
kgtlrt said:
Thanks for your work.
Installed without problems. Now I make a copy of security and restored, no issues. Later I try to flash a ROM.
Click to expand...
Click to collapse
Which device do you have?
Mi 9 Lite works!?
Working great on pyxis, just used to flash Magisk 20.2
Thank you!
Pixys
Running smoothly on Mi 9 Lite Pixys: D Thanks!
Finally multilingual and no self-promotion like other TWRPs here. Very good! Flash with Miui11 on Android 10 base ok.
-> Mi 9 Lite
So it's compatible for both Android 9 and 10?
Has anyone tried to create TWRP back up with this version?
Sent from my MI CC 9 using Tapatalk
Seems to work but somehow i messes up my device
WHat i noticed:
Booting the recovery works, backups to external SD also seems to work. I did a factory reset and wiped /system but after that i could not boot to the recovery anymore. It showed:
downloading 'boot.img'...
OKAY [ 1.937s]
booting...
FAILED (remote: Failed to load/authenticate boot image: Load Error)
finished. total time: 1.953s
Additionally, the recovery only shows garbled names when browsing /sdcard. Is this a bug?
KRKroenen said:
WHat i noticed:
Booting the recovery works, backups to external SD also seems to work. I did a factory reset and wiped /system but after that i could not boot to the recovery anymore. It showed:
downloading 'boot.img'...
OKAY [ 1.937s]
booting...
FAILED (remote: Failed to load/authenticate boot image: Load Error)
finished. total time: 1.953s
Additionally, the recovery only shows garbled names when browsing /sdcard. Is this a bug?
Click to expand...
Click to collapse
No this is not a bug, it's just something new in android, you shouldn't wipe system and vendor or you will take always these problems, to fix this you have to flash a fastboot rom.
k3lcior said:
So it's compatible for both Android 9 and 10?
Click to expand...
Click to collapse
It's compatible with both
Install to mi 9 Lite and when try to backup get error 255
Sent from my MI 9 Lite using Tapatalk
mauronofrio said:
No this is not a bug, it's just something new in android, you shouldn't wipe system and vendor or you will take always these problems, to fix this you have to flash a fastboot rom.
It's compatible with both
Click to expand...
Click to collapse
So what i noticed is, that the contents of /sdcard show properly when /data was encrypted and you provide the correct password to decrypt it. If you do a factory reset, /data is unencrypted automatically and the contents of /sdcard show up as strange names.
Xiaomi mi9 lite, works this TWRP.
I have installed through twrp, I do not put the password and the folders in Install appears with numbers and letters only in internal storage (and correctly in SD).
I have put the security password of the mobile, and the folders appear correctly in Install.
In both cases, folders appear with their correct namer in the internal TWRP browser.
Backup done correctly in 384 seconds. Thanks.
SORRY, I HAVE ANDROID 9 PFCEUUXM 11.3.4.0 ESTABLE
minotavros said:
Install to mi 9 Lite and when try to backup get error 255
Sent from my MI 9 Lite using Tapatalk
Click to expand...
Click to collapse
This is usually caused from double apps or multi users
minotavros said:
Install to mi 9 Lite and when try to backup get error 255
Sent from my MI 9 Lite using Tapatalk
Click to expand...
Click to collapse
https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632/amp/
mauronofrio said:
Which device do you have?
Click to expand...
Click to collapse
mi 9 lite android Q

TWRP 3.7.0-12 for Sunfish[Testing]

[RECOVERY] TWRP 3.7.0-12 - TeamWin Recovery Project
Introduction:
Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added a lot of our own features. It's a fully touch driven user interface , no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Key Features:
Touchscreen driven with real buttons and drag-to-scroll
XML-based GUI that allows full customization of the layout true theming!
Settings are saved to the sdcard and persist through reboots
Ability to choose which partitions to back up and which to restore
Ability to choose to compress backups now with pigz (multi-core processor support for faster compression times)
Onscreen keyboard
Easy selection of internal/external storage
In addition to the above new features, TWRP features a scripting engine that allows an app to send commands to the recovery for the recovery to perform during startup. We call this scripting engine OpenRecoveryScript. This engine will be put to use immediately in the GooManager app. GooManager will be able to install recoveries automatically for most supported devices. The app will also let you choose to install multiple zips from within Android, wipe, and run a backup.
We are looking for other talented developers, themers, and device maintainers if they are interested in helping with a free, open source project.
Source Code:
sunfish Device Config: https://github.com/tnakamur/android_device_google_sunfish
DOWNLOAD:
Hello, this is a test build for sunfish users.
It has decryption working, touch, adb and backup and restore seems to work. Super partition volumes can be mounted, and the super partition can be backed up.
Android12 FW
TWRP3.7.0-12
https://github.com/tnakamur/Action-Recovery-Builder/releases/tag/3485414024
I built it with TWRP3.7.0 source code.
It needs custom kernel with LZMA ramdisk support.
Android11 FW
TWRP3.6.1-11
https://drive.google.com/file/d/1lmz3rvegCcGif-jFck7tfH7tT-RzcFWa/view?usp=sharing
I built it with TWRP3.6.1 source code.
Fix time stamp problem.
It needs custom kernel with LZMA ramdisk support.
test10
https://drive.google.com/file/d/16aTC8w0YUYBS_lqcA3KL0kz5mq7NsxxG/view?usp=sharing
I rebuilt it base Pixel4.
I tested it with October firmware.
It needs custom kernel with LZMA ramdisk support.
test6
https://drive.google.com/file/d/1mB73pX_0UQQA4PNPvqBBWqSZ6TixZfho/view?usp=sharing
I built it with September firmware.
I tested it with September firmware.
It needs custom kernel with LZMA ramdisk support.
test5
https://drive.google.com/file/d/1dabH0e0xkgZOldmnoWD8ZrvPV-IXGUf-/view?usp=sharing
I built it with August firmware.
I tested it with August firmware.
It needs custom kernel with LZMA ramdisk support.
test3
https://drive.google.com/file/d/1xhyIrLohcVY3xKHCeBoFAUzCmfBupibk/view?usp=sharing
I built it with June firmware.
I tested it with June firmware.
It needs custom kernel with LZMA ramdisk support.
I built my custom kernel, and link is below.
https://drive.google.com/file/d/1e8xFI5SuR8ty5X6R8WXVqrKLDOxprJcF/view?usp=sharing
Maybe, some other custom kernel works fine.
test2
https://drive.google.com/file/d/1t0VOZK2XlyxvC8a_o9XWI7ETy6XMS6bT/view?usp=sharing
I fix repack ramdisk problem.
It works 'Install Recovery Ramdisk'.
It needs custom kernel with LZMA ramdisk support.
I built my custom kernel, and link is below.
https://drive.google.com/file/d/1e8xFI5SuR8ty5X6R8WXVqrKLDOxprJcF/view?usp=sharing
Maybe, some other custom kernel works fine.
test1
https://drive.google.com/file/d/1EJhdSTbstkjVqx3YaowC-glWD6kJCN9Q/view?usp=sharing
It's tested FW version RQ1A.RQ1A.210205.004(Feb FW).
I don't test any other FW version.
It doesn't work 'Install Recovery Ramdisk'. It's only for fastboot mode.
I'm working fixing it and build TWRP with June FW.
Andriod10 FW https://drive.google.com/file/d/1PZaU9PpYmdcAHlyi0zhNwEGnBsAHDW_E/view?usp=sharing
It's tested both FW version QD4A.200805.001 and QD4A.200805.003.
And my custom kernel is OK too.
What to backup
* super
* data
* boot
What to restore
* super
* data
* boot
Repacking TWRP into Boot partition
To repack TWRP into the boot partition to override stock recovery when rebooting to recovery, perform the following steps
1. adb push <latest_twrp_boot.img> /sdcard/
2. reboot to bootloader and fastboot latest boot.img of TWRP
3. Go to Install
4. Touch Install Image
5. Select your TWRP boot.img from /sdcard
6. Install recovery ramdisk
7. Swipe to confirm flash
8. Reboot to recovery and android to verify installation
9. Reinstall magisk, if you want
Credit and Thanks
@bigbiff - his big work for TWRP
@HolyAngel - I refer his kernel commit
@wrongway213 - I refer his kernel commit, too
If you like my work, donations are always welcome.
Don't forget to hit thanks and rate the thread nicely, it's free
To install TWRP, you need LZMA support kernel.
My custom kernel is here
https://drive.google.com/file/d/1nuXc88t0Iokc0ha-AicOtZEUeGCGwQ-R/view?usp=sharing
Why is there a custom kernel needed?
Taobaibai said:
Why is there a custom kernel needed?
Click to expand...
Click to collapse
Because stock kernel doesn't support LZMA ramdisk.
It's needed to install TWRP.
https://forum.xda-developers.com/showpost.php?p=83255125&postcount=207
Taobaibai said:
Why is there a custom kernel needed?
Click to expand...
Click to collapse
nikamura said:
Because stock kernel doesn't support LZMA ramdisk.
It's needed to install TWRP.
https://forum.xda-developers.com/showpost.php?p=83255125&postcount=207
Click to expand...
Click to collapse
Better to boot vs install until build is proven. Yep, a bit annoying but keeps options open while allowing fluid OTA updates if that's your preference. In boot scenario custom kernel should not be needed.
This is big news and so awesome!
Nice!! Congrats on getting it built and posted! Thank you for the mention
The kernel gived me a bootloop
Theodor0504 said:
The kernel gived me a bootloop
Click to expand...
Click to collapse
Witch FW version you use?
Has anyone used this to create a back up and then restore it properly without problems?
nikamura said:
Witch FW version you use?[/QUOTE
I don't remember actually
Click to expand...
Click to collapse
https://forum.xda-developers.com/pixel-4a/development/kernel-holydragon-kernel-t4155283
This kernel is good or no?
My apologies if this has been asked/answered before, but could someone ELI5 on why it's so difficult to get custom recoveries running on Pixel devices?
Lada333 said:
My apologies if this has been asked/answered before, but could someone ELI5 on why it's so difficult to get custom recoveries running on Pixel devices?
Click to expand...
Click to collapse
The short answer is - recovery is no longer its own independent partition. Instead it's embedded into boot.img which also contains the kernel for the OS itself.
Recovery used to be its own partition because OS updates looked like this:
- OS downloads new OTA file
- OS boots into recovery
- Recovery installs the OTA
- Reboots back to OS
Now on "A/B" devices OS updates look like this:
- OS boots from "partition A".
- OS downloads new OTA file.
- OS installs OTA on "partition B" which it's not currently booting from.
- OS switches the active partition to B and reboots from that.
No recovery needed anymore. So it's no longer a partition of its own. Which is great for Google but harder for Android do-it-yourselfers.
cmstlist said:
The short answer is - recovery is no longer its own independent partition. Instead it's embedded into boot.img which also contains the kernel for the OS itself.
Recovery used to be its own partition because OS updates looked like this:
- OS downloads new OTA file
- OS boots into recovery
- Recovery installs the OTA
- Reboots back to OS
Now on "A/B" devices OS updates look like this:
- OS boots from "partition A".
- OS downloads new OTA file.
- OS installs OTA on "partition B" which it's not currently booting from.
- OS switches the active partition to B and reboots from that.
No recovery needed anymore. So it's no longer a partition of its own. Which is great for Google but harder for Android do-it-yourselfers.
Click to expand...
Click to collapse
The only A/B phone I've ever worked on was my Dad's Mi A1, but that had TWRP running just fine.
I remember reading a few things about Project Treble back then, is that related to this?
Theodor0504 said:
nikamura said:
Witch FW version you use?[/QUOTE
I don't remember actually
Click to expand...
Click to collapse
It's for android 10 version.
I tested QD4A.200805.001 version.
It may work QD4A.200805.003 version(it used same boot.img), but I didn't test.
Click to expand...
Click to collapse
bursug said:
https://forum.xda-developers.com/pixel-4a/development/kernel-holydragon-kernel-t4155283
This kernel is good or no?
Click to expand...
Click to collapse
I used his kernel as a reference, and I added LZMA ramdisk support.
So, his kernel isn't fit TWRP install.
nikamura said:
Because stock kernel doesn't support LZMA ramdisk.
It's needed to install TWRP.
https://forum.xda-developers.com/showpost.php?p=83255125&postcount=207
Click to expand...
Click to collapse
Did you use LZMA compression because the partition where the ram disk is has very little room like the pixel 3A? The pixel 3A did not have enough room in the partition so TWRP was stripped down of features and compressed with LZMA to get it small enough to fit. I believe, but could be wrong, LZMA was used because it yielded the smallest image.
Does the Pixel 4A have the same space issues as the Pixel 3A?
I'm only asking because on the Pixel 3A TWRP never became functional enough to use much because of lack of partition space to reside even after uniquely compressed with LZMA. If the pixel 4A has more space maybe LZMA compression and a specific kernel that requires lcma might not be necessary?
I've never had an a/b phone before and am thinking of getting this one.
A couple of questions :
What is sunfish
Does anyone regret getting this phone
Is it a pain in the azz to deal with a/b
12paq said:
Did you use LZMA compression because the partition where the ram disk is has very little room like the pixel 3A? The pixel 3A did not have enough room in the partition so TWRP was stripped down of features and compressed with LZMA to get it small enough to fit. I believe, but could be wrong, LZMA was used because it yielded the smallest image.
Does the Pixel 4A have the same space issues as the Pixel 3A?
I'm only asking because on the Pixel 3A TWRP never became functional enough to use much because of lack of partition space to reside even after uniquely compressed with LZMA. If the pixel 4A has more space maybe LZMA compression and a specific kernel that requires lcma might not be necessary?
Click to expand...
Click to collapse
Sorry, I don't know it's needed LZMA compression.
I used pixel4 TWRP made by @bigbiff as a reference, and I used LZMA compression as he did.

Categories

Resources