Hello!
There's a guide already on XDA that covers this matter but in a general way and for all devices. That guide was based on the general info you may find on the original installation guide by @topjohnwu. So, all credits go to him.
Anyway, since there ins't a TWRP Recovery for Mi A3 (yet) and since I believe that many of you don't know about this, Iv'e decided to share here the steps I've done in order to root Mi A3.
NOTE: Now that we already have a working TWRP available for Mi A3, to root it you can now simply follow THESE steps after unlocking the bootloader.The guide present on this thread, of course, works as well, so I'll leave it here for those of you who don't want to permanently install TWRP to your device.
1 - Unlock the bootloader (if you haven't done it already...beware that this will erase all of your user data). To do so, you must:
Enable developer options
Enable the "OEM unlocking" option
Enable USB debugging
Have both adb and fastboot, from SDK Platform Tools available on your PC
Connect your phone to your PC using the USB cable and run the following commands:
Code:
adb devices
(just to make sure that your phone is, in fact, recognized by your PC and that you're able to run adb commands)
Code:
adb reboot bootloader
(so your phone will reboot into fastboot mode)
Code:
fastboot flashing unlock
(after rebooting, boot the phone again into fastboot mode)
Code:
fastboot flashing unlock_critical
(for full unlock)
2 - Download Mi A3 stock boot.img that you may find later on this post, that matches your current build.
Copy the boot.img to your phone internal (or external) memory
Leave a copy of it on your PC (on the same folder you have adb and fastboot...we never know if we don't need to use it again in the future...you know, to restore the stock boot.img, aka revert to stock...)
If, for your current build, there isn't a stock boot.img released yet, you may get one yourselves. How? READ THIS.EU Build boot images:
---Android 9---For all of you currently on 10.3.7.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 10.3.8.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 10.3.9.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 10.3.11.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 10.3.12.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 10.3.14.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 10.3.15.0 (EU) build, you may download stock boot.img HERE.---Android 10---For all of you currently on 11.0.1.0 (EU) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)For all of you currently on 11.0.2.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 11.0.3.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 11.0.5.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 11.0.6.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 11.0.8.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 11.0.9.0 (EU) build, you may download stock boot.img HERE.---Android 11---
For all of you currently on 12.0.2.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 12.0.3.0 (EU) build, you may download stock boot.img HERE. (thanks to @lucoz )For all of you currently on 12.0.5.0 (EU) build, you may download stock boot.img HERE.For all of you currently on 12.0.6.0 (EU) build, you may download stock boot.img HERE.
Global Build boot images:
---Android 9---For all of you currently on 10.3.8.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)For all of you currently on 10.3.14.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)---Android 10---For all of you currently on 11.0.7.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)For all of you currently on 11.0.11.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)For all of you currently on 11.0.14.0 (Global) build, you may download stock boot.img HERE. (thanks to @Sapper Morton)For all of you currently on 11.0.15.0 (Global) build, you may download stock boot.img HERE.For all of you currently on 11.0.22.0 (Global) build, you may download stock boot.img HERE.---Android 11---For all of you currently on 12.0.3.0 (Global) build, you may download stock boot.img HERE.For all of you currently on 12.0.4.0 (Global) build, you may download stock boot.img HERE.For all of you currently on 12.0.6.0 (Global) build, you may download stock boot.img HERE.For all of you currently on 12.0.7.0 (Global) build, you may download stock boot.img HERE.For all of you currently on 12.0.8.0 (Global) build, you may download stock boot.img HERE.For all of you currently on 12.0.9.0 (Global) build, you may download stock boot.img HERE.For all of you currently on 12.0.11.0 (Global) build, you may download stock boot.img HERE.
3 - Download latest Magisk Manager from HERE and install it on your phone
4 - Open Magisk Manager App and press:
Install
Install (again)
Select and Patch a File
Browse to the path where you saved stock boot.img and select it
Magisk Manager will now patch the boot image and store it in [Internal Storage]/Download/magisk_patched.img
5 - Copy the patched boot image from your device to your PC
Store it on the same folder where you have adb and fastboot
If you can’t find it via MTP, you can pull the file with ADB
Code:
adb pull /sdcard/Download/magisk_patched.img
6 - Uninstall Magisk Manager App from your phone (I'm not sure if this is really needed but I've done it anyway...)
7 - Flash the patched boot image to your phone by running these commands (remember, you must have patched boot image on the same folder you have adb and fastboot and, of course, your device must be connected to your PC...)
Code:
adb reboot bootloader
Code:
fastboot erase boot
Code:
fastboot flash boot magisk_patched.img
Code:
fastboot continue
(THIS IS IMPORTANT! USE CONTINUE INSTEAD OF REBOOT! You have been warned!!!)
8 - After the phone boots up, hopefully with a normal boot (almost feels like nothing happened....), install/open Magisk Manager App again and watch Magisk doing it's magic!
9 - Enjoy!
All credits goes to topjohnwu and it's incredible work with Magisk.
I cannot be responsible if you turn your phone into a brick. Your phone, your choices, your responsibility!
Thanks!
Been waiting for someone to create a cannonical guide of how to root this phone.
Saw someone with magisk who had WiFi problems, WiFi works ok you?
Also one would assume it disables the OTA update feature, probably better write it.
sirzarmo said:
Saw someone with magisk who had WiFi problems, WiFi works ok you?
Click to expand...
Click to collapse
WiFi problems appears when you flash boot not from your ROM build. Use only the same boot.img to the build number of ROM.
sirzarmo said:
Also one would assume it disables the OTA update feature, probably better write it.
Click to expand...
Click to collapse
It is. But you can still update via Magisk if you don`t touch system partitions. Else - flash manualy.
Wow,
Thank's a lot!
As you said, I didn't know this way to root a device.
sirzarmo said:
Saw someone with magisk who had WiFi problems, WiFi works ok you?
Click to expand...
Click to collapse
That someone was me. But, I believe that happened because I've used boot.img from 10.3.4.0 branch on GitHub (instead of using boot.img from 10.3.5.0 branch) and, also, I've used "fastboot reboot" command instead of "fastboot continue". As soon as the 10.3.5.0 branch appeared online I've decided to test this method again and it worked, that's why I've decided to share this with all community.
sirzarmo said:
Also one would assume it disables the OTA update feature, probably better write it.
Click to expand...
Click to collapse
I don't think it will disable OTA feature. Probably, as soon as a new OTA comes out it will be installed on Slot A (because up until now there's only been one update and it was installed on slot B...so everyone should now be on firmware V10.3.5.0 running on Slot B). So, if I'm not mistaken, the "worst" thing that could happen is to lose root (since the update will be installed on Slot A and boot.img on that Slot is still the stock one).
Cheers!
Typhus_ said:
Cheers!
Click to expand...
Click to collapse
Why thank you dear, I'll root now if so.
Hello!
Well, in fact, this method breaks OTA. It downloads but it doesn't install.
My guess is we need to flash stock boot.img and then apply the OTA update and then patch the new boot.img again.
I've noticed a new boot.img on GitHub today, hopefully it will be the correct one.
Typhus_ said:
Hello!
Well, in fact, this method breaks OTA. It downloads but it doesn't install.
Click to expand...
Click to collapse
You can simply follow this guide, if you do not touch system partitions.
https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md#devices-with-ab-partitions
Tried it already. It ain't possible because of 2 reasons:
1 - The supposly boot.img backup doesn't exist. Probably Magisk only does it if installed through TWRP and not by patching boot.img
2 - The OTA package fails to install. "A problem has occurred"...while trying to initiate the install.
Enviado do meu Mi A3 através do Tapatalk
When do you think twrp will be released for mi a3?
okay so I installed FDE magisk module now my phone is stuck at the bootscreen. Someone got a stock rom for me ?
You can change slot through fastboot. It will erase all user data (factory reset) but it's better than the phone not booting.
The other possible solution, I've sent you a PM (because external link).
fastboot --set-active=a (or b if you're now on a)
Enviado do meu Mi A3 através do Tapatalk
An offcial stock rom wouldve fixed my problem in no time. I changed the partition and got to a menu where I could chosse to factory reset but its been sitting on formatting data for like half hour...
drozo8o8 said:
An offcial stock rom wouldve fixed my problem in no time. I changed the partition and got to a menu where I could chosse to factory reset but its been sitting on formatting data for like half hour...
Click to expand...
Click to collapse
It should be quite fast...guess you're out of luck for the time being my friend.
By the way, you've used fastboot reboot or fastboot continue after changing slot?
It should be fastboot reboot
Enviado do meu Mi A3 através do Tapatalk
all i need is a proper flash all.bat since oyu gave me the OTA update link with a payload.bin which I extracted with payload_dumper
Typhus_ said:
Tried it already. It ain't possible because of 2 reasons:
1 - The supposly boot.img backup doesn't exist. Probably Magisk only does it if installed through TWRP and not by patching boot.img
Click to expand...
Click to collapse
Manualy patch boot.img in MM and you'll get backup.
This method is useful in Mi CC 9e. Thx
hello, install v10.3.5.0 over v10.3.7.0, now I don't have wifi and the sound does not work, instructions to fix it please ?, I am using the google translator to write here, thanks
You'll have to change slot and boot on that slot. You'll lose all your user data but the phone will boot ok and receive latest OTA. Either that or you have to wait for someone to dump you a stock 10.3.7.0 boot.img in order to fix those issues. On GitHub there isn't a boot.img for latest build yet.
Enviado do meu Mi A3 através do Tapatalk
Typhus_ said:
You'll have to change slot and boot on that slot. You'll lose all your user data but the phone will boot ok and receive latest OTA. Either that or you have to wait for someone to dump you a stock 10.3.7.0 boot.img in order to fix those issues. On GitHub there isn't a boot.img for latest build yet.
Enviado do meu Mi A3 através do Tapatalk
Click to expand...
Click to collapse
Fixed, THANKS YOU very much
Model BE2013
Build 10.5.2.BE83BA
Tried unsuccessfully to root numerous time, getting stuck on Fastboot Mode.
Then having to restore with MSMdownloadtool.
I have unsuccessfully tried using python to extract the boot.img, so I used the OTA boot.img.
Isn't the OTA boot.img the same as the python extracted version?
Is it easier for me to update to the latest OS 11 then root?
Thanks in advance
ipandroid said:
Model BE2013
Build 10.5.2.BE83BA
Tried unsuccessfully to root numerous time, getting stuck on Fastboot Mode.
Then having to restore with MSMdownloadtool.
I have unsuccessfully tried using python to extract the boot.img, so I used the OTA boot.img.
Isn't the OTA boot.img the same as the python extracted version?
Is it easier for me to update to the latest OS 11 then root?
Thanks in advance
Click to expand...
Click to collapse
Get the OTA download from oneplus website, put the zip on your phones root (Outside the downloads folder) upgrade your phone to OxygenOS 11.0.3 and then extract the boot.img from the OTA and patch it with magisk, rename the newly patched magisk boot img to "boot.img" and flash boot with it.
Worked for me.
Edit: Your phone is most likely on OxygenOS 11.0.2 thus making the 11.0.3 boot.img incompatible.
[GUIDE] Back to stock ROM howto / Downgrade howto
There maybe a number of reasons to go back to the stock ROM. We do not discuss them here :) But what to do if you flashed something, wanting to go back to stock, and did not brick your Realme X2 yet? :) Here is super quick howto guide. There are...
forum.xda-developers.com
this guys says
I have found out that in fact stock recovery does not exist as a prebuilt file It is being created by the script /system/bin/install-recovery.sh on a basis of stock boot partition and a patch file /system/recovery-from-boot.p
It means in theory you can recreate stock recovery having only Realme ozip file.
EDIT1 The command to do it in Linux shell is
Code:
bspatch boot.img selfmade_stock_recovery.img recovery-from-boot.p
Cool! Tested.
EDIT2. For the current moment when unlocked bootloader breaks fingerprint sensor: as soon as the bootloader is locked again, fingerprint starts functioning as it should.
EDIT3 Becomes clear that each ROM release has its own stock recovery which is generated automatically on the basis of boot.img and recovery-from-boot.p . Not only boot.img is being changed each release, but recovery-from-boot.p is changing as well. If the wrong stock recovery is installed, you might not be able to decrypt data and connect to WiFi from within recovery. Seemingly it may bring you serious problems if locking back bootloader (thus bricking the device). Good thing (as I understood, but not checked yet) is that after flashing stock ROM with a help of a stock recovery next reboot should replace your stock recovery with an up-to-date version of it. So to be on a safe side make sure that you rebooted to system and that your recovery reflashed by the system before you lock bootloader.
EDIT4 In order to combine everything in one place:
Stock recoveries for RMX1991 (China version): here
Stock recoveries for RMX1992 (India version): here
Stock recoveries for RMX1993 (Euro version): here
EDIT5 In later ROM releases patch and script files are relocated into vendor partition, they are /bin/oppo-install-recovery.sh and /recovery-from-boot.p there.
EDIT6 Please note that the method above is working with officially downloaded ROMs from realme support site (read here why).
any idea how to explain this in easy understanding word for me to have a stock recovery.img for RMX3363
Hello,
About a week ago I updated to MIUI 13 (13.0.2.0.SJEMIXM). My phone (Redmi Note 9T) was rooted and I had a custom recovery (Orange Fox) installed. I flashed the stock recovery and was then able to update. I left the stock recovery on the phone to make it easier to update down the line but did root my phone again.
This morning I was informed that there is a new update (13.0.3.0.SJEMIXM) so I download and installed it. All went well and the phone booted successfully.
I then wanted to have my phone rooted again (magisk) so I just took the boot.img from the previous version (13.0.2.0.SJEMIXM) to be patched since I did not have the factory Rom for the new version (13.0.3.0.SJEMIXM) to retrieve the boot.img file.
I then flashed the patched boot.img via fastboot (fastboot flash boot magisk_pached.img) and my phone started to bootloop.
I also tried flashing the unpatched boot.img but it is still the old one.
I don't know if I did something wrong or if it is just the old boot.img that I need to replace, pls help.
Ps: I have downloaded the OTA update (13.0.3.0.SJEMIXM) but it only contains a boot.img.p file.
Rubz_Mod said:
Hello,
About a week ago I updated to MIUI 13 (13.0.2.0.SJEMIXM). My phone (Redmi Note 9T) was rooted and I had a custom recovery (Orange Fox) installed. I flashed the stock recovery and was then able to update. I left the stock recovery on the phone to make it easier to update down the line but did root my phone again.
This morning I was informed that there is a new update (13.0.3.0.SJEMIXM) so I download and installed it. All went well and the phone booted successfully.
I then wanted to have my phone rooted again (magisk) so I just took the boot.img from the previous version (13.0.2.0.SJEMIXM) to be patched since I did not have the factory Rom for the new version (13.0.3.0.SJEMIXM) to retrieve the boot.img file.
I then flashed the patched boot.img via fastboot (fastboot flash boot magisk_pached.img) and my phone started to bootloop.
I also tried flashing the unpatched boot.img but it is still the old one.
I don't know if I did something wrong or if it is just the old boot.img that I need to replace, pls help.
Ps: I have downloaded the OTA update (13.0.3.0.SJEMIXM) but it only contains a boot.img.p file.
Click to expand...
Click to collapse
Flash the (13.0.3.0.SJEMIXM)boot.img with O.F .
Use Magisk app for rooting the phone.
I fixed the problem.
All I had to do was find new the boot.img and flash it via fastboot.
I then patched the new boot.img file and then I flashed the patched.img via fastboot.
Thanks for your help
I'm searching for the recovery of this firmware because I believe mine may be corrupted. My updates are failing and I want to reflash the recovery instead of completely wiping my phone and having to root all over again.
No full pack from 2451 (NA) a07 use the fastboot or the ofp file and flash all inages
Unless you have flashed something to vendor boot which is the recovery for our phone. It is not that then. If you are rooted, you must unroot to update phone.
MrSteelX said:
Unless you have flashed something to vendor boot which is the recovery for our phone. It is not that then. If you are rooted, you must unroot to update phone.
Click to expand...
Click to collapse
the op11 have a seperat recovery partition !
cph2449 eu buld full a08 pack
ChrisFeiveel84 said:
the op11 have a seperat recovery partition !
cph2449 eu buld full a08 pack
Click to expand...
Click to collapse
Damn sure whish I could use that. Would like to flash the recovery.img then my phone might actually update