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

mauronofrio

Recognized Developer
Jun 29, 2012
4,359
13,515
263
24
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,129
569
143
24
Thanjavur
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,129
569
143
24
Thanjavur
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
 

Sapper Morton

Senior Member
Feb 16, 2016
371
415
103
Give the detailed step-by-step instructions for flashing twrp with usb drivers and adb fastboot files
You should read what OP wrote, since A/B scheme doesn't have a recovery partition, you will have to boot the TWRP, and then flash the TWRP installer, as OP said, you should follow the same steps you would do rooting using Magisk, as the thread below already explained:

https://forum.xda-developers.com/mi-a3/how-to/guide-how-to-root-mi-a3-magisk-t3958509

Read both guides and you will understand how to boot into TWRP, then flashing, while preserving Magisk Root.

BTW, don't quote the original post guys, by doing so, you're flooding the thread.
 
Last edited:

Typhus_

Senior Member
Jan 9, 2013
893
912
138
41
Lisbon
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: