[RECOVERY][STABLE]Unoffical TWRP for Xiaomi Mi A3[laurel_sprout]

Search This thread

garylawwd

Forum Moderator
Staff member
Dear Typhus,

I am a noob to xda and this is my first post, but have been using custom ROMs for the past 3 years. Using the recovery partition was fairly easy, but A/B is driving me nuts.

I have tried to follow these instructions to the T, unfortunately my MiA3 is refusing to behave. I have the latest platform tools, but I am simply unable to change my partition to b. getvar current-slot works and tells me I am on partition 'a'.

I have tried various combination of fastboot commands such as:

fastboot set_active=b
fastboot set_active b
fastboot -ab
fastboot --set-active=b (when I use double hyphens, the text grays out in PowerShell)

I almost always get this error, and the commands list pops up.

usage: fastboot [ <option> ] <command>

(or) in case of the last command I get this error "unknown option -- set_active=b"

I also tried the method of erasing the boot partition and flashing twrp to the boot partition. I am unable to boot into recovery. I press Vol + and then execute 'fastboot reboot', but it always boots back into fastboot mode after the android One logo. Am I supposed to wait till the Android One logo flashes, before I execute the command in PowerShell? I waited for up to 20 seconds and nothing happened.

I don't know what I am doing wrong. I have been trying to get this to work for the last four hours and am really sleepy - hope I have not missed something elementary in the process. Let me know if you need screenshots (I can't find an attachment button to upload files from my PC, do I have to host the images somewhere to be able to post it? - sorry I have never used XDA before)

Try putting .\ before like this

Code:
.\fastboot --set-active=b

And if that's not it make sure you typed it correctly it's

Code:
fastboot --set-active=b

And NOT

Code:
fastboot --set_active=b
 
Last edited:
  • Like
Reactions: whirlwind.bonobo

Sami Devo

Senior Member
May 30, 2015
197
15
Dhaka
Xiaomi Mi A3
Dear Typhus,

I am a noob to xda and this is my first post, but have been using custom ROMs for the past 3 years. Using the recovery partition was fairly easy, but A/B is driving me nuts.

I have tried to follow these instructions to the T, unfortunately my MiA3 is refusing to behave. I have the latest platform tools, but I am simply unable to change my partition to b. getvar current-slot works and tells me I am on partition 'a'.

I have tried various combination of fastboot commands such as:

fastboot set_active=b
fastboot set_active b
fastboot -ab
fastboot --set-active=b (when I use double hyphens, the text grays out in PowerShell)

I almost always get this error, and the commands list pops up.

usage: fastboot [ <option> ] <command>

(or) in case of the last command I get this error "unknown option -- set_active=b"

I also tried the method of erasing the boot partition and flashing twrp to the boot partition. I am unable to boot into recovery. I press Vol + and then execute 'fastboot reboot', but it always boots back into fastboot mode after the android One logo. Am I supposed to wait till the Android One logo flashes, before I execute the command in PowerShell? I waited for up to 20 seconds and nothing happened.

I don't know what I am doing wrong. I have been trying to get this to work for the last four hours and am really sleepy - hope I have not missed something elementary in the process. Let me know if you need screenshots (I can't find an attachment button to upload files from my PC, do I have to host the images somewhere to be able to post it? - sorry I have never used XDA before)
Its because u r using old platform tools.. use version 30... And check install all drivers.
 

whirlwind.bonobo

New member
Mar 9, 2014
4
0
Booting into twrp after flashing - Vol up?

Thank you!! ".\fastboot --set-active=b" worked for me!!

Hi- I have managed to flash twrp into partition b now, but I am still unable to boot into recovery. Before executing fastboot reboot, I pressed the vol up key for around 30 seconds, but the android one logo did not appear. After that I tried rebooting and then immediately pressing volume up key, it still did not boot into twrp and instead went into fastboot. Then i tried just pressing the vol up key for ten seconds and then tried to reboot (while pressing the vol up key), it still just reverted to fastboot and did not boot into twrp. Am i doing something wrong? Screenshots for my commands are posted with various permutations and combinations that I have tried. I am using official twrp 3.4.0
screenshot-237.png
screenshot-238.png
 
Last edited:

garylawwd

Forum Moderator
Staff member
Hi- I have managed to flash twrp into partition b now, but I am still unable to boot into recovery. Before executing fastboot reboot, I pressed the vol up key for around 30 seconds, but the android one logo did not appear. After that I tried rebooting and then immediately pressing volume up key, it still did not boot into twrp and instead went into fastboot. Then i tried just pressing the vol up key for ten seconds and then tried to reboot (while pressing the vol up key), it still just reverted to fastboot and did not boot into twrp. Am i doing something wrong? Screenshots for my commands are posted with various permutations and combinations that I have tried. I am using official twrp 3.4.0
Because you flashed twrp to slot a and then tried to reboot slot b.
Just flash the boot.img and the very next command is fastboot reboot and hold vol up.
Don't flash twrp to slot b and then switch back to slot a. Boot twrp from whatever slot you flashed it on
 

whirlwind.bonobo

New member
Mar 9, 2014
4
0
Because you flashed twrp to slot a and then tried to reboot slot b.
Just flash the boot.img and the very next command is fastboot reboot and hold vol up.
Don't flash twrp to slot b and then switch back to slot a. Boot twrp from whatever slot you flashed it on

Thank you for your response.

Yes- I tried that. If you see the screenshots - every time I have tried fastboot reboot I have tried to restart with the vol button help up. I tried with both partition a using 'fastboot flash boot twrp.img' as well as './fastboot flash boot twrp.img'. In both cases it is rebooting to fastboot.

I think I am not understanding the precise sequence of key pressing. Should I press vol button immediately after executing reboot, before executing reboot? or simultaneously? Also how long should I keep vol button + pressed?

Also is there any other combination of keys that I can shut down directly from fastboot and then try to boot into recovery? I googled, but I could not find any solution - I have tried vol down + power to shut down, but it doesn't work, it just restarts and goes back to fastboot mode.
 

garylawwd

Forum Moderator
Staff member
Thank you for your response.

Yes- I tried that. If you see the screenshots - every time I have tried fastboot reboot I have tried to restart with the vol button help up. I tried with both partition a using 'fastboot flash boot twrp.img' as well as './fastboot flash boot twrp.img'. In both cases it is rebooting to fastboot.

I think I am not understanding the precise sequence of key pressing. Should I press vol button immediately after executing reboot, before executing reboot? or simultaneously? Also how long should I keep vol button + pressed?

Also is there any other combination of keys that I can shut down directly from fastboot and then try to boot into recovery? I googled, but I could not find any solution - I have tried vol down + power to shut down, but it doesn't work, it just restarts and goes back to fastboot mode.
Press vol up as you enter the command and don't let it go untill you see twrp.
If you are on Android 10 make sure the twrp.img is for Android 10. Same goes for Android 9 it has its own twrp.
 
Jan 2, 2015
5
0
Thrissur
Unable to force boot to recovery after flashing TWRP

@Typhus_ and @Nik001 : SO, I downloaded the latest Official TWRP from website and followed your instructions exactly as you have mentioned. However, after flashing the TWRP to slot b and then forcing reboot to recovery, my phone jumps back to fastboot :( Please help me asap as I don't have any other phone as of now and really need to fix this.
 

batata004

Senior Member
Dec 14, 2017
187
25
@Typhus_ and @Nik001 : SO, I downloaded the latest Official TWRP from website and followed your instructions exactly as you have mentioned. However, after flashing the TWRP to slot b and then forcing reboot to recovery, my phone jumps back to fastboot :( Please help me asap as I don't have any other phone as of now and really need to fix this.

I am having this same exactly problem. This TWRP for MI A3 is ****! PIECE OF ****! Tried everything, all possible commands and no luck. Complete waste of time. Incredibly, using skyhawk recovery everything works fine. Someone should delete this thread cause many people will waste their time flashing this TWRP in MI A3 and it's impossible to boot to recovery, everytime it boots to fastboot.

Terrible thread, this should be deleted.

Just so you know, I have pixel experience (android 10) on my phone and I messed up something. Than I executed tons of commands combination on fastboot (changing slots, not changing slots, flashing boot stock.img, not flashing boot stock, then after that flashing twrp.img...). Every single time I reboot, it comes back to fastboot (I am holding the volume up button, I am not doing anything stupid because the same exactly thing works perfectly with skyhawk).
 
Last edited:

garylawwd

Forum Moderator
Staff member
I am having this same exactly problem. This TWRP for MI A3 is ****! PIECE OF ****! Tried everything, all possible commands and no luck. Complete waste of time. Incredibly, using skyhawk recovery everything works fine. Someone should delete this thread cause many people will waste their time flashing this TWRP in MI A3 and it's impossible to boot to recovery, everytime it boots to fastboot.

Terrible thread, this should be deleted.

Just so you know, I have pixel experience (android 10) on my phone and I messed up something. Than I executed tons of commands combination on fastboot (changing slots, not changing slots, flashing boot stock.img, not flashing boot stock, then after that flashing twrp.img...). Every single time I reboot, it comes back to fastboot (I am holding the volume up button, I am not doing anything stupid because the same exactly thing works perfectly with skyhawk).
Because this twrp is built with android 9 kernel and won't boot on Android 10. Mentioned numerous times in the thread also. You have to be on Android 9 for this recovery.
 

batata004

Senior Member
Dec 14, 2017
187
25
Because this twrp is built with android 9 kernel and won't boot on Android 10. Mentioned numerous times in the thread also. You have to be on Android 9 for this recovery.

I never saw anyone mention that TWRP does not work on XIAOMI MI A3 with Android 10. Also, in the official page at https://twrp.me/xiaomi/xiaomimia3.html it does not say ANYTHING that TWRP would only work on Android 9. This makes lots of people waste time trying to use TWRP, following tons of different tutorials online... just to discover at the end that TWRP does not work on ANDROID 10 and there is absolutely no warning in the official download page of TWRP specific for xiaomi mi a3? I cant believe this is right.

Also at https://forum.xda-developers.com/mi-a3/development/recovery-twrp-3-4-0-0-patched-boot-img-t4123287 there are download links to ANDROID 10 VERSION and none of them work!

So what is the truth?
 
Last edited:

yusuf_um

Member
Jun 9, 2015
5
0
Hello. I will take a backup. The "system" partition does not appear in the backup section. I've tried several different twrp versions. ( 3.3.1-2, 3.3.1-17, 3.4.0-0 )
Would you help me for a solution?
photo_2020-12-16_22-11-22.jpg
 
Last edited:

the_21_son

New member
Dec 6, 2020
4
1
Proper install method explained

Hello!

Please, @Nik001, update the OP with the install method that I'm going to describe next, ok?

It's just to avoid future complications (lost of Wi-Fi, sound, etc...) for "not that experienced users".

  1. Your bootloader must be unlocked. If it's not, then follow step 1 of the instructions provided HERE.
  2. Download TWRP zip file and copy it to your device (internal or external storage)
  3. Download TWRP img file and and store it, on the folder where you have adb and fastboot files, on your PC
  4. Open a cmd line and execute these commands (being on that folder, of course):
    adb devices (to make sure your device is detected)
    adb reboot bootloader (to reboot into fastboot mode)
    fastboot getvar current-slot (to check what's your current active slot)
    fastboot set_active b (if your active slot was a, if it was b then change it to a)
    fastboot erase boot
    fastboot flash boot twrp-3.3.1-2-unofficial-laurel_sprout.img
    fastboot reboot (NOTE : Before hitting "Enter", long press Vol + on your device until you see the Android One logo. By doing this your device will be forced to boot into Recovery and not into System)
  5. When TWRP recovery boots, if you have a stock boot.img that matches the build on this "currently active" slot, flash it into boot partition. If you don't have, then just ignore this step...(it's not mandatory)
  6. Install the TWRP zip (always install the latest build available)
  7. Change slot to the one that was active on the beginning of these steps and reboot to Recovery (just to make sure that the slot, in fact, was changed)
  8. Reboot to System

Why do I suggest this?


By doing this method (which seems more complicated but, trust me, it's how it should be done) we will flash TWRP img into the "inactive" slot, thus, not breaking anything on the "currently active" slot. When TWRP boots, it will patch both slots boot ramdisks. But the thing is, on the "currently active" slot (the one inactive on the beginning) it will patch the TWRP img but, on the "currently inactive" slot (the one that was active on the beginning), it will patch the stock boot.img, thus, no bug will happen that usually appears when a user accidentally flashes the wrong boot.img into boot partition.

On the other hand, if we have a stock boot.img, that matches the build on the "inactive" slot, we could flash it into boot partition before installing the zip that patches ramdisk. By doing this we will patch both stock boot.img present on both slots (instead of patching TWRP img and boot.img).


Cheers!

Hi Typhus_ ...I'm getting stuck at "fastboot reboot", I follow the commands all the way to "fastboot flash boot twrp.img" properly, but when trying to reboot into TWRP recovery it just keeps going back to the fastboot screen. What am I not doing properly? It seems like TWRP just isn't installing.

Many thanks in advance!
 

@kitokit

Senior Member
Mar 15, 2017
359
68
Hi Typhus_ ...I'm getting stuck at "fastboot reboot", I follow the commands all the way to "fastboot flash boot twrp.img" properly, but when trying to reboot into TWRP recovery it just keeps going back to the fastboot screen. What am I not doing properly? It seems like TWRP just isn't installing.

Many thanks in advance!
i tried this files when i was stuck at fastboot. im on stock andriod 10. you can try this files..

try this image "twrp-3.4.0-0-laurel_sprout_Android_10.img.zip", just remov'e the zip extension no need to extract.... and after that boot into twrp and flash the installer zip "twrp-3.3.1-17-laurel_sprout-Installer-mauronofrio.zip"
 

Attachments

  • twrp-3.3.1-17-laurel_sprout-Installer-mauronofrio.zip
    17.5 MB · Views: 58
  • twrp-3.4.0-0-laurel_sprout_Android_10.img.zip
    64 MB · Views: 69
Last edited:
Jan 14, 2021
7
0
Hi, I have some problems likes yours.

My MI A3 bootloop on fastboot. And I want to install TWRP without success.

How I can copy the zip file on phone. My phone is not by adb, with fastbook is ok.

Thanks for your responses
 
Jan 14, 2021
7
0
You can use OTG I think

How I can do this ?

Because when the phone is plugged on my laptop I can't transfert data, the phone is not accessible.

This is all my pb :

Hi, I have bricked my girlfriend's phone after an attempt to replace Android 10 to MIUI 12 Laurel Sprout.

- I have already unlock it with fastboot.
- I test to install TWRP Laurel Sprout with official version but after this the phone bootloop on fastboot without succes.

Now when I test to reinstall TWRP I have this error :

Capture.PNG


I'm without solution to install TWRP or another recovery, after this I think it will be good.

Do you have some ideas ?

Thanks for you help and sorry for my english.
 
Sep 13, 2010
41
8
How I can do this ?

Because when the phone is plugged on my laptop I can't transfert data, the phone is not accessible.

This is all my pb :

Hi, I have bricked my girlfriend's phone after an attempt to replace Android 10 to MIUI 12 Laurel Sprout.

- I have already unlock it with fastboot.
- I test to install TWRP Laurel Sprout with official version but after this the phone bootloop on fastboot without succes.

Now when I test to reinstall TWRP I have this error :

View attachment 5187755

I'm without solution to install TWRP or another recovery, after this I think it will be good.

Do you have some ideas ?

Thanks for you help and sorry for my english.
I think command is wrong, should be "fastboot flash boot ........." instead of "fastboot boot......".
 

Typhus_

Senior Member
I think command is wrong, should be "fastboot flash boot ........." instead of "fastboot boot......".

Yes. On Mi A3 fastboot boot doesn't work. We really need to flash it into the partition instead of trying to boot it directly. That's why it is always recommended to switch to the inactive slot in order to boot into twrp.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 45
    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.
     *
     */

    Whats Working?
    Everything is working
    Can change Slot A/Slot B on twrp
    SDcard and OTG working
    Decryption of Data working
    Flashing of roms work pie and even Q roms work.

    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 or sdcard;
    - Flash Rom;
    - Flash TWRP Installer;
    - Flash magisk(recommend to use Magisk v19.4);
    - Reboot.

    Download:
    TWRP 3.3.1-2 Unofficial Installer by Nikesh Kataria
    TWRP 3.3.1-2 Unofficial by Nikesh Kataria

    Donations:



    Credits:

    Thanks to @mauronofrio for a great help to make a stable recovery
    Thanks to @Typhus_ for hardcore testing
    Thanks to @prakash78 for testing

    Contributors
    Nik001
    Source Code: https://github.com/Nikesh001/android_device_xiaomi_laurel_sprout-twrp

    Version Information
    Status: Stable

    Created 2019-10-21
    31
    Proper install method explained

    Hello!

    Please, @Nik001, update the OP with the install method that I'm going to describe next, ok?

    It's just to avoid future complications (lost of Wi-Fi, sound, etc...) for "not that experienced users".

    1. Your bootloader must be unlocked. If it's not, then follow step 1 of the instructions provided HERE.
    2. Download TWRP zip file and copy it to your device (internal or external storage)
    3. Download TWRP img file and and store it, on the folder where you have adb and fastboot files, on your PC
    4. Open a cmd line and execute these commands (being on that folder, of course):
      adb devices (to make sure your device is detected)
      adb reboot bootloader (to reboot into fastboot mode)
      fastboot getvar current-slot (to check what's your current active slot)
      fastboot set_active b (if your active slot was a, if it was b then change it to a)
      fastboot erase boot
      fastboot flash boot twrp-3.3.1-2-unofficial-laurel_sprout.img
      fastboot reboot (NOTE : Before hitting "Enter", long press Vol + on your device until you see the Android One logo. By doing this your device will be forced to boot into Recovery and not into System)
    5. When TWRP recovery boots, if you have a stock boot.img that matches the build on this "currently active" slot, flash it into boot partition. If you don't have, then just ignore this step...(it's not mandatory)
    6. Install the TWRP zip (always install the latest build available)
    7. Change slot to the one that was active on the beginning of these steps and reboot to Recovery (just to make sure that the slot, in fact, was changed)
    8. Reboot to System

    Why do I suggest this?


    By doing this method (which seems more complicated but, trust me, it's how it should be done) we will flash TWRP img into the "inactive" slot, thus, not breaking anything on the "currently active" slot. When TWRP boots, it will patch both slots boot ramdisks. But the thing is, on the "currently active" slot (the one inactive on the beginning) it will patch the TWRP img but, on the "currently inactive" slot (the one that was active on the beginning), it will patch the stock boot.img, thus, no bug will happen that usually appears when a user accidentally flashes the wrong boot.img into boot partition.

    On the other hand, if we have a stock boot.img, that matches the build on the "inactive" slot, we could flash it into boot partition before installing the zip that patches ramdisk. By doing this we will patch both stock boot.img present on both slots (instead of patching TWRP img and boot.img).


    Cheers!
    6
    This man -> @Nik001 deserves a beer!!!

    Thank you for delivering us a fully working TWRP for laurel_sprout!

    Cheers!