yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] mauronofrio:
Recovery partition doesn't exist, so you can't flash it. The installation guide is explained in the first post
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] nelinthon:
I fix it, just put the device password, so easy hahaha
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] mauronofrio:
Yes that is for decryption
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Rajendran Rasa:
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
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] nelinthon:
Another problem

I tried to flash a GSI rom and STOCK rom but appears an error: UPDATER PROCESS ENDED WITH SIGNAL 4
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] oska3:
Pls for cc9e also twrp
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
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

adb reboot bootloader

6 - Check your current active slot

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:

fastboot --set-active=a

Or, if your current active is slot a, then run:

fastboot --set-active=b

And afterwards, run:

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:

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 [MENTION=4712355]mauronofrio[/MENTION] 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!
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] a-m:
rom.zip

where is rom.zip
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Crosstyan:
I wonder if it can work on Mi CC 9e......
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] mauronofrio:
This will not work on Mi CC 9e
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
Uninstall method explained (aka revert to stock)

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

Uninstall all Magisk Modules you have installed (do the same for Substratum themes, if any)

Reboot to TWRP

While on TWRP, Flash Magisk Uninstaller Zip

Reboot to bootloader

fastboot getvar current-slot

(just to make sure which slot is currently active)

fastboot flash boot boot.img

(from your stock ROM build type)

fastboot set_active [B]b[/B]

(or a, if you were on slot b)

fastboot erase boot

fastboot erase system

fastboot erase vendor

fastboot flash vendor vendor.img

(from your stock ROM build type)

fastboot flash system system.img

(from your stock ROM build type)

fastboot flash boot boot.img

(from your stock ROM build type)

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
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] nelinthon:
There's a way to relock the bootloader???
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
Yes, of course there is.

The best, and secure way, is to flash the stock ROM using "flash_all_lock" bat or sh files.

You could use fastboot flashing lock command

BUT

you have to be certain that your system partition is not tampered in any way. If it is and you lock it, you'll get a brick.

Cheers!
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] nelinthon:
Oh thanks, I tried recently to lock bootloader flashing stock, but nothing happens to bootloader. I'll try to flash again..... Thanks ;)
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Theseusperse:
Guide worked perfectly for me on latest global firmware, including installing Magisk, it couldn't have been easier! Many thanks OP.

USB-OTG even works! I can transfer files from my Windows 10 laptop to the phone in TWRP and vice-versa no problem. Didn't need to install any special drivers or anything.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
That's not USB-OTG...that's MTP.

USB-OTG is when you connect a external USB drive to your phone.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Theseusperse:
Sorry my bad, either way the TWRP is great, thanks! :D Honestly this phone rooted is amazing, considering it has the exact same camera as the Redmi Note 8, a ginormous battery and AMOLED screen it's a bargain. I'm easily getting 2 days battery with medium to heavy use.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] jorgeee:
somebody please make a rom for this device. i really hate the gesture thing and navigation bar. ???
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] jigs4wkiller:
There is already a rom on 4pda.

https://drive.google.com/open?id=1SmpkzoP1qc07MP2_8lvHnqwIvrIAH0qF
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Spardantex:
Have you tested this ROM? How is?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] jigs4wkiller:
Everything works great except fingerprint. FP will only work while display is on.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Spardantex:
Ah okay, what a shame.. I think I'll wait for a fix before install it
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Rajendran Rasa:
What about volte??
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
If your'e with root, you can use Pix3lify Magisk module. With it you may change the behavior of the navigation bar. After installing the module, if you go to Settings -> System -> Gestures you'll be able to disable the "swipe up" function to get back to 3 button navigation.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] nelinthon:
When I try to flash the Patch, twrp say that this file is to other device, and don't install. I tried to start the phone but it does not leave boot screen (ANDROID ONE), how do you install this rom? Can u help me?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
Open the zip and go to -> META-INF\com\google\android, in here open updater-script with Notepad++. Replace "violet" for "laurel_sprout". Save the file, save changes to the zip, flash the new edited zip.

Cheers!
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] [GS]:
What is difference between violet and laurel_sprout? I bought MI a3 2 days ago.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
"violet" is Redmi Note 7 Pro codename. That zip was created originally for that device. But it will work on laurel_sprout (codename for Mi A3) as well since it's objective is to change fstab.qcom present on /vendor/etc folder.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] nelinthon:
Thank you! It worked perfectly, the rom is very good I loved it!
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Spardantex:
Can you make a short review of the rom?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Anurag151143526:
Hey brother i need urgent help

I have indian mi A3 which comes with stock Android

Is there any way to install miui rom ?

I want to root in stock android ? Help me
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] conduisant:
Hello and thanks for this thread

one question : after installing TWRP according the tutorial of the post, if i want to back to stock, can i flash directly through fastboot the stock ROM here (https://xdaforums.com/mi-a3/how-to/rom-xiaomi-mi-a3-laurelsprout-t3962489) ?

thanks
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] thedisturbedone:
Yes
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
You can follow THESE instructions to revert back to stock.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] strongst:
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
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Makishima:
Were I to flash TWRP and Magisk (and install TWRP permanently) , would I still be able to receive OTA updates normally by flashing Magisk to the inactive slot as described in the guides or does that only work when one has just Magisk flashed to one slot and no TWRP?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] ricky9779:
What is the difference between TWRP installer and TWRP?

Which one should I have to flash first?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Andres88z:
my cell phone did not start I had uninstalled magisk but it did not work so I reinstalled magisk but it did not start, the solution was to flash from twrp version magisk v.18 vuala start with magisk again( from twrp in slot a and boot active b)

thanks here here you learn a lot
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] gocke55014:
do i need to get the exact same version of system boot vendor.img to revert to stock or any version would do?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Andres88z:
I've used it while at V38 whit magisk and twrp and it works, following the tutorial , the process time was 10 min, according to your processor. i used the .bat flash (flash_all.bat) activating the other slot

i have clean stock rom 37 :)
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] sgabrielbs:
wifi miA3

I tried to root my MI A3 and now I have a problem with wifi, can you help me ????
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] paq1170:
[MENTION=758827]Typhus[/MENTION], thanks for ur tutorial. Something happened while I installed TWRP on mine & I need some clarification. Everything went well my active slot was "b", so according to your tutorial I went for slot "a". During installation of TWRP, I forget putting .img while flashing. I got frustrated and restarted my phone. It rebooted into stock recovery, I had to factory reset. On rebooting I had even lost my previous update 10.3.6.0 and gone back to 10.3.1.0! After realizing my mistake I later flashed TWRP properly, but this time my active slot was now "a", so I now went to "b" before finishing up with magisk.

Pls, why did my rom revert back to it's initial version and how come my active slots changed, is it bcos of the initial swap? Have I done something very wrong? How do I update the room now that I am fully rooted with TWRP? Thank you
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] paq1170:
Ok. So partition "b" is updated and partition "a" is not! So is it ok for me to go ahead and download the update again then flash the image over partition "a"?

Thank u 4 responding. PS I currently don't have network issues though.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] paq1170:
Devcheck says I am on slot "a" and on build PKQ1.190416.001.v10.3.1.0PFQMIXM.

So does this mean I should flash v10.3.6.0 to partition b? Or a? Or both? Kinda confused. After flashing should I flash magisk too.

Sorry for all the questions. Thanks again.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] jrtokarz:
Confused about A/B.

Ok, I followed the instructions for installing TWRP which seemed to go successfully. Trying to root via Magisk, failed but now I'm not sure what state my phone is in.

Steps taken:

Install TWRP via the instructions on this thread.

Patch the stock boot img (which results in a 32MB file boot image from the original 64MB image ???)

fastboot flash patched boot.img to Slot A.

Behviour:

Attempting to boot Slot A then seems to get stuck in a boot loop.

I changed active slot to slot B and I am able to get to TWRP.

I then flashed stock bomt.img back to slot A, after which if I try to boot slot A, it start TWRP (confused)

I then erased boot_a, after which if I try to boot slot A, it starts TWRP (but I thought slot A should now be empty)

When look in TWRP, it still always say slot A is active.

If I then perform:

fastboot --set-active=b

fastboot reboot

This will then boot TWRP, from which I can then 'rebbot system' which starts the phone.

What the hell have I done? :)
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] jrtokarz:
Figured out part of my issues...

Dumb mistake on my part. I was looking at the software version in the booted system. Then trying to use the appropriate version boot.img. The part I forgot about, was that the version specified is the the system / vendor on slot B. The system / vendor on slot A is still from an older version of the OS :silly:

Still getting stuck in a boot-loop. Is it possible to create system.img and vendor.img from system_b and vendor_b partitions using DD?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] arunbiju969:
Start fresh use fastboot Rom to revert
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] DJBhardwaj:
After booting TWRP image and installing the TWRP installer zip, is it mandatory to flash Magisk or any other no-verity disabler scripts for the device to boot? Or we can have TWRP without root or any additional scripts without triggering DM-verity?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] DJBhardwaj:
Great! Thanks.

I have another question. I tried "fastboot flash boot twrp-3.3.1-15-laurel_sprout-mauronofrio.img" on the current slot (Didn't switch the slot). Then decrypted by entering the PIN and finally flashed the installer zip via TWRP to permanently keep it. Then rebooted the phone into the OS. And I can confirm that it works without any additional scripts to disable DM-verity, etc.

However, after that I booted back into TWRP and flash Magisk 19.4 for root. The flash worked, the phone also booted just fine, however, I lost WiFi connectivity. As soon as I turn on the toggle, it turns back off in a few seconds. Is there somewhere I went off the track?

I have a Mi A3 (Global/Indian variant) with v10.3.6.0 installed on the active slot.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] DJBhardwaj:
I will try again today with canary (used 19.4 Beta) earlier and report back.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Spardantex:
What we need for a full working recovery? Or better, someone know why we can't flash .zip files?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] hacksome:
I am here since 15 years, still can't figure the intricacies of flashing this particular phone so far :D
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] technotika:
Same, can usually do in one go but this time trashed it and had to restock , waiting on a guide ?
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] paq1170:
I believe its because of the A/B partitions on this phone. Its making it difficult to make Twrp work properly. Bit in time Devs will crack it.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Anurag151143526:
Same here

;__;
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] hacksome:
Figured out most of the action is happening in the Telegram for this device. Here is a noob friendly tutorial i found there:-
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] jnel26:
hellllppp guys im stuck on fastboot :(

this what happen,after i install magisk, my wifi not working anymore, so i try to wipe dalvik, data, system to have factory reset but now im stuck on fastboot. pls help
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
fastboot getvar current-slot

if the result is "a" then:

fastboot set_active b && fastboot reboot

if the result is "b" then:

fastboot set_active a && fastboot reboot

You'll lose all your userdata...but it will boot.

Problem solved.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] jnel26:
thanks for this this is another way to get out of stuck fastboot, i also tried flashing stock rom via MI Flash and it also works too.

Now im back to rooterd device with twrp and magisk but WIFI not working again.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
Of course it does...flashing full stock ROM always works...

You're using the wrong boot.img. It must be the same boot.img of your current build version, or you'll end up with that issue.

If you rooted using TWRP, that happened because you didn't change slot on fastboot, before flashing twrp.img.

Now you must revert to original boot image from your current build version...or you'll be stuck without WiFi.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] kimikim0:
someone please upload boot.img, system.img and vendor.img from EU V10.3.7.0.PFQEUXM. i fked up, please thank you
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] kimikim0:
sorry i mean the latest V10.3.9.0.PFQEUXM
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] DBuffon:
Since I had rooted my phone with Magisk (without TWRP) I tried to revert using the following procedure:

Got boot.img from my stock ROM build type (EU or Global) and store it on the same folder I have adb and fastboot

Reverted any modifications done to /system and /vendor

Uninstalled Magisk

Rebooted to bootloader

fastboot getvar current-slot

(just to make sure which slot is currently active)

fastboot flash boot boot.img

(from my stock ROM build type)

fastboot set_active b

(since I was on slot a)

fastboot erase boot

fastboot flash boot boot.img

(from my stock ROM build type)

fastboot reboot

The result was a bootloop.

I then set active slot back to a and the phone booted.

I've then tried to install the OTA update (which downloads correctly) but at about 30% it gives "Installation problem".

What should I do?

I guess I shouldn't have erased/flashed boot.img on slot b, but since it's too late for that, how do I solve? Please help me!

Thank you!
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] paq1170:
[MENTION=7284748]Sapper Morton[/MENTION], pls can you post october boot.img. if i patch it with magisk and instal like u showed me for September boot.img hope it will work? Thanks

---------- Post added at 08:35 PM ---------- Previous post was at 08:32 PM ----------

@DBuffon you would have just followed the tutorial i used in some pages back to patch boot.img with magisk and just flash it. It was super easy and well explained.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
Why don't you just do it yourself?

I've explained how to HERE
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] DBuffon:
My problem is not patching the boot.img. It is reverting back to stock.

I've solved (thank you Typhus!) by flashing the stock rom via fastboot, installing the OTAs and then rooting the phone again, but there should be an easier way.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] ghasemi.hussein:
i think i found a bug. installing this twrp image on october update(ota or clean install) will result broken wifi and hotspot(they won't turn on anymore). also flashing stock boot image after installing twrp will force you to factory reset in order to boot device(or restart to fastboot and install twrp again!). correct me please if i'm wrong.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] ghasemi.hussein:
thankyou for replying. i flash the image you posted and booted the phone. it wants me to factory reset again.

i explain to you every step i mad and please correct me if i'm wrong.

after i updated from ota and flash twrp and magisk, i think maybe it's because ota . i donwload v10.3.8.0 .zip file from here (at end of page). use payload dumper to extract all of its images. and then flash all of them in fastboot. like described in this mi a2 threat. after that phone booted and every thing worked. it was slow and after a factory reset it work fine. then i use this guide to patch twrp and then flash magisk. phone booted and wifi and hotspot borken.

flash origianl boot.img again and factory reset page show up.

by the way i use both magisk v20 and 19.5 and they worked fine for me.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] ghasemi.hussein:
I just read typhus post. I think I changed slot before flashing twrp.img but I will try installing twrp from a clean boot tomorrow to make sure if it was problem.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] ghasemi.hussein:
horaaa! after two days flashing, wiping, searching at last i found my problem. it seems like i don't switch slot before flashing twrp.img. thankyou [MENTION=7284748]Sapper Morton[/MENTION]n and [MENTION=758827]Typhus[/MENTION] .
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] RJ-:
When official twrp available for MI A3
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] Typhus_:
Soon. But, then again, you can use OrangeFox Recovery.
[Xiaomi Mi A3 ROMs, Kernels, Recoveries, & Other De] RJ-:
Thnks