yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Jonybat:
I guess you could try fastboot the original boot.img from the build you are currently running and then patch it from magisk. That should create the backup that magisk can then use to uninstall.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] k4sh44:
Again good job BubuXP.

I tried to make the python script to work and indeed it needs version 2 of python installed.

But that script needs protobuf module to be installed also which is a pain to install on windows.

I gave up on that one.

I saw an old programm available on github to extract the same but no script.

couldn't make it to work as well.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] bisteka:
Thanks to the OP. I did successfully rooted my phone using this method. And yesterday I tried to OTA update following the instructions.

But OTA update fails to finish the installation. Then without finishing OTA update, I try to install back Magisk, using: Install> install> Install to Inactive Slot (After OTA) and rebooted. Result Bootloop.

My next action was trying:

fastboot getvar current-slot

fastboot flash boot_b boot.img

Result: Bootloop

Another try:

fastboot boot patched_boot.img

Result still Bootloop.

Help please, thanks a lot.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] k4sh44:
Using the batch provided with the Mi 9.6.4.0 ROM it flashes on boot A & B if i remember well.

Maybe you could try this but i'm not sure. So better wait for experienced advise.

At least, you can use the flash_execpt_storage.bat provided with the archive.

Because of a PIN previously set on my device, i had to use the flash_all.bat

Here is the 9.6.4.0 image.

Use 7zip eg to extract all you need. Obviously, you'll have to enter fastboot on phone first.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] BubuXP:
Just repeating what k4sh44 already said above.

When you mess up with the partitions on both slots, it's better flashing the fastboot image with MiFlash. That will restore both slots to factory conditions. Only take care to use the "flash_all_execpt_storage.bat" script if you don't want to erase all your data in the phone.

I already wrote that in the first post guide, did you miss it or it's too difficult to find and/or understand? So I will try to write it more simpler than it currently is :)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] bisteka:
Thanks, k4sh44 and BubuXP for help. I figure out. But have to use the script flash_all.bat baecause of PIN.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] k4sh44:
For those who may need to flash system.img to restore stock system partition when OTA updates don't work you may use a tool provided here.

No need to install python.

Just extract the tool where you want.

Download your Android stock dump version here

Extract payload.bin from the archive into the payload_input directory previously created with the tool installation.

Run payload_dumper.exe to extract, have a coffee and at the end, all the update images will be stored into payload_output directory.

I checked the size and it matches exactly the ones you can get by downloading BubuXP archive found at OP.

BubuXP, you may update your OP with these explanations for whom who may need it.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] BubuXP:
I stay clear of that tool. I found it also some times ago, but it's infected with a Trojan. Check the Virustotal scan screenshot I attached.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] ncar123:
Where do I find flash all except storage and how do I use it with mi flash
[Xiaomi Mi A2 Lite Guides, News, & Discussion] elvinguitar:
Thanks for creating this guide. It's very helpful! :D
[Xiaomi Mi A2 Lite Guides, News, & Discussion] BubuXP:
http://static.en.intl.miui.com/static/article/innerimg/tongyong/tongyong3-4.jpg

In the lower right corner of the app, you must choose the .bat file before flashing.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] ncar123:
Thx

And there are 2 guides...

Which one should I follow?

And which update should I install on my phone cause mi website got only 9.6.4.0
[Xiaomi Mi A2 Lite Guides, News, & Discussion] BubuXP:
Both guides to install Magisk are valid, but this version is more detailed. Choose what you prefer.

If there is only that version on the Miui site, you can flash only that version.

But why are you flashing with miflash? You got some problem?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] k4sh44:
Ok so i finally managed to make the python script to work with a guide found here.

Installation guide is available for both linux and windows.

You should install python 3.7 64 bits and check all boxes.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ansel26:
Hi,

i had rooted my device with the old method (flashing patched boot in slot A and B), today i reflashed the original boot on both slots but OTA still doesnt install. I'm on august version what can i do ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] x1_logic:
successfully installed september ota,

1. now it can charging when the device is turned off but the indicator stuck on 98%, if the device turned on (charger still connecting) the battere was fully charged~

2. the alarm does not work if it is set when the device is turned off

*sorry for my bad english
[Xiaomi Mi A2 Lite Guides, News, & Discussion] eltano06:
Same here, the only way to install it is to flash the stock 9.6.4.0, then install to August update, then September update and finally installing magisk.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] adriakus:
1. If it really stays at 98% it's a good thing. Idealy, once at 100%, it should stop charging and let it discharge a little bit before pumping energy again. That's what smart chargers and smart devices do. It's not ideal to keep charging a lithium batery once it's at full capacity. It will unnecessarily stress it. Same thing, it's not ideal letting it go down to 0% battery very often. It's good to do a full charge-discharge cicle from now and then to calibrate it. Lithium batteries are complicated haha.

2. Did the alarm work with the device turned off before? All my old smartphones didn't do anything if they were turned off. Only my regular cell phone did. It would be nice to be able to program an alarm and turn the phone off. But then the phone won't be really turned off, right?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ansel26:
Did you install It ? Is downgrading safe ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] eltano06:
i didnt downgrade, i flashed the stock rom (july) with miflash, then install august and september updates. you cant downgrade.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] ledio456920:
searching for 10.0.8.0 patched boot.img
[Xiaomi Mi A2 Lite Guides, News, & Discussion] BiG_FooT:
Me too, I struggled with updating and lost root. Would be very gratefull for anyone to upload!:)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Gumka1977:
10.0.8.0 patched boot.img :

https://xdaforums.com/mi-a2-lite/how-to/fastboot-patched-boot-img-v10-0-8-0-t3925483
[Xiaomi Mi A2 Lite Guides, News, & Discussion] boe323:
This systemless b--ll--ks never works, always does something to the system, certain modules still modify.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
Anyone tried this 0.8 patched boot?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] boe323:
should work, just boot with it and it wont make any changes, direct install after boot. Dont think the payload.bin boot image will work though, thats a patch not full boot image, flashing a patch over a boot image is like likely to fail via fastboot as it replaces rather than patches.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
I was thinking just to flash the patched boot via fastboot and then install in magisk.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Majaque:
I suggest booting it (fastboot boot), then install directly via Magisk.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] boe323:
If you cant update due to system changes try this, disable then delete magisk modules one by one(except the ones you have to reflash to uninstall, follow uninstall instruction), restore boot image and reboot to bootloader, if your on 1.0.0.7.0 then use system.img and fastboot flash system system.img with no slot selection, reboot and apply update.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
Or can I just do what Majaque said? Fastboot latest patched boot and then direct install in Magisk?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] :
Can confirm that phone gets rooted in 10.0.7 update, will test OTA when 10.0.8 arrives.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
Can someone explain to me, before I boot with the latest patched boot, what do I get with it? Do I get the latest April update? I mean, the update is approx 300MB and the patched boot is 17MB. So I was wondering...
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
You get nothing.

It is not needed for an upgrade/OTA.

If you forget to re-enable Magisk after installing the OTA and need to root again, it is useful.

If you have 10.0.8.0 and no Magisk, the patched boot makes it quicker to install Magisk. You can do it without (make your own) but it's a few more steps.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
I'm already rooted, with magisk installed, I'm on 10.0.3.0 right now. But since my system has been modified, I can't OTA update. So, how to update to 10.0.8.0?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Niklaus89:
Are you sure you can't ?

I was in the exact same situation and I updated by mistake my phone (don't ask me how ^^), I thought my phone would'nt restart and that I would have to flash it all again but it just updated without probleme, I just lost the root.

According to everything I read here it shouldn't have worked but it did.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] emrique_:
Doesn't work
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
Why?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] tranxuanthang:
I just couldn't manage to get the python script to work on Windows (it shows something like truncate error). Does anyone have a link for the already extracted system.img of 10.0.7.0?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Niklaus89:
It didn't work for me either because the boot has been patched with the beta version of magisk.

After that I went to the settings of the magisk app to put the update parameters in beta mode then it worked.

You could try that
[Xiaomi Mi A2 Lite Guides, News, & Discussion] emrique_:
Thanks it works
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
So guys, can someone explain the entire procedure for updating from lower version (mine is 10.0.3.0) to the latest 10.0.8.0 for us who can't update via OTA?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
If you can't OTA, you may need to flash vanilla boot or system.

I had this issue with boot due to TWRP being in the Magisk backup. I wrote a guide for upgrading. You can skip the TWRP restore if you don't want it.

https://xdaforums.com/mi-a2-lite/how-to/10-0-4-0-to-10-0-7-0-ota-keeping-magisk-t3916863

If your issue is system, the flash process is similar. Use fastboot to flash system.img to the system_a or system_b partition.

Alternatively, people seem to have success doing a full fastboot flash of the new version.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Majaque:
It's possible your boot/system partitions are modified therefore prevents updater from doing its job.

You just need to reflash boot_a/b system_a/b partitions (from 10.0.3.0 image) via fastboot (just reflash same file for both a/b) - *poof* - updater should work now.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
Will I lose my apps and data?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Marty4:
Magisk root lost after every reboot

I was able to update to 10.0.8.0 after reflashing system.img - I hope this whole procedure can become less complicated and more routine one day...

But now I got a new problem: After every reboot, I lose Magisk root and I have to use fastboot boot patched_boot.img again...

-> Can someone remind me how to permanently flash the patched_boot.img?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
Open magisk manager. Install (direct).

---------- Post added at 08:00 AM ---------- Previous post was at 07:56 AM ----------

Flashing boot or system won't lose data. Flashing a full fastboot image doesn't have to lose data (run the correct script).

If you do either of these and things break and you can't recover, you may need to factory reset, which will lose data.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Odienz:
Full rom for 10.0.0.8.0 available to download yet?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] MKKLR21:
This guide worked perfectely fine for me when I applied OTA to 10.0.8.0.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Majaque:
Well, some images from official Mi site have "fastboot oem lock" command in batch file (destructive for data on unlocked devices) - so I'll be really careful with that.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Cappucinto:
Is it possible to downgrade from 10.0.8 to 10.0.7?

Is messed up with installing magisk proberly and now I'm unable to install. Since there is no fastboot for 10.0.8 I would like to downgrade first, update via OTA and try to install Magisk again.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
I imagine it's possible to flash back with a fastboot image but I have not tried.

What install problem are you having?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Cappucinto:
Don't know if I should try :D

After booting patched_boot it says that Magisk is not installed. If I try to install it there is just two options; download zip and patch boot image.

Never had problems installing it but now it's not possible.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
Don't do the same mistake I've done : if you do fastboot boot.... It means that you'll have a temporary img in your device, it's not a fastboot flash.... Command.

So you'll have to install Magisk even if it says it's already installed!

So do the install procedure (patch boot image) from inside the MM and that's it!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
Sounds like your patched boot is not actually a patched boot.

You can create a patched boot from Magisk Manager and then use fastboot to install it. That's how you install the first time if you lack a patched boot.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Cappucinto:
Problem solved!

Patched_boot did not boot because I used the wrong adb version :D
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
In case anyone saw the new stable release of Magisk and was wondering...

I have upgraded to Magisk Manager 7.1.2 and Magisk 19.1 without issue (from the Magisk Manager app).

I was previously using Magisk Manager 7.1.1 and Magisk 18.

I am running stock Pie 10.0.8.0.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] biasiman:
I update magisk too. Do you think it's wise to update using the OTA method from 10.0.2.0 (yes still at this one as I'm afraid to update) to 10.0.8.0 ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Tech0308:
I had no problem going from from 9 to 10.0.7.0 and to 10.0.8.0. as long as you've not touched the system partition you should be fine
[Xiaomi Mi A2 Lite Guides, News, & Discussion] AstroBiswas:
88*9

80..0000…68'c9

9....................…….

.

...….
[Xiaomi Mi A2 Lite Guides, News, & Discussion] saleyman:
It seems that I can confirm this was the very first update that worked for me according to steps 12-14 from first post (OTA update).

Before I always had to use the significantly more complicated fastboot method...
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
Have you changed the system partition in some way or not?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] ee99161:
Hi to all. Can someone please post a working patched boot for latest version of ROM and latest Magisk (not beta one)?

Thank you.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] vapor_s04:
Guys, I would Like to Update my a2 from 8.1.0 to The latest OTA. Before updating i wanted to deinstall magisk , but everytime i try to remove magisk i got an Error that the Image couldnt be patched and the Installation stops. Any Help?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] saedkebbeh:
Flash stock boot.img with the exact number of your current fw, then update, after that reroot using boot pathed boot img and finally install magisk
[Xiaomi Mi A2 Lite Guides, News, & Discussion] antonioaz23:
Can't boot patched_boot.img

I'm hoping someone can help me. I'm trying to root my mi a2 lite (I'm on 10.0.7 and unlocked bootloader).

when I enter "fastboot boot patched_boot.img" on adb, I get OKAY [ 0.612s] finished. total time: 1.830s, but the phone remains with the fastboot logo and doesn't restart by itself. I have to write fastboot reboot on adb or manually restart the phone, and when I open magisk manager after rebooting and press install I don't get the direct install option. Am I doing something wrong? Thanks
[Xiaomi Mi A2 Lite Guides, News, & Discussion] saedkebbeh:
Enter the command a second time
[Xiaomi Mi A2 Lite Guides, News, & Discussion] antonioaz23:
I tried that, but the phone still doesn't restart and on adb I got "<waiting for device>". The phone disconnects from pc, because I hear the unplugging sound, but it stays on the fastboot logo...
[Xiaomi Mi A2 Lite Guides, News, & Discussion] saedkebbeh:
I faced the same issue, enter the command the first time, nothing happens, right after that re-enter the same command, it will work, that's what I experienced
[Xiaomi Mi A2 Lite Guides, News, & Discussion] antonioaz23:
I tried several times but nothing happens, I have to manually power it off and then turn it on again... I even tried with different adb versions, but still nothing, it doesn't boot the patched version
[Xiaomi Mi A2 Lite Guides, News, & Discussion] saedkebbeh:
What patched boot img are you using?

There might be a problem with it
[Xiaomi Mi A2 Lite Guides, News, & Discussion] antonioaz23:
This one: https://xdaforums.com/attachment.php?attachmentid=4747615&d=1555999610

I found it here, in this thread.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Gumka1977:
It's the wrong drivers installed. Do it this way : http://www.droidthunder.com/adb-installer/ - Download ADB Installer v1.4.3.

or: https://devsjournal.com/download-minimal-adb-fastboot-tool.html

And enjoy life :)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
I have Magisk 18.1, and now 19.1 is available. I'm on 10.0.4.0 at the moment, I didn't update. Should I update Magisk to 19.1 and which method to use? Direct install?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
Update if you want. It was released as "stable" and seems to be working for people.

Update magisk manager first, then do a direct install and then reboot.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] marstonpear:
How does the latest Magisk keep up with OTA updates? I don't root my phone, because the last time I rooted it with Magisk, it bootlooped while installing OTA :(
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
I get this error.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Captain_Hungary:
I had the same issue as well on 10.0.8, and i thought it was the drivers first, but it's not. What solved the issue for me is:

-boot to the rom

-disable and reenable adb

-select revoke usb debugging authorisations from the dev options.

-connect phone to pc, and type: adb devices

-give access to adb on your phone if needed

-type: adb reboot bootloader

-you are now in fastboot and booting patched boot imge will succeed

I have no idea why ths helps, but it does, and I have no other driver installed, but the one that comes with the adb and fastboot packages either ubuntu or windows 10. hope it helps ;)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] antonioaz23:
It worked, thank you very much! :D
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
You updated magisk manager?

Did you reboot? That may help...

The boot image format hasn't changed. Are you sure you don't have something else patched in to it?

If you have an unlocked bootloader you can try flashing vanilla and then boot a patched image.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
Magisk manager is updated. I didn't reboot.

What do you mean?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] mirakulixs:
Hey guys....

my Phone A2 Lite on 10.0.8 has an unlocked bootloader and no TWRP on it. Now i want root with magisk.

How can i do this?!? my english is very poor...so please use simple words for googletranslate.

regards Mira
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
Magisk manager says it cannot understand your boot partition. That seems to indicate that something in your boot partition has changed. Not just that it's patched with Magisk, something else.

Magisk manager hasn't don't anything yet, so you can just stick to the old version.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] manlio62:
You need the patched boot for V10.0.8.0. You can find it here: https://xdaforums.com/mi-a2-lite/how-to/fastboot-patched-boot-img-v10-0-8-0-t3925483

Then you have to follow the instructions in the first post ;)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] bla.tiga:
Bro im confused which one i've to download , magisk manager 6.00 or magisk v 17.1.zip???

Because the patched boot img in 1st post using magisk v 17.1 , but where the apk when i download the v17.1.zip?

In 1st post we to instructed to install magisk? But where the apk??
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
I've restarted my phone and now it goes up to white Android One background and shuts off. Tried to power it on several times, and it shuts down every time. When I connect it to the charger it restarts every time after several seconds on android one logo. What the heck is going on?! And what to do now?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] manlio62:
[MENTION=6888345]bla.tiga[/MENTION]

The image for V10.0.8.0 is pathched by magisk 19.1 and so is better for you to use the last magisk manager apk v7.1
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
I have a bigger problem now. :( I tried to flash vanilla boot and then patched boot, and I did it but I get a recovery error telling me my system is corrupt. Something like this:

https://www.reddit.com/r/AndroidPre...load_android_system_your_data_may_be_corrupt/

Anyone help??
[Xiaomi Mi A2 Lite Guides, News, & Discussion] bla.tiga:
Yeah... I already rooted, what something cool with this rooted device
[Xiaomi Mi A2 Lite Guides, News, & Discussion] manlio62:
You can try running a complete flash directly with MiFlash using the flash_all_except_storage.bat script. You can find fastboot images here https://xdaforums.com/mi-a2-lite/how-to/fastboot-xiaomi-mi-a2-fastboot-images-t3824871
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Nabukodonosor:
Found the issue. I was flashing 10.0.3.0 version and mine was 10.0.4.0. :/ So, I did vanilla boot and patched boot of 10.0.4.0 and it worked!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] wenna.speedy:
https://xdaforums.com/mi-a2-lite/themes/gcam-fix-custom-roms-t3929253
[Xiaomi Mi A2 Lite Guides, News, & Discussion] bla.tiga:
Why my root gone after restart??

Is that i need do fastboot boot patched.img again??
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
Yes, then install Magisk from Magisk manager so it sticks.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] bla.tiga:
I dont know, i already boot the patched boot.img from fastboot, but it not rebooting just stay in fastboot while in cmd say already ok

I flash twrp and magisk.zip , it more sticky than before...
[Xiaomi Mi A2 Lite Guides, News, & Discussion] emirul:
Hey i dont know ehat my problem is. Can tou guys help me. I've attached of photo if you guy want to see what my problem is
[Xiaomi Mi A2 Lite Guides, News, & Discussion] dedebekri:
The files you're trying to flash must be in the adb/fastboot folder

Mi A2 Lite cihazımdan Tapatalk kullanılarak gönderildi
[Xiaomi Mi A2 Lite Guides, News, & Discussion] emirul:
So i just create a new folder??