yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A2 Lite Guides, News, & Discussion] dedebekri:
Read the 1st post carefully.

There are files you should install (adb & fastboot) on your computer to let you operate on your phone.

Mi A2 Lite cihazımdan Tapatalk kullanılarak gönderildi
[Xiaomi Mi A2 Lite Guides, News, & Discussion] capajga:
If you have all the files in C:/adb folder try holding shift and right click inside the folder and choose open command window here.

From the pic you've sent, you were trying to execute the command from the wrong folder.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] emirul:
Ok i'll try that when i back home
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Armagau:
So, when I first installed magisk, there were no problems whatsoever.

But then at some point I have installed a module that caused my device to bootloop.

I couldn't use module uninstaller (for reasons still unknown it didn't work).

So, when that plan failed, I've just downloaded global images from here https://xdaforums.com/mi-a2-lite/how-to/fastboot-xiaomi-mi-a2-fastboot-images-t3824871

But that didn't work either - I was still stuck in bootloop. Then I have decided to boot stock boot.img first on A partition, then on B partition. And it worked!

However now, for some reason, I cannot instal magisk at all. I've tried both .zip file flashing and booting into patched boot image (I've tried doing so for both partitions - separately and together for A and B). Magisk just can't get installed - and even the direct install button doesn't appear in magisk manager. Anyone knows how to deal with that?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] BiG_FooT:
OTA v1.0.0.9 (May security patch) arrived on my wife's Xiaomi Mi A2 lite. Anyone who can upload a patched boot.img (patched with magisk 19.2)? Thanks in advance!

Edited to update to correct version
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Gregor250385:
May update is v10.0.9 and patched boot.img i found here

https://xdaforums.com/mi-a2-lite/how-to/fastboot-patched-boot-v10-0-9-0-update-t3931995
[Xiaomi Mi A2 Lite Guides, News, & Discussion] emirul:
Hey I've got a problem here. Can you guys guide me?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] MKKLR21:
You must not use Powershell. Right-click Windows start button, select "Run", type "cmd" and hold Ctrl+Shift while clicking OK.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Talha_Javed:
Hello Everyone!

If i unlock bootloader and install magisk, afterwards relock the bootloader, then still magisk will work or i need to keep the bootloader unlocked?

Is there anyway to install magisk without unlocking bootloader on A2 Lite?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
If you lock the bootloader with Magisk installed, you'll brick your phone.

Magisk needs a modified boot image, which you cannot have with a locked bootloader.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] mr_magreb:
Someone have this problem?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] kasth:
So, it works with Mi A2 jasmine?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Tech0308:
Method should but not the files
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
You're trying to boot a .zip file. That won't work. Is there a .img in that zip file? Boot that instead.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] emirul:
Does anyone has a stock boot image for may update
[Xiaomi Mi A2 Lite Guides, News, & Discussion] kasth:
Thanks!

That's what i thought, gonna try in the next few days and share the results here.

Edit: Success! Followed this guide on my A2 jasmine (update v10.0.0.9) without any problems and now i'm typing this from my rooted A2! :D Thanks!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] BubuXP:
I'm sorry that I disappeared and didn't update the guide, but work and real life events come before this. I cannot reply to some help requests I received in the past weeks too, sorry again.

And now that I have some little spare time, I prefer experimenting with the custom ROMs than working around the stock ROM.

If you feel that something in the guide needs an update let me know answering this message, and I will change it (if you want the updated .img in the first page please link me them so I can add them).
[Xiaomi Mi A2 Lite Guides, News, & Discussion] rob420p:
When I first got this device this guild was a godsend thank u.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] biasiman:
Thanx

I wish to thank you too it was very usefull indeed. Pity that the OREO PIE passage screwed up a bit everything ...:(
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sinthemau:
Thanks for coming back to thread.

For me with Oreo all was sound and safe, no problems at all with your suggestion, but with latest Pie update and Magisk 19.2 I'm no more able to ota update. So my way is flashing stock fastboot img with Miflash, pity that it often is slow in finding and have to be trusted who's the guy that extract it.

Maybe could be very useful to find here ASAP.

Thanks again for your work
[Xiaomi Mi A2 Lite Guides, News, & Discussion] kasth:
It is worthed to flash TWRP after the root process, just in case i come across a bootloop or something (after the installation of a faulty magisk module maybe), just to have some options to recover (for instance to unninstall Magisk modules from recovery)?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] suzaul:
bhh
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
If this is a question... Yes, it is worthwhile to have twrp so you can disable Magisk or modules that are causing boot failure. EdXposed really benefits from this since so many modules don't work right now.

FWIW: I have used TWRP 3.2.3 (official) forever, but had to change to 3.2.3-dees_troy (official) for 10.0.9.0.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] kasth:
Yes, that was a long and confusing question.

So, is there any downsides? If i flash TWRP i will not lose the ability to update by OTA or anything? Can i flash the original recovery back if needed?

That's a lot of questions, sorry. Thanks in advance!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
TWRP will prevent OTA just like Magisk does. You can remove it to do OTA. I use fastboot to flash the vanilla boot.

You can also fastboot boot the vanilla image as a way to temporarily disable Magisk too... Just thought of that.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] grufty47:
... in a mess again:

magisk deinstalled with images restored, no immediate reboot but unwanted reboot after some days whilst working in the rain , but device rebooted to OTA 10.0.9.0 without magisk (of course), newest Masik 19.3 installed, patched the 10.0.9.0 boot (or the stock boot)? Booted Magisk <patched_boot> but ended up in the dtb error from emirul in #864. Afterwards booted another <patched_boot_10.0.9.0.img> (27456 Kbyte) from this thread. Device booted, went to magisk and chose "Install to the other slot (b)" and reboot. Done, but ended up in the password error: "Enter password for android" though such a password has never been established. Do I need to flash the full ROM again and risk loss of data or is there any other fix?

regards grufty47
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
You should not have changed slots.

Use fastboot to change back. Boot patched and install (direct).
[Xiaomi Mi A2 Lite Guides, News, & Discussion] grufty47:
Correct, I should have chosen <direct install> (the recommended option). Okay after choosing the wrong option the reboot ended up with the dtb error. Changing the slot gave the same result. Attempting another <patched_boot_10_0_9_0.img> with 29878 Kbytes which was produced with magisk, eventually gave the <password for android> query, no chance to get into the system. Fastboot worked, so I successfully loaded twrp 3.3.1-dees_troy and wiped everything but the internal storage, nevertheless reboot gave a Factory reset (to 10.0.9.0). System rebuilt from Google cloud

---------- Post added at 02:30 PM ---------- Previous post was at 02:16 PM ----------

Correct, system recovered after factory reset, patching again with the 27.456 Kbytes <patched_boot_10_0_9_0.img> and chossing the direct install option. I think (after playing around quite a long time) a 29.878 KB produced by Magisk (!) gave the dtb error. In between, TWRP 3.3.1. (official) had been successfully loaded but wiping everything but the internal storage gave the factory reset. After recovering from all of this mess and getting back confidence into the stabel operation of my MIA2L I am considering to only temporarily load TWRP 3.3.1. At the moment everything appears to run perfectly (with Magisk 19.3, root on 10.0.9.0), let's wait and see.

Thanks,

Grufty47

---------- Post added at 02:36 PM ---------- Previous post was at 02:30 PM ----------

Correct, system recovered after factory reset, patching again with the 27.456 Kbytes <patched_boot_10_0_9_0.img> and chossing the direct install option. I suspect (after playing around quite a long time) a 29.878 KB produced by Magisk 19.2 (!) and also offered by the "Stock and Patched boot.img 10.0.9.0 (May)" thread may have given the dtb error. In between, TWRP 3.3.1. (official) had been successfully loaded but wiping everything but the internal storage gave the factory reset. After recovering from all of this mess and getting back confidence into the stabel operation of my MIA2L I am considering to only temporarily load TWRP 3.3.1. At the moment everything appears to run perfectly (with Magisk 19.3, root on 10.0.9.0), let's wait and see.

Thanks,

Grufty47
[Xiaomi Mi A2 Lite Guides, News, & Discussion] grufty47:
Now I am fine again...! After factory reset I successfully restored Magisk root on my MIA2L with a 27.456 Kbytes <patched_boot_10_0_9_0.img> (re #885). The data directory now showed 2 stock_boot images (*.img.gz), the original one dated 31.12.79, 19,26MB and a stock_boot created by Magisk, dated yesterday 11.06.19, 17,7 MB. Then TWRP 3.3.1_dees-troy and had it installed to both slots. Everything went fine... access to externalsd, Saving of partitions works, no problem with encryption (no passwords used). TRWP told me I am rooted but I was not, hence Magisk needed to be reinstalled. Another stock_boot*.img.gz file was created, 26,56 MB, obviously including the TWRP functionality. Unzipping the Magisk created stock_boot files give the size of the full boot partion (64 MB) Let's see what the effort will be at the next update to remove everthing and then to reinstall Magisk and TWRP again...

Thanks

Grufty47
[Xiaomi Mi A2 Lite Guides, News, & Discussion] kasth:
Nice, didn't know i could temporally boot TWRP (or anything) like that, good to know :good:

So, in my case i have installed Magisk following this guide. If i choose to flash TWRP now i just need follow the steps 12~14 normally when a new update comes?

Thanks!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
Yes... If you can install twrp without having to install Magisk again.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] kasth:
Thank you for the quick reply!

OK, gonna flash TWRP tonight.

One more question (to complement the last post):

Since i have a backup of my patched boot image, if i just want to remove TWRP i can simply flash it, since It was created before i installed TWRP?

Thank you for all your help! I'm doing my search and reading but better ask. :D
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
Yes. You can flash a vanilla or magisk-patched boot image backup to remove twrp.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] arana1:
Honest question here, what is the purpose of never disabling "Oem Unlocking" if your bootloader is already unlocked or keeping it enabled after you unlocked your bootloader?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] BubuXP:
You didn't read the page linked in the text you quoted...

You have to enable OEM unlocking to unlock bootloader. After the bootloader is unlocked, you can disable OEM unlocking. If you unlocked the bootloader, it means you are going to modify the original ROM somehow.

But if you erroneously lock the bootloader with the ROM in modified state, it won't boot anymore. And you can't unlock the bootloader again while OEM unlocking is disabled, and you can't go to the settings to re-enable it because the phone won't boot.

Now you have a bricked phone, hard to recover, because you disabled OEM unlocking.

I've tested myself this experience, I almost throw away my Nexus 5X but after some days of research, I found how to deep flash it.

And even if you don't want to unlock the bootloader you have to do enable OEM unlocking, because sometimes even official OTA updates could brick your phone in unrecoverable bootloop, and having OEM unlocking enabled could make your life way more easier in those cases.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] backoffdrew:
June Patched?? after booting patched and installed setprop persist.camera.HAL3.enabled 1 and setprop persist.camera.eis.enabled 1 via adb command, it is safe to relock bootloader again? And could I get the official update even if my bootloader is unlocked the only thing i will modify is to enable only the camera2api? Thanks for your respond..
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Talha_Javed:
I installed Magisk using the guidelines provided in this thread. Now when i try to install OTA update as per the guidelines given, it shows an error. Any suggestions to troubleshoot this? or any way of manual update?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] MKKLR21:
For me it worked without issues. Do you have any Magisk modules installed? If yes, uninstall before OTA.

As a workaround, flash latest system and boot image before OTA.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Talha_Javed:
Uninstalled magisk modules but the result is same. Where to get latest system and boot image files? Any link available?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] mr_magreb:
I'm on 10.0.9, here is the patch and not patch boot https://tinyurl.com/y6m57jux.

I loaded the 10.0.9 boot ( without patch ) uninstall Magisk, but when i try to load the OTA, it's fail.....
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
It you fastboot flash a vanilla boot.img you don't need to uninstall Magisk.

Uninstalling Magisk just restores the image it backed up when you installed it. There's no guarantee that you end up with a vanilla boot.

If you've got a computer, I wrote up instructions for OTA when you need to restore a vanilla boot: https://xdaforums.com/mi-a2-lite/how-to/10-0-4-0-to-10-0-7-0-ota-keeping-magisk-t3916863
[Xiaomi Mi A2 Lite Guides, News, & Discussion] georgs_town:
Hey, thanks for that guide! I'm stuck finding the newest Rom (10.0.10.0) that I have installed, it's not on the official Miui page and I could only find it on some shady page. Don't really want to take chances...

A link would be much appreciated!

cheers
[Xiaomi Mi A2 Lite Guides, News, & Discussion] mr_magreb:
I have done the "fastboot flash vanilla_boot.img" , i found it here https://is.gd/Q1wuD7.

But the OTA refuse to install...

Need i the twrp in anyway?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
You want vanilla for your current version, not 10.0.10.0 (the ota you are installing). I'm going to assume you are running 10.0.9.0.

You don't need twrp if you don't want it.

If the ota won't install when you've got a vanilla boot, I guess your system image has been modified? Apparently some root things can do this.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] mr_magreb:
Right, I did it.

Well, I booted from the fastboot with https://is.gd/Q1wuD7, but the OTA didn't load again...

Is it the "vanilla_boot" that you mean in my link?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
The OTA must see a vanilla boot and system in the current slot.

You need to flash the vanilla image to the current boot slot. Then you need to boot the patched image so you can install Magisk after the OTA writes the new boot to the other slot (before you reboot to that slot).
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sivis1:
hi, which boot.img to use if my phone is 10.0.10.0?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] mr_magreb:
As you guide speak, i load the vanilla_boot on the current slot ( b ) and reboot the device in patched_image.

When i try to apply the OTA, it's fails again.....
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
Then it must be the system image. I don't know if the ota is nice enough to write an error into the adb logs confirming the problem it has...

It does! I've been delaying the 10.0.10 OTA because I've not been near my computer, I just checked and when it fails it puts this into the adb log. In my case boot is the problem.

07-01 06:52:38.470 E/update_engine(935): [0701/065238.470683:ERROR:delta_performer.cc(990)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
07-01 06:52:38.470 E/update_engine(935): [0701/065238.470931:ERROR:delta_performer.cc(995)] Expected: sha256|hex = A4AD686D7BF628486668446221D0089BF5915DBC1158C83D30A06222FE7D2ACB
07-01 06:52:38.471 E/update_engine(935): [0701/065238.471002:ERROR:delta_performer.cc(998)] Calculated: sha256|hex = 4CADBE88EC1C019913A0B416EB9031840D4BA6B2287A3FC814A2B8B7F9871F7D
07-01 06:52:38.473 E/update_engine(935): [0701/065238.471072:ERROR:delta_performer.cc(1009)] Operation source (offset:size) in blocks: 0:5221,5461:405,5869:1,5873:343,6221:589
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473233:ERROR:delta_performer.cc(1191)] ValidateSourceHash(source_hash, operation, source_fd_, error) failed.
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473340:ERROR:delta_performer.cc(298)] Failed to perform BROTLI_BSDIFF operation 187, which is the operation 0 in partition "boot"
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473411:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
07-01 06:52:38.739 E/SystemUpdate(15410): [Execution,NonStreamingAbApplyAction] Installation failed with error code: 20.

Use an app like Matlog or adb log from your computer to read your adb log and confirm the issue the OTA is having.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Etherwavelenth:
sir do we have 64bit adb ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
If you need a binary, it's a standard part of the android SDK.

https://www.xda-developers.com/quickly-install-adb/
[Xiaomi Mi A2 Lite Guides, News, & Discussion] sebadamus:
Worked flawlessly (I screw it some first, installed TWRP... slot a slot b... :confused:, reinstalled 10.0.10.0 with flash tool and left TWRP away, just magisk and works rooted fine :good:)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] grufty47:
I have also problems trying to OTA update my MIA2L from 10.0.9.0 with Magisk and TWRP. The method described in <Advanced OTA keeping Magisk and TWRP (needs a computer)> failed, perhaps of unadequate (mixed?) vanilla (10.0.9.0) boot or patched boot files. Therefore system recovered by flashing official 10.0.9.0 boot and system file of the fastboot ROM from the MIUI website, OTA failed anew! Even Flashing the official 10.0.9.0 fastboot ROM with MiFlash20181115 failed, Flash Log says error erasing boot_a and no <Android_Smartphones\Xiaomi'> (???) file:

....

[20:41:10 adb696bb0505]:err:erasing 'boot_a'...

[20:41:10 adb696bb0505]:err:eek:KAY [ 0.025s]

[20:41:10 adb696bb0505]:err:finished. total time: 0.025s

[20:41:10 adb696bb0505]:info:$fastboot -s adb696bb0505 flash modem_a D:\Android_Smartphones\Xiaomi MI A2 Lite\daisy_global_images_ V10.0.9.0.PDLMIXM_20190514.0000.00_9.0_f9d0c739e0\daisy_global_images_V10.0.9.0.PDLMIXM_9.0\\images\modem.img ||

[20:41:10 adb696bb0505]:err:error: cannot load 'D:\Android_Smartphones\Xiaomi': No such file or directory

[20:41:10 adb696bb0505]:info:"Flash modem_a error"

[20:41:10 adb696bb0505]:error:error: cannot load 'D:\Android_Smartphones\Xiaomi': No such file or directory

[20:41:10 adb696bb0505]:process exit.

[20:41:11 adb696bb0505]:flashSuccess False

....

I think I closely followed the instructions on using the tool. Tool appears easy to use but did not work for me! What a pitty!

Eventually I flashed the official 10.0.9.0 boot.img and 10.0.9.0 system.img again, however, still stuck with the same OTA error (Installationsproblem). hence I had Magisk create the patched boot.img from the official 10.0.9.0 boot.img and installed it by Magisk. Now I am still on 10.0.9.0 rooted with Magisk but no idea what the installation problem is. Any clue?

Regards, grufty47
[Xiaomi Mi A2 Lite Guides, News, & Discussion] grufty47:
Problem solved: folder <daisy_global_images_V10.0.9.0.PDLMIXM_9.0> needed to be copied into the MiFlash20181115 directory for the flash process to work (else problem with path lenght?). Flash_all_except_storage_bat selected, executed, but in the end reported red=failed. However, MIA2L rebooted ok, OTA update to 10.0.10.0 completed flawlessly, full storage available, root gone, magisk disabled. Ok, not too bad but how can I get the 10.0.10.0 boot.img?

Thanks

grufty47
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Tech0308:
Here's a link to 10.0.10.0 patched. I used it after forgetting to reinstall magisk while updating

https://drive.google.com/file/d/1ZSqAAhxgGxC8Swv8MMm3zx0uBOSzHVoF/view
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
FWIW: I finally got around to attempting the 10.0.9.0 to 10.0.10.0 OTA. I don't know why, but besides boot (which I already knew was modified), the OTA also complained about system and vendor. I saw this in the logcat.

Which is strange because I haven't explicitly done anything to those partitions and I got to 10.0.9.0 via OTA. I had the fastboot image so I flashed those partitions and that allowed the OTA to install. I could have just flashed the 10.0.10.0 fastboot I guess, but I was curious to see what the OTA wanted.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] grufty47:
Thanks a lot, the patched_boot worked flawlessly and granted root! Magisk 19.3 did the direct install. Unfortunately I got so courageous by this success that I went on installing a Magisk module for <twrp retention on OTA for a/b> Installation of twrp_3.3.1 dees-troy followed with no problems but, as expected, removed the magisl root. As far as I remember I then installed Magisk to the inactive slot... and the desaster started: Password issue, no chance to load android. Same issue on the the other slot. Flashing with V10.0.9.0 boot and system images failed. Flashing with original V10.0.9.0 with flash_all_but_storage failed, still the password issue. Flashing with original V10.0.9.0 with flash_all failed, but the device recovered with factory settings. Ok, system rebuilt with Google and saved recovery, OTA to V10.0.10.0 done and Magisk rooted with the patched_boot once again. Puh, a lot of work. Happy again but for the time being I don't dare to install twrp again (though there were no problems on V10.0.9.0).

Any clue why the flashing process with with V10.0.9.0 system and boot images did not work and the MiFlash20181115 proceeds flashing until the process ventually completed failed=red (after 190s). However, the flash_all at least gave the factory setting to start anew.

Greetings

grufty47
[Xiaomi Mi A2 Lite Guides, News, & Discussion] a1291762:
Oh man, I feel your pain. I had to factory reset a few times when I started with this phone. Took me a good few hours each time to get everything back.

If you installed to inactive slot Magisk would have changed your active slot. You probably needed to change the slot back. This can be done from fastboot.

You should have been able to fastboot flash the patched boot image you were running before you installed twrp to get your system booting again.

I don't know why this failed, unless booting after Magisk changed your active slot somehow broke your data partition (encryption).

I don't have Windows so I've only used fastboot to flash stock. Your fastboot log has no errors.