[RECOVERY][3.5.2_9-2][Mi A2 Lite] Unofficial TWRP recovery for Xiaomi Mi A2 Lite

Search This thread

LinkBoi

Senior Member
Sep 13, 2018
63
61
Sony Xperia E1
Xiaomi Redmi 6A
TWRP-recovery.jpg

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:
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:
- Open Source
- Payload.bin support (ROM flashing works)
- Proper MTP support (for both 4.9 and 3.18 kernels)
- Working decryption for both FBE and FDE
- Adoptable Storage is working
- Android 11 support (No bootloops to recovery mode)
- NTFS, F2FS, exFAT, FAT32 support for SD Cards and USB drives
- Ability to flash splash images directly to the splash partition
- Adjusted theme to account for the notch (the clock doesn't overlap with the notch)
- No TWRP app installation prompts
- Older 3.4.0 button-style reboot menu instead of the newer listbox-style one
- Addon.d script to make TWRP survive ROM updates

Download:
TWRP image: https://drive.google.com/file/d/19ysSbW31NG4QF5OClbox-mArIb17KbpT/view?usp=sharing
TWRP Installer: https://drive.google.com/file/d/1-wk_0kOe_e-2XDDiv08BxJhn1ixWXjUw/view?usp=sharing

Installation Instructions:
- Make sure your bootloader is unlocked. If not, unlock it first.
- Reboot to Bootloader (aka Fastboot mode)
- Execute:
Code:
fastboot boot twrp-3.5.2_9-2-daisy-unofficial.img
- Flash the TWRP Installer zip to keep TWRP permanently

Notes:
- You can ignore any "Failed to unmount /vendor: Device or resource busy" errors since they do not cause any issues (this
happens when switching the active slot while the vendor partition is mounted).
- This TWRP does not have the newer 3.5.0 theme changes in the reboot menu because it is confusing for a significant amount
of users and does not match the rest of the button-style design.
- The TWRP app checks and prompts have been completely removed due to the app causing a lot of issues including bootloops
since it is not designed for A/B devices.
- The portrait_hdpi theme has been adjusted to have more padding in the status bar and to account for the presence of the
notch (the clock's position has been modified in order for the clock not to get overlapped by the notch)
- TWRP's addon.d will only work in the following scenarios:
a) When updating your ROM through the ROM's Updater application
b) When dirty-flashing a newer build of the same ROM you have installed from recovery
- TWRP's addon.d (TWRP survival) may not work in all ROMs as some ROMs choose not to have permissive update-engine domain. This essentially results in SELinux denials, preventing the addon.d script from executing when SELinux is enforcing. You can read more about the said issue here (https://github.com/topjohnwu/Magisk/commit/cba0d040000d6ff38c6646bb9d7daa12beae2878). Thereby, having Magisk is the only way of having a working addon.d environment consistent to all ROMs as of now since it makes ROMs allow all addon.d scripts to run (makes update-engine permissive). Having said that and as mentioned in the previous link, some ROMs like LineageOS and CrDroid do not need Magisk for addon.d scripts to work, as they don't block said scripts by default.

Source code:
Recovery Source: https://github.com/LinkBoi00/android_bootable_recovery
Device tree: https://github.com/LinkBoi00/twrp_device_xiaomi_daisy
Kernel source: https://github.com/LinkBoi00/twrp_kernel_xiaomi_daisy

XDA:DevDB Information
TWRP-3.5.2_9-2-Unofficial, Tool/Utility for the Xiaomi Mi A2 Lite

Contributors
LinkBoi
Source Code: https://github.com/LinkBoi00/twrp_device_xiaomi_daisy


Version Information
Status:
Stable
Current Stable Version: 3.5.2_9-2
Stable Release Date: 2021-05-04

Created 2020-10-19
Last Updated 2021-05-04
 

Attachments

  • twrp-3.5.2_9-2-daisy-unofficial.img
    28.1 MB · Views: 9
  • twrp-3.5.2_9-2-daisy-unofficial.zip
    19 MB · Views: 11
Last edited:

Antho02

Senior Member
Dec 19, 2010
294
40
i'll give a try. still using twrp-3.3.1-dees_troy-daisy cuz its the only one that doenst ask a decrypt key that i dont have
 

LinkBoi

Senior Member
Sep 13, 2018
63
61
Sony Xperia E1
Xiaomi Redmi 6A
The handling of the "Adoptable Storage" still broken.



DATA is not encrypted (I use a custom ROM with Force-Encryption-Disabler)
Can you send me logs of that issue (advanced > copy log > tick the "include kernel log" option and swipe in the "bar")? After doing this can you also try official twrp and tell me if that has the same issue?
Thanks for the feedback

PS: Can you join a telegram group (https://t.me/XMiA2Lite)? If /When you join there, mention me (@runrunrun00) and your issue, thanks in advance
 
Last edited:

PC295

Senior Member
Dec 20, 2016
242
77
Görlitz
The problem is with all TWRPs. (Official, Offain, this)
I have to use OTG to install Custom ROMs etc.

It is probably not a TWRP problem but one of the CustomROMs?
Unfortunately, I also find that there are adoptable storage issues in many custom ROMs.
It got noticeably worse with Android 10 ROMs.

For example the migration via key file (/data/misc/vold/....key) does not work everywhere.
Or the memory only works after setting up the microSD several times.


Log attached...
 

LinkBoi

Senior Member
Sep 13, 2018
63
61
Sony Xperia E1
Xiaomi Redmi 6A
The problem is with all TWRPs. (Official, Offain, this)
I have to use OTG to install Custom ROMs etc.

It is probably not a TWRP problem but one of the CustomROMs?
Unfortunately, I also find that there are adoptable storage issues in many custom ROMs.
It got noticeably worse with Android 10 ROMs.

For example the migration via key file (/data/misc/vold/....key) does not work everywhere.
Or the memory only works after setting up the microSD several times.


Log attached...

i might have found a way to fix this issue (in the bootable twrp, the installed one depends on your rom)
 

Yyres55

Member
Dec 9, 2020
8
1
When I use Offain TWRP PC output is like this
Code:
downloading 'boot.img'...
OKAY [ 15.830s]
booting...
OKAY [  0.748s]
finished. total time: 16.578s
and then phone reboot to stock Android
When I use TWRP from this thread PC output is same but phone boot Android Recovery and it says Can't load Android system. Your data be corrupt and there are 2 options Try Again and Factory Reset when I try again it boots to stock.
 
Last edited:
  • Like
Reactions: [email protected]

LinkBoi

Senior Member
Sep 13, 2018
63
61
Sony Xperia E1
Xiaomi Redmi 6A
When I use Offain TWRP PC output is like this
Code:
downloading 'boot.img'...
OKAY [ 15.830s]
booting...
OKAY [  0.748s]
finished. total time: 16.578s
and then phone reboot to stock Android
When I use TWRP from this thread PC output is same but phone boot Android Recovery and it says Can't load Android system. Your data be corrupt and there are 2 options Try Again and Factory Reset when I try again it boots to stock.
If you want, you can contact me on telegram, I might have a fixed version there
 
  • Like
Reactions: Yyres55

LinkBoi

Senior Member
Sep 13, 2018
63
61
Sony Xperia E1
Xiaomi Redmi 6A
hi, is there any plan to support encryption??
Yup, of course. In the next release, 3.5.0, every bug I listed will be fixed, including Decryption, Android 11 support and more. If you want to test the release candidate (which is still 3.4.0 because twrp hasn't released 3.5.0 yet), you can join the telegram group below:
www.t.me/DaisyTestflight

New update will be released in XDA when TeamWin releases 3.5.0
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Status update:

    For anyone wondering, TWRP 3.5.2 is coming soon. Highlights of said update include:
    - a text editor (nano to be precise)
    - Digest verification fixes
    - Terminal and File Browser improvements
    - Lang / Translation updates
    and more.

    Having said that, a TWRP addon.d setup is being worked on, that will remove the need to reflash TWRP after flashing ROM or an OTA through a ROM updater. Last but not least, the EDL reboot button may be added back, assuming it works without any issues.
    3
    Team Win Recovery Project 3.5.2_9-2 Update

    Download:

    TWRP image: https://drive.google.com/file/d/19ysSbW31NG4QF5OClbox-mArIb17KbpT/view?usp=sharing
    TWRP Installer: https://drive.google.com/file/d/1-wk_0kOe_e-2XDDiv08BxJhn1ixWXjUw/view?usp=sharing

    Changelog (from 3.5.0-1):
    - Synced with all TWRP 3.5.2_9 source changes (https://twrp.me/site/update/2021/04/07/twrp-3.5.2-released.html)
    - Added addon.d script to make TWRP persist through OTA updates and dirty flashes of the same ROM
    - Removed the ability to flash TWRP through the Magisk app (Magisk Manager), as it was causing issues
    - Bump device version to 2
    - Set ro.treble.enabled to true since daisy supports treble
    - fstab: Add removable flag to vendor
    - General system stability improvements to enhance the user experience
    1
    Status update:

    For anyone wondering, TWRP 3.5.2 is coming soon. Highlights of said update include:
    - a text editor (nano to be precise)
    - Digest verification fixes
    - Terminal and File Browser improvements
    - Lang / Translation updates
    and more.

    Having said that, a TWRP addon.d setup is being worked on, that will remove the need to reflash TWRP after flashing ROM or an OTA through a ROM updater. Last but not least, the EDL reboot button may be added back, assuming it works without any issues.
    You peru!!!
    1
    Is the latest version stable for use?
    Yes
    1
    Clarifications for the TWRP addon.d function (TWRP Survival)

    TWRP's addon.d will only work in the following scenarios:
    a) When updating your ROM through the ROM's Updater application
    b) When dirty-flashing a newer build of the same ROM you have installed from recovery

    Last but not least, TWRP's addon.d (TWRP survival) may not work in all ROMs as some ROMs choose not to have permissive update-engine domain. This essentially results in SELinux denials, preventing the addon.d script from executing when SELinux is enforcing. You can read more about the said issue here. Thereby, having Magisk is the only way of having a working addon.d environment consistent to all ROMs as of now since it makes ROMs allow all addon.d scripts to run (makes update-engine permissive). Having said that and as mentioned in the previous link, some ROMs like LineageOS and CrDroid do not need Magisk for addon.d scripts to work, as they don't block said scripts by default.
  • 9
    TWRP-recovery.jpg

    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:
    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:
    - Open Source
    - Payload.bin support (ROM flashing works)
    - Proper MTP support (for both 4.9 and 3.18 kernels)
    - Working decryption for both FBE and FDE
    - Adoptable Storage is working
    - Android 11 support (No bootloops to recovery mode)
    - NTFS, F2FS, exFAT, FAT32 support for SD Cards and USB drives
    - Ability to flash splash images directly to the splash partition
    - Adjusted theme to account for the notch (the clock doesn't overlap with the notch)
    - No TWRP app installation prompts
    - Older 3.4.0 button-style reboot menu instead of the newer listbox-style one
    - Addon.d script to make TWRP survive ROM updates

    Download:
    TWRP image: https://drive.google.com/file/d/19ysSbW31NG4QF5OClbox-mArIb17KbpT/view?usp=sharing
    TWRP Installer: https://drive.google.com/file/d/1-wk_0kOe_e-2XDDiv08BxJhn1ixWXjUw/view?usp=sharing

    Installation Instructions:
    - Make sure your bootloader is unlocked. If not, unlock it first.
    - Reboot to Bootloader (aka Fastboot mode)
    - Execute:
    Code:
    fastboot boot twrp-3.5.2_9-2-daisy-unofficial.img
    - Flash the TWRP Installer zip to keep TWRP permanently

    Notes:
    - You can ignore any "Failed to unmount /vendor: Device or resource busy" errors since they do not cause any issues (this
    happens when switching the active slot while the vendor partition is mounted).
    - This TWRP does not have the newer 3.5.0 theme changes in the reboot menu because it is confusing for a significant amount
    of users and does not match the rest of the button-style design.
    - The TWRP app checks and prompts have been completely removed due to the app causing a lot of issues including bootloops
    since it is not designed for A/B devices.
    - The portrait_hdpi theme has been adjusted to have more padding in the status bar and to account for the presence of the
    notch (the clock's position has been modified in order for the clock not to get overlapped by the notch)
    - TWRP's addon.d will only work in the following scenarios:
    a) When updating your ROM through the ROM's Updater application
    b) When dirty-flashing a newer build of the same ROM you have installed from recovery
    - TWRP's addon.d (TWRP survival) may not work in all ROMs as some ROMs choose not to have permissive update-engine domain. This essentially results in SELinux denials, preventing the addon.d script from executing when SELinux is enforcing. You can read more about the said issue here (https://github.com/topjohnwu/Magisk/commit/cba0d040000d6ff38c6646bb9d7daa12beae2878). Thereby, having Magisk is the only way of having a working addon.d environment consistent to all ROMs as of now since it makes ROMs allow all addon.d scripts to run (makes update-engine permissive). Having said that and as mentioned in the previous link, some ROMs like LineageOS and CrDroid do not need Magisk for addon.d scripts to work, as they don't block said scripts by default.

    Source code:
    Recovery Source: https://github.com/LinkBoi00/android_bootable_recovery
    Device tree: https://github.com/LinkBoi00/twrp_device_xiaomi_daisy
    Kernel source: https://github.com/LinkBoi00/twrp_kernel_xiaomi_daisy

    XDA:DevDB Information
    TWRP-3.5.2_9-2-Unofficial, Tool/Utility for the Xiaomi Mi A2 Lite

    Contributors
    LinkBoi
    Source Code: https://github.com/LinkBoi00/twrp_device_xiaomi_daisy


    Version Information
    Status:
    Stable
    Current Stable Version: 3.5.2_9-2
    Stable Release Date: 2021-05-04

    Created 2020-10-19
    Last Updated 2021-05-04
    7
    TWRP 3.5.0_9-1 Recovery Update

    Download:
    TWRP image: https://drive.google.com/file/d/1Pi4m8XLAMu_RUhKaaHuggkfiY6QQB6-Q/view?usp=sharing
    TWRP Installer: https://drive.google.com/file/d/18tIyVJ6I4ReqllI29wrhnvJ7B-k3IDgE/view?usp=sharing

    Changelog (from 3.4.0-3):
    - Merge all TWRP 3.5.0_9 source changes (https://twrp.me/site/update/2020/12/31/twrp-3.5.0-released.html)
    - Fixed Decryption for both FBE and FDE
    - Fixed Adoptable Storage issues
    - Fixed recovery bootloops with Android 11 ROMs
    - Backup persist as image instead of as a filesystem
    - Updated the recovery installer
    - Added support for F2FS
    - Updated kernel, for the bootable image, to 4.9.250
    - Set maximum and default brightness to 101 and 85 respectively
    - Include logcat for debugging
    - Changed the system mount point from /system_root to /system
    - Updated MTP configuration from @TogoFire
    - General system stability improvements to enhance the user experience

    More info:
    - This TWRP does not have the newer 3.5.0 theme changes in the reboot menu because it is confusing for a significant amount
    of users and does not match the rest of the button-style design.

    Sources:
    - Recovery source: https://github.com/LinkBoi00/android_bootable_recovery
    - Recovery device tree: https://github.com/LinkBoi00/twrp_device_xiaomi_daisy
    - Recovery kernel Source: https://github.com/LinkBoi00/twrp_kernel_xiaomi_daisy

    At 11:35 PM UTC of 01/01/2021 the files were updated to fix the logat function. If you updated TWRP before that, you can continue using it. The download links have been updated both in this post and In the OP
    5
    Status update:

    For anyone wondering, TWRP 3.5.2 is coming soon. Highlights of said update include:
    - a text editor (nano to be precise)
    - Digest verification fixes
    - Terminal and File Browser improvements
    - Lang / Translation updates
    and more.

    Having said that, a TWRP addon.d setup is being worked on, that will remove the need to reflash TWRP after flashing ROM or an OTA through a ROM updater. Last but not least, the EDL reboot button may be added back, assuming it works without any issues.
    3
    Team Win Recovery Project 3.5.2_9-2 Update

    Download:

    TWRP image: https://drive.google.com/file/d/19ysSbW31NG4QF5OClbox-mArIb17KbpT/view?usp=sharing
    TWRP Installer: https://drive.google.com/file/d/1-wk_0kOe_e-2XDDiv08BxJhn1ixWXjUw/view?usp=sharing

    Changelog (from 3.5.0-1):
    - Synced with all TWRP 3.5.2_9 source changes (https://twrp.me/site/update/2021/04/07/twrp-3.5.2-released.html)
    - Added addon.d script to make TWRP persist through OTA updates and dirty flashes of the same ROM
    - Removed the ability to flash TWRP through the Magisk app (Magisk Manager), as it was causing issues
    - Bump device version to 2
    - Set ro.treble.enabled to true since daisy supports treble
    - fstab: Add removable flag to vendor
    - General system stability improvements to enhance the user experience
    2
    Is anything wrong with official daisy TWRP build? Why go with unofficial? Couldn't tell from description...
    Bugs in official:
    - Update_engine_sideload (Flashing Custom ROMs in TWRP is broken)
    - Mtp
    - Compatibility with 4.9 kernels
    - SD card being broken (someone reported)
    - Decryption
    - Changing slots while vendor is mounted reboots the device
    - fix recovery bootloop from the advanced menu is broken
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone