yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A2 Lite Guides, News, & Discussion] wirapuru:
Ok, so I've finally made it to work with wifi - unfortunately I didn't find the cause of the issue though, which would have been very good.

What I did was to take the original V9.6.9.0.ODLMIFF Mi ROM PACK's flash_all_except_storage script, stripped every line except the ones that flash to anything_a (i.e. fastboot %* flash devcfg_a) and run it with that V9.6.9.0.ODLMIFF Mi ROM PACK files through fastboot. The reason I did that way was because my slot_a system was the one without wifi.

(I'm using Windows at the moment, so I edited the .bat one, the final edited script: )

fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *daisy" || @echo "error : Missmatching image and device" && exit /B 1
set CURRENT_ANTI_VER=1
for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar rollback_ver 2^>^&1 ^| findstr /r /c:"rollback_ver:"') do (set version=%%i)
if [%version%] EQU [] set version=0
if %version% GTR %CURRENT_ANTI_VER% (
@echo "error : current device antirollback version is greater than this package"
exit /B 1
)
fastboot %* erase boot_a || @echo "Erase boot_a error" && exit /B 1
fastboot %* flash modem_a %~dp0\images\modem.img || @echo "Flash modem_a error" && exit /B 1
fastboot %* flash sbl1_a %~dp0\images\sbl1.img || @echo "Flash sbl1_a error" && exit /B 1
fastboot %* flash rpm_a %~dp0\images\rpm.img || @echo "Flash rpm_a error" && exit /B 1
fastboot %* flash tz_a %~dp0\images\tz.img || @echo "Flash tz_a error" && exit /B 1
fastboot %* flash devcfg_a %~dp0\images\devcfg.img || @echo "Flash devcfg_a error" && exit /B 1
fastboot %* flash dsp_a %~dp0\images\dsp.img || @echo "Flash dsp_a error" && exit /B 1
fastboot %* flash aboot_a %~dp0\images\emmc_appsboot.mbn || @echo "Flash aboot_a error" && exit /B 1
fastboot %* flash boot_a %~dp0\images\boot.img || @echo "Flash boot_a error" && exit /B 1
fastboot %* flash system_a %~dp0\images\system.img || @echo "Flash system_a error" && exit /B 1
fastboot %* flash vendor_a %~dp0\images\vendor.img || @echo "Flash vendor_a error" && exit /B 1
fastboot %* flash cmnlib_a %~dp0\images\cmnlib.img || @echo "Flash cmnlib_a error" && exit /B 1
fastboot %* flash cmnlib64_a %~dp0\images\cmnlib64.img || @echo "Flash cmnlib64_a error" && exit /B 1
fastboot %* flash keymaster_a %~dp0\images\keymaster.img || @echo "Flash keymaster_a error" && exit /B 1
fastboot %* set_active a

After that I had a working stock-system/boot V9.6.9.0 with wifi, phew. OTA update worked as expected, and since I hadn't Magisk installed anymore, going through the steps from [MENTION=5474836]BubuXP[/MENTION]'s was godspeed (with the provided patched_boot.img, thanks for that time saver!).

I know this is a somewhat very specific case - flashed OTA system.img and got no wifi - but I hope it helps someone with the same issue. Feel free to ask anything related to that if you need (I can't guarantee to know/remember if too much time ahead though).
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Myrkser:
Magisk "no original backup found"

I wanted to deinstall Magisk to install the new update, but I get the error no original backup found. Is there a method to put the original image downloaded in post 1 in the specific folder that it gets recognised by Magisk to restore?

I installed Magisk like described on the first post, but it seems it didn't make a backup for any reason.

Thanks
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
I haven't find anything useful to re-activate the OTA updating...so I think I'm gonna re-flash the stock vanilla 9.6.6.0 with MiFlash.

Do you think that I can go directly this way also with TWRP and Magisk installed??

Does MiFlash erase all no matter what, right?

Thanks
[Xiaomi Mi A2 Lite Guides, News, & Discussion] wirapuru:
I'm sure BubuXP and others here are more experienced about this and probably will have better suggestions, but after my journey last weekend I assume I can tell you to try to flash original system/boot .imgs before trying data-wiping MiFlash process.

Are you familiar with the process of flashing them through fastboot? (I'm guessing yes, since you had those issues we saw before, etc). I would do this:

1. Check which exact version (i.e. V9.6.9.0) of your current installed system

2. If it's exactly V9.6.9.0, I would recommend get the ROM Pack directly from their site: http://en.miui.com/download-354.html -- if not (the version), use one of the provided by BubuXP at the first post (TROUBLESHOOTING section has them). Extract those files so you can use their boot.img/system.img

-- Quick stop here about something --

Do you have a current working build/system? If so, which slot it's at? If you have it at slot a, i.e., I'd recommend setting your current active slot to the other one (i.e. in this case b) for theses tests - although flashing the wrong system version could make it unbootable, issues related to the boot.img it would only be a matter to re-switch the slot to the previously working one.

-- Back to it --

3. Flash them through fastboot at the specific slot then reboot.

This would be enough to have a OTA-updateable system, without wiping any user data. I tell you that was what I did.. after a lot of tries mixing and matching things. The thing that allowed me trying a lot of stuff without wiping anything was having a working system at slot b - everything I did was at slot a, if I had any bootloob/etc, I switched back to b then tried again.

4. If all booted, and then OTA-updated, all you need now is to reinstall Magisk like it was never installed before (using the patched_boot.img for V9.6.10.0 at first post worked for me). Even better, my surprise when I rebooted/reinstalled - all my modules were there.

(Note: About TWRP recovery, I can't help you with anything, never installed on this phone, to simplify things)

Let me know if I can help with any specific point there.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
[MENTION=3153819]wirapuru[/MENTION]

Thanks really a lot for your effort, indeed!

But actually I prefer to start over with a plain system: I've TWRP in the same partition of Magisk and system is modified by AdAway, so I'm afraid to do a real mess of all...with more trouble then re-install. My terminal is pretty new and I haven't nothing important inside,so start again with no mistake for the experience I've done and with what I learnt here could be the best thing for me now.

All the best and see you here next

Ciao
[Xiaomi Mi A2 Lite Guides, News, & Discussion] wirapuru:
[MENTION=2957165]sinthemau[/MENTION] I feel you, I was at exactly your spot yesterday - I only didn't reset everything because of a lucky hit. Just a last note: I don't think flashing system/boot.imgs will ever ruin your TWRP, AFAIK it's on recovery partition. Anyways, good luck in there my friend - we always win if we're learning something :good:
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
[MENTION=3153819]wirapuru[/MENTION]

You are absolutely right! It's a hobby...and have to be lived like a funny and enjoyable way of learning always more! If something it's too difficult to accomplish, let's do it another way ;)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
[SOLVED]

[MENTION=5474836]BubuXP[/MENTION]

[MENTION=3153819]wirapuru[/MENTION]

[MENTION=5210740]ALL IN[/MENTION]terested in solving the OTA NON WORKING after Magisk installation issue (MI A2 Lite)

EUREKA!!!

Now all in my terminal is working. No need to flash stock ROM.

Problem was wrong system.img file distribuited here and there.

Just before re-flashing all, I had a "flash" idea: why not to try with the original plain vanilla ROM from Xiaomi Website? Could be that the extracted images from the OTA dump had "some" problem...so:

1) Find the "ACTUAL" ROM in the device (9.6.9.0 for me)--> Download link: https://en.miui.com/download-354.html but now there is the new 9.6.10.0

1) Put in adb folder the .tgz ---> .tar extracted image system.img

2 Flashed system.img (as you can see now image is mounted with sparse mode and all OKAY

3) Right but not sufficient:

OTA continued NOT BOOTING

4) DON'T PANIC: flash same way also the boot.img (from same OTA obviously, same slot ) --> no problem like before

5) Et voila: OTA runs, installed November patch flawlessly

6) Now follow the GUIDE by Bubu XP (this thread) --THANKS ;)

7) I re-installed Magisk like here explained very well, using the new ROM 9.6.10.0

All remained as before in my device, but

TWRP: the recovery was no more active

, don't know the exact working way of TWRP and Magisk, maybe same slot, one over the other or something similar, no problems, for now I skip

TWRP install and I look forward that someone more expert then me write here or in other thread how to do and have finally both TWRP and Magisk working

, if possible!

That's all

thanks to the OP and all in the thread
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
Just a question, silly maybe...

If I try to access Recovery Mode (Volum up + Power), I get a Black screen with a small Android robot and the writing "NO COMMAND MODE".

Does it mean that I'm without recovery (stock and TWRP)??????

Do I need to install at least the stock, but isn't all flashed now???

I forgot to say that I already have the TWRP Manager installed at the moment (only the Manager APP) but I was thinking it was not active...

Thanks
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Txatxiquesi:
When you are in the small droid screen, hold power button & press vol up to access stock recovery.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
It wasn't so difficult!!! What a shame for me!!!! Ahahahah

Thanks a lot indeed!!!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] arequenafu@gmail.com:
One help. I'd dustpie rom. I'd installed Magisk with fastboot comand "patched twrp.img", at firts all o.k., but when i reboot magisk not installed. There are 2 options, but any it's possible..... What do I have to do to be permanent root with magisk?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
I need to install Busybox but red that it resides in system/bin, so I think it should impact in the OTA updating this way (that I'm following now). So no way to go for Busybox and OTA update???

Are there other methods to add Busybox to my device?

Thanks
[Xiaomi Mi A2 Lite Guides, News, & Discussion] aslam_:
same with me. root gone after reboot :(
[Xiaomi Mi A2 Lite Guides, News, & Discussion] syndromtr:
successfully updated from 9.6.10.0 version to 2nd november OTA already released...

adaway caused an issue and OTA refused to load, i had to disable hosts inside adaway. and then 80 MB dl'ed and OTA done.

i wonder how that happened. because adaway setting systemless mode was checked!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] dedebekri:
You should also check systemless host option in magisk settings. This way when you uninstall magisk before OTA, adaway will also be disabled automatically.

Mi A2 Lite cihazımdan Tapatalk kullanılarak gönderildi
[Xiaomi Mi A2 Lite Guides, News, & Discussion] iflawlietasgod:
can anyone provide new original boot.img from 2nd november update (ver. 9.6.11.0) ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] chillout23:
Hello

I did it and all was fine until first reboot. After reboot I lost root privileges. Why that happened?

After point 6 (in 1st post) I jumped to point 10 and did all as I sould...
[Xiaomi Mi A2 Lite Guides, News, & Discussion] chillout23:
Tried to put patched in Download folder/internal storage because when I opened Magisk and tap to Install asked me to install patch. When I install this patch all finished well, but there is no root again. Does not work.

Where I goes wrong?

Tried again everything from step 1 to step 11 but not work.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
Just updated 2nd OTA November and all worked flawlessly...GREAT!

Now I need BusyBox installed, but I 'm afraid it could interfere with /system, because I see

it installs in /system/bin

, and

so should stop OTA updating

using Magisk de-activated and then re-activated.

Has somebody an answer for this issue ?

May it works the same?

... or do you know another way of installing BusyBox over/with Magisk and let all work flawlessly?

Thanks
[Xiaomi Mi A2 Lite Guides, News, & Discussion] blue4:
Patched boot for 9.6.11.0

https://drive.google.com/file/d/1UgLx40HRMoXI9DssWyn4HZy0Tn_KYR-D/view?usp=sharing
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sailay1980:
edit 11/18/2018

Nooop>> Even I have successful last update (9.6.10.0), this time ( 9.6.11.0) : flash system.img and boot.img from fastboot then again update. but failed.

note: I have download original "daisy_global_images_V9.6.10.0.ODLMIFF" from official sit. Then extract system and boot img. Used those files but update still fail.

:confused::angel::crying:
[Xiaomi Mi A2 Lite Guides, News, & Discussion] BubuXP:
Do a full ROM flash using the batch file "flash_all_execpt_storage.bat" to keep all your data, (or the bash script with the same name if you're using a Linux distro), then install Magisk and try again the update procedure.

I don't know why it didn't work, I literally did all the OTA updates since August, with Magisk installed, and I didn't get a single problem. One should avoid giving root access to file managers or any other app, because they could touch /system or even other partitions without the user knowing it.

The only apps I give root access are AdAway (but only after enabling the "Systemless Hosts" option in Magisk Manager), FX File manager (only to read some files, I don't enable the "Mount Read/Write" option, because doing this is enough to tamper /system) and Greenify. When you need to do something that involves other partitions that are not /data (e.g. changing a config file or installing a system app), you must always search for a Magisk module.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] ovejota:
Hi! I just followed this guide and was able to root the device. But once i reboot it, the root is gone. I have to flash the patched boot.img again. Does anybody know why? Everything was stock before doing this. On the 2nd November update.

EDIT: I forgot to press INSTALL on Magisk after booting from the patched_boot.img. Now everything's fine.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] mytowyn:
I was looking for the Mi A2 Patch & Boot Image that you posted on the #2 post... how do I get it ?

it is no longer here .

Thanks
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Sikumis78:
Why the bootup always stuch in colorful horizontal line each time I did this step (also flash system.img), and i had to reflash using the patched_boot.img to boot properly, I want to do OTA Update but the magisk keep saying Stock Backup doesnt exist.

----

Now, if you didn't follow this guide to install Magisk and you installed it in other ways, Magisk could alert you that he cannot restore the original boot.img (the boot partition) when you try to apply the OTA update.

To fix this, you can flash directly the vanilla (original, unmodified, untouched) boot.img taken from the point 6 of this guide, using those commands:

Code:

fastboot getvar current-slot

fastboot flash boot_? boot.img

the first command will tell you what is the current slot in use (a or b), the second command will flash the original boot into the phone, but you have to change the "?" in the command with a or b (i.e. the current slot that the first command provided).

Remember that the boot.img file version must correspond to the Android build version currently running in your phone.

If the OTA update will still refuse to apply, probably you changed something directly in the /system partition (for example you changed something in the build.prop without using a Magisk module to do this).

In this case you have to flash the original system.img in the phone with those commands:

Code:

fastboot getvar current-slot

fastboot flash system_? system.img

----

I did TWRP before, reflash using Original ROM, flash the patched_boot.img, install Magisk, everything work smoothly.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] chillout23:
People who was successful...do you followed step by step from 1 to 11, or jump from step 6 to 10?

I tried in both ways but cannot root.

100% did not made any mistake.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] hossman:
First, which build are you on - that will determine which img you boot.

If you already have bootloader unlocked , go to step 5. Install magisk and open it.

Then reboot to bootloader and fastboot boot patched_boot.img that corresponds to your current build.

Phone should reboot

Open magisk and it should ask to install

Choose direct install.

When it's done reboot.

Magisk should be fully installed.

If not, go back to bootloader and fastboot boot patched_boot.img again

And open magisk and install again (direct install)

Reboot

Hard to say where you are going wrong, but this guide works if you follow the steps.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Jordan~Kurniawan:
i think many people are still flashing the uploaded patched boot.img instead of just booting from it.

I don't know what's wrong with this guide,

it's simple and it works.

you need to patch the boot img by yourself from magisk. don't flash the uploaded patched boot.img, you should only boot from it.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] chillout23:
ok guys...many thanks for tips. Did it like you said already hahaha

will try again in next few days :)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] leviklein:
This tutorial helped me install magisk. Thanks OP!

I have a question, can I install pix3lify on this phone?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] chillout23:
I can see that many of you talked about active and inactive slot...what is that? And how to know which is active and which is inactive slot?

English is not my mother language and in many situations I cannot get conext of what you wrote...

thanks in advance
[Xiaomi Mi A2 Lite Guides, News, & Discussion] hossman:
A/B partitions explained here

https://source.android.com/devices/tech/ota/ab
[Xiaomi Mi A2 Lite Guides, News, & Discussion] chillout23:
Thank you very much.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Iforgetthings:
Worked first time on my A2 Lite -Thanks!

Used the pre-patched boot method, installed fine. Previously wasted many, many hours trying to install with TWRP as per the Magisk instructions, TWRP would not mount any storage so I could not find the zips to install them.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] deathdark:
I can also just recommend to read this article especially when coming from an A only device.

https://www.xda-developers.com/how-...ess-updates-affect-custom-development-on-xda/
[Xiaomi Mi A2 Lite Guides, News, & Discussion] tecnicomeiaboca:
Hi guys, thank you for this guide. When I flash the pached boot, downloaded or pached by Magisk, the phone boots properly, but whenever I try to open Magisk, it keep freezing and it don't open just stay in Magisk logo for ever and I can't install it. What am I doing wrong? I fallowed the guide step by step and tried both short and long paths. :confused:
[Xiaomi Mi A2 Lite Guides, News, & Discussion] thorin0815:
You are not supposed to flash the patched boot image. Just boot it with fastboot "fastboot boot patched_boot.img" and then install Magisk from inside Magisk.

Don't forget to flash the original boot image before.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] tecnicomeiaboca:
Yes, I did just boot it, I've copied the command from op, I just wrote it wrong in here, sorry. But it didn't work for me!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] downloadonlyaccount:
Sorry for asking this stupid question, but i kinda fu**ed up my phone last time while trying to apply an OTA with Magisk installed. It didn't boot properly after and I had to reflash the complete image via MiFlash (= wiping) to get the phone to boot again. I couldn't figure it out through google, so I wanted to ask you guys:

Is it possible to update my phone (through recovery/fastboot/etc.) WITHOUT data loss if the OTA updater app refuses to update because of any kind of alterations to partitions or whatever? So just skipping the "integrity check" and just update by maybe flashing it manually through command line (focus is on not loosing any data)?

Thanks in advance
[Xiaomi Mi A2 Lite Guides, News, & Discussion] merlin.berlin:
Yes you can. Check out this post

Thanks @PC295 for this guide
[Xiaomi Mi A2 Lite Guides, News, & Discussion] ohwarumbloss:
Hey and thank you so very much for your Guide! Daisy came today and 5 Minutes (or maybe 7 :p) it was rooted :)

I followed your Guide but am also curious, isn't it possible to

"fastboot boot twrp.img" and then install the Magisk 17.1 ZIP from booted Recovery? I didn't try because I was afraid to lose the System but that's how I did it with Mido and it always worked. Or is there zero access to internal or external Memory from TWRP?

Once again, thank you very much :)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Iforgetthings:
This is what I wasted so much time on before finding this guide. Twrp booted but could not access any storage / memory card / otg usb to find any zips, tried format data with TWRP as was suggested to remove encryption but phone wouldn't boot after and I had to wipe reinstall through factory recovery.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] csraxs:
Hi guys, this guide will work with the new beta of android pie?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] vapor_s04:
Guys, could you please help me. I was running Magsik on the latest OTA and all worked fine and so I checked some modules and decided to install the youtube mod. I installed the zip and rebooted in magsik and now I am stucking in a bootloop. :( Please help me, what do I have to do?

I did everything as mentioned in the guide (btw thanks for that). Do I have to boot again from the patched boot.img ? What do you recommend?

Thanks in advance.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] dedebekri:
I think you should boot with the un-modified boot.img, thus magisk will be disabled. From the magisk app, you should delete the faulty module, then reboot.

Hope this helps, let us know if it works for you.

Mi A2 Lite cihazımdan Tapatalk kullanılarak gönderildi
[Xiaomi Mi A2 Lite Guides, News, & Discussion] vapor_s04:
Hi. Thanks for your help. As I am not so familiar with all that stuff I will set my phon into fastboot mode, will download and unzip the original boot img in the directory where I have got all my Android-Tools and than I will boot with fastboot boot orginal_boot.img . Right?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] dedebekri:
Yup, good luck!

Mi A2 Lite cihazımdan Tapatalk kullanılarak gönderildi
[Xiaomi Mi A2 Lite Guides, News, & Discussion] vapor_s04:
Booted from the original .img and I am still stucking in a bootloop. Could cry. Hope we could fix it anyway, otherwise this module would have killed my phone. :(
[Xiaomi Mi A2 Lite Guides, News, & Discussion] dedebekri:
Try these please;

1. BOOT (not install) with this twrp: https://eu.dl.twrp.me/daisy/twrp-3.2.3-0-daisy.img.html

2. Install the zip file attached with twrp (which mounts the magisk as a drive, so that you can delete modules by hand from the twrp file manager)

3. Go to file manager, find "magisk", find & delete the corresponding module

4. Cross your fingers & reboot
[Xiaomi Mi A2 Lite Guides, News, & Discussion] vapor_s04:
It is working now again. What I did, was booting the patched image again, and now everything is working again. Hopefully. Anyway, Magisk isn't convincing me really. Adaway f.e. isn't working reliable, even I activated systemless hosts. Anything else I have to consider?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] karenz88:
After restarting the device I have the message "Magisk is not installed". I need to load patched_boot 9.6.11.0 by cmd with the command "fastboot boot patched_boot.img". Everything works again to restart the phone. Can you fix it ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] downloadonlyaccount:
Did you install it according to guide by hitting "Install" after booting patched image?

---------------

If someone's interested, the manual patching also works for the Pie update.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] OSAL:
I had the same problem