[RECOVERY][3.3.1-17][laurel_sprout]Unofficial TWRP recovery for Xiaomi Mi A3 (Test)

Search This thread

mauronofrio

Recognized Developer
Jun 29, 2012
4,359
13,750
25
Castellana Grotte
toolaio.tk
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:
- TWRP boots
- TWRP seems has problems with external sdcard and otg
- Magisk Flash works

Install guide :
Remember to use the appropriate .img version
https://forum.xda-developers.com/showpost.php?p=80168528&postcount=16

Other Install guide :
1. Follow this guide to root your device
2. Flash the TWRP installer like a magisk module
3. Flashing the TWRP installer you will lose the root, so you will need to flash magisk again from magisk manager before reboot the device or you can reboot the device and flash magisk in twrp


HOW TO UPDATE a ROM and KEEP TWRP and ROOT:
Before all Disable all magisk modules for boths methods

- Put rom.zip, twrp installer.zip and magisk.zip on your internal storage;
- Flash Rom;
- Flash TWRP Installer;
- Flash magisk;
- Reboot.

If you want you can also update a stock rom from phone settings with local upgrade:
- Update the Rom WITHOUT REBOOT;
- Open Magisk Manager;
- Menu/modules/+ button/select the twrp installer.zip and flash it;
- Always in Magisk Manager, click on Install/Install/Direct Install;
- Again in Magisk Manager, click on Install/Install/Inactive Slot;
- Reboot.


Tips:
If you alread have a twrp flashed you can only flash the new installer zip or the new installation method to update your TWRP (remember to flash again magisk or your system will not boot).
If you have some problems with backup, like 255 error or something similar please check this guide: https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
For the Bacups use always "system_image" and "vendor_image" instead of "system" and "vendor".

Download:
TWRP 3.3.1-17 Unofficial by mauronofrio (Guide included in the link)


Source code:
https://github.com/mauronofrio/android_bootable_recovery
https://github.com/mauronofrio/android_device_xiaomi_laurel_sprout
Precompiled Stock Kernel

Donations:



Credits:

Thanks to Jyotiraditya Panda for the help with the tree
Thanks to @mdeejay for the hard testing

Created 2019-08-31
 
Last edited:

Rajendran Rasa

Senior Member
Oct 17, 2015
1,165
591
26
Thanjavur
Xiaomi Mi A3
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.



Features:
- TWRP boots
- TWRP seems has problems with external sdcard and otg
- Magisk Flash works



Install guide :
1. Follow this guide to root your device
2. Flash the TWRP installer like a magisk module
3. Flashing the TWRP installer you will lose the root, so you will need to flash magisk again from magisk manager before reboot the device or you can reboot the device and flash magisk in twrp


HOW TO UPDATE a ROM and KEEP TWRP and ROOT:
Before all Disable all magisk modules for boths methods

- Put rom.zip, twrp installer.zip and magisk.zip on your internal storage;
- Flash Rom;
- Flash TWRP Installer;
- Flash magisk;
- Reboot.

If you want you can also update a stock rom from phone settings with local upgrade:
- Update the Rom WITHOUT REBOOT;
- Open Magisk Manager;
- Menu/modules/+ button/select the twrp installer.zip and flash it;
- Always in Magisk Manager, click on Install/Install/Direct Install;
- Again in Magisk Manager, click on Install/Install/Inactive Slot;
- Reboot.


Tips:
If you alread have a twrp flashed you can only flash the new installer zip or the new installation method to update your TWRP (remember to flash again magisk or your system will not boot).
If you have some problems with backup, like 255 error or something similar please check this guide: https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
For the Bacups use always "system_image" and "vendor_image" instead of "system" and "vendor".

Download:
TWRP 3.3.1-15 Unofficial by mauronofrio
TWRP 3.3.1-15 Unofficial Installer by mauronofrio


Source code:
https://github.com/omnirom/android_bootable_recovery
https://github.com/mauronofrio/android_device_xiaomi_laurel_sprout
Precompiled Stock Kernel

Donations:



Credits:


Created 2019-08-31
Screenshots please
 

Rajendran Rasa

Senior Member
Oct 17, 2015
1,165
591
26
Thanjavur
Xiaomi Mi A3
Recovery partition doesn't exist, so you can't flash it. The installation guide is explained in the first post
That's not a guide
Explain with step 1,2,3
I have downloaded both the files given in op
Then how to flash twrp?? In fastboot
after flashing twrp do I need anything to flash for booting stock ROM

---------- Post added at 04:12 PM ---------- Previous post was at 04:07 PM ----------

Give the detailed step-by-step instructions for flashing twrp with usb drivers and adb fastboot files
 

Typhus_

Senior Member
Install method explained

Hello!

Since the install steps provided on OP maybe confusing I thought on sharing here the steps I've made in order to get TWRP working....let's call it a "noob friendly guide", ok?

Here he we go:

0 - Your bootloader must be unlocked. If it's not, then follow step 1 of the instructions provided HERE.
1 - Download both twrp-3.3.1-15-laurel_sprout-mauronofrio.img and twrp-3.3.1-15-laurel_sprout-mauronofrio-installer.zip files present on OP
2 - Download latest Magisk Installer, Magisk Uninstaller and Magisk Manager from HERE.
3 - Copy all of the above to your phone internal memory (since current TWRP doesn't allow sdcard nor USB OTG yet...)
4 - Connect the phone to your PC
5 - Reboot to bootloader
Code:
adb reboot bootloader
6 - Check your current active slot
Code:
fastboot getvar current-slot
7 - Flash TWRP image into the current inactive slot (we do this just to leave the current active slot with no changes...at least for now)
If your current active is slot b, then run:
Code:
fastboot --set-active=a
Or, if your current active is slot a, then run:
Code:
fastboot --set-active=b
And afterwards, run:
Code:
fastboot flash boot twrp-3.3.1-15-laurel_sprout-mauronofrio.img
(of course that img file must be on the same path where you have adb and fastboot...)​
8 - Reboot to TWRP:
Code:
fastboot reboot
NOTE: Long press Vol+ button before hitting "ENTER" and leave it pressed until you see the Android One logo (just to force boot into recovery)​

Just a heads up:
Now we are on TWRP booted on the "previously inactive slot". The "previously active slot" continues unchanged. Nothing "bad" really happened until what we decide to do next. If we want, we can just make a TWRP backup of the current slot and nothing else. Afterwards, we could always reboot to bootloader, change to the "previously active slot" again and boot system. If we do this, we continue without TWRP and root but we would now have a TWRP backup of the system present on the "inactive slot". Anyway let's presume you really want to permanently install TWRP and ROOT your device....so let's continue.

9 - While on TWRP, install twrp-3.3.1-15-laurel_sprout-mauronofrio-installer.zip
Note that, by doing this, TWRP will be permanently installed into both slots. This means that, if someday, you want to revert to stock, you'll need to reflash stock boot.img on, at least, one of your slots.​
10 - After installing TWRP zip, go to reboot menu, change to the active slot (the one you had on the beginning of these steps) and reboot to TWRP
11 - After TWRP reboots, install Magisk installer zip
12 - Finally, reboot to system
13 - Enjoy

Thank you @mauronofrio and Jyotiraditya Panda for your work on bringing TWRP to Mi A3 (laurel_sprout).

I just hope you're able to fix USB OTG and SDCard bugs and, of course, make this TWRP official.

Cheers!
 
Last edited:

Typhus_

Senior Member
Uninstall method explained (aka revert to stock)

  1. Get boot.img, system.img and vendor.img from your stock ROM build type (EU or Global) and store them on the same folder you have adb and fastboot
  2. Uninstall all Magisk Modules you have installed (do the same for Substratum themes, if any)
  3. Reboot to TWRP
  4. While on TWRP, Flash Magisk Uninstaller Zip
  5. Reboot to bootloader
  6. Code:
    fastboot getvar current-slot
    (just to make sure which slot is currently active)
  7. Code:
    fastboot flash boot boot.img
    (from your stock ROM build type)
  8. Code:
    fastboot set_active [B]b[/B]
    (or a, if you were on slot b)
  9. Code:
    fastboot erase boot
  10. Code:
    fastboot erase system
  11. Code:
    fastboot erase vendor
  12. Code:
    fastboot flash vendor vendor.img
    (from your stock ROM build type)
  13. Code:
    fastboot flash system system.img
    (from your stock ROM build type)
  14. Code:
    fastboot flash boot boot.img
    (from your stock ROM build type)
  15. Code:
    fastboot reboot

By doing this your phone will now boot to the previously inactive slot, where an older system build is installed, with all your userdata preserved.

Now you just have to wait for the OTA to arrive and install it in order to have the latest stock Rom build installed without TWRP and Magisk.

NOTE:


This procedure is also intended for everyone that want to install latest stock OTA without losing userdata. The Magisk OTA Installation Tutorial could fail if you tampered with system or vendor partitions, that's why I've decided to share this procedure
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    Install method explained

    Hello!

    Since the install steps provided on OP maybe confusing I thought on sharing here the steps I've made in order to get TWRP working....let's call it a "noob friendly guide", ok?

    Here he we go:

    0 - Your bootloader must be unlocked. If it's not, then follow step 1 of the instructions provided HERE.
    1 - Download both twrp-3.3.1-15-laurel_sprout-mauronofrio.img and twrp-3.3.1-15-laurel_sprout-mauronofrio-installer.zip files present on OP
    2 - Download latest Magisk Installer, Magisk Uninstaller and Magisk Manager from HERE.
    3 - Copy all of the above to your phone internal memory (since current TWRP doesn't allow sdcard nor USB OTG yet...)
    4 - Connect the phone to your PC
    5 - Reboot to bootloader
    Code:
    adb reboot bootloader
    6 - Check your current active slot
    Code:
    fastboot getvar current-slot
    7 - Flash TWRP image into the current inactive slot (we do this just to leave the current active slot with no changes...at least for now)
    If your current active is slot b, then run:
    Code:
    fastboot --set-active=a
    Or, if your current active is slot a, then run:
    Code:
    fastboot --set-active=b
    And afterwards, run:
    Code:
    fastboot flash boot twrp-3.3.1-15-laurel_sprout-mauronofrio.img
    (of course that img file must be on the same path where you have adb and fastboot...)​
    8 - Reboot to TWRP:
    Code:
    fastboot reboot
    NOTE: Long press Vol+ button before hitting "ENTER" and leave it pressed until you see the Android One logo (just to force boot into recovery)​

    Just a heads up:
    Now we are on TWRP booted on the "previously inactive slot". The "previously active slot" continues unchanged. Nothing "bad" really happened until what we decide to do next. If we want, we can just make a TWRP backup of the current slot and nothing else. Afterwards, we could always reboot to bootloader, change to the "previously active slot" again and boot system. If we do this, we continue without TWRP and root but we would now have a TWRP backup of the system present on the "inactive slot". Anyway let's presume you really want to permanently install TWRP and ROOT your device....so let's continue.

    9 - While on TWRP, install twrp-3.3.1-15-laurel_sprout-mauronofrio-installer.zip
    Note that, by doing this, TWRP will be permanently installed into both slots. This means that, if someday, you want to revert to stock, you'll need to reflash stock boot.img on, at least, one of your slots.​
    10 - After installing TWRP zip, go to reboot menu, change to the active slot (the one you had on the beginning of these steps) and reboot to TWRP
    11 - After TWRP reboots, install Magisk installer zip
    12 - Finally, reboot to system
    13 - Enjoy

    Thank you @mauronofrio and Jyotiraditya Panda for your work on bringing TWRP to Mi A3 (laurel_sprout).

    I just hope you're able to fix USB OTG and SDCard bugs and, of course, make this TWRP official.

    Cheers!
    19
    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:
    - TWRP boots
    - TWRP seems has problems with external sdcard and otg
    - Magisk Flash works

    Install guide :
    Remember to use the appropriate .img version
    https://forum.xda-developers.com/showpost.php?p=80168528&postcount=16

    Other Install guide :
    1. Follow this guide to root your device
    2. Flash the TWRP installer like a magisk module
    3. Flashing the TWRP installer you will lose the root, so you will need to flash magisk again from magisk manager before reboot the device or you can reboot the device and flash magisk in twrp


    HOW TO UPDATE a ROM and KEEP TWRP and ROOT:
    Before all Disable all magisk modules for boths methods

    - Put rom.zip, twrp installer.zip and magisk.zip on your internal storage;
    - Flash Rom;
    - Flash TWRP Installer;
    - Flash magisk;
    - Reboot.

    If you want you can also update a stock rom from phone settings with local upgrade:
    - Update the Rom WITHOUT REBOOT;
    - Open Magisk Manager;
    - Menu/modules/+ button/select the twrp installer.zip and flash it;
    - Always in Magisk Manager, click on Install/Install/Direct Install;
    - Again in Magisk Manager, click on Install/Install/Inactive Slot;
    - Reboot.


    Tips:
    If you alread have a twrp flashed you can only flash the new installer zip or the new installation method to update your TWRP (remember to flash again magisk or your system will not boot).
    If you have some problems with backup, like 255 error or something similar please check this guide: https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
    For the Bacups use always "system_image" and "vendor_image" instead of "system" and "vendor".

    Download:
    TWRP 3.3.1-17 Unofficial by mauronofrio (Guide included in the link)


    Source code:
    https://github.com/mauronofrio/android_bootable_recovery
    https://github.com/mauronofrio/android_device_xiaomi_laurel_sprout
    Precompiled Stock Kernel

    Donations:



    Credits:

    Thanks to Jyotiraditya Panda for the help with the tree
    Thanks to @mdeejay for the hard testing

    Created 2019-08-31
    13
    So i decided to help @Nik001 to make a better TWRP and support this device in the better way, because i'm unable to follow also this device. His TWRP actualy is really stable and soon will be official.

    This is the new thread to follow: https://forum.xda-developers.com/mi-a3/development/recovery-unoffical-twrp-xiaomi-mi-a3-t3987759

    Moderator please close this thread
    11
    I decided to open again this thread and i decided to update the TWRP for android Q compatibility. I update the first post with a guide and a really similar guide can be found at the download link.

    TWRP 3.3.1-17 Unofficial by mauronofrio (Guide included in the link)
    5
    Hello friends,

    I've removed some posts with rude language and off topic discussion.
    Please keep in mind to discuss on topic and without offending others:)

    I recommend to read the FORUM RULES especially those:


    2.3 Flaming / Lack of respect: XDA is about sharing and this does not involve virtual yelling (flaming) or rudeness. Flaming or posting with a lack of respect is unacceptable. Treat new members in the manner in which you would like to have been treated when you were a new member. When dealing with any member, provide them with guidance, advice and instructions when you can, showing them respect and courtesy. Never post in a demanding, argumentative, disrespectful or self-righteous manner.

    2.4 Personal attacks, racial, political and / or religious discussions: XDA is a discussion forum about certain mobile phones. Mobile phones are not racial, political, religious or personally offensive and therefore, none of these types of discussions are permitted on XDA.




    Regards!

    strongst
    Forum Moderator