yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
Sounds like you flashed the whole ROM instead of just the kernel (it's just as good of a fix, but a bit extreme imo). For April, go to settings > about phone and look at the system security level patch (1st April is the latest one). For rooting again just use the guide in the first post of this thread again (boot using patched boot, open magisk and direct install). I would also give a video of how it's done but I'm not allowed to post URLs yet.
[Xiaomi Mi A1 Guides, News, & Discussion] Gyro01:
It says April 1st in Android security patch leve

The reason I ask how to root it again is because right now in Magisk app the install button is available, maybe I can(and should) install it without the fastboot process?

it's already the 16.0 version so i don't know lol

o
[Xiaomi Mi A1 Guides, News, & Discussion] BarrelRoll1:
How did you even root it in the first place? You can't root without the fastboot process (or alternatively TWRP but that's unnecessarily more complicated), if you hit "install" in the screen you sent your only options will be "download zip only" and "flash boot image"

Go on YouTube and search for a video titled "Root Xiaomi Mi A1 without disabling OTA! WITH WORKING PROOF!" posted by Dhananjay Bhosale. What you need to do is shown there
[Xiaomi Mi A1 Guides, News, & Discussion] Gyro01:
The phone was rooted > I tried to install updates, so I uninstalled magisk , when the update proceeded to stage 2/2, via magisk I installed it on slot 2>then the bootloop problem began... that's why I still have it. and that's why I'm asking weather I should just click install or do the fastboot commands

*edit*

I just installed it with fastboot and it's rooted ! thanks

I noticed that I have all the moduls from the last time, also after I restarted the phone the first screen's warning (device can't be checked for corruption") is in white and not black
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
Yup that's exactly how it happened to me too. I don't know how you rooted it before that though, I assume you just followed the instructions in the first post. And yes, the modules stay around, they don't get deleted when you change the boot. Only thing I don't know what to say about is the boot screen warning - it always had a white background for me
[Xiaomi Mi A1 Guides, News, & Discussion] Gyro01:
true
[Xiaomi Mi A1 Guides, News, & Discussion] saptadeep.17:
Will it void the warranty?
[Xiaomi Mi A1 Guides, News, & Discussion] ozgurubuntu:
Hi, root my phone this methot and install twrp recovery. When the ota update arrives, can i flash twrp ota update? Because magisk ota methot (step 1 uninstall magisk, step 2 intall second slot etc) bootloop failure i guess..

Sorry for my English
[Xiaomi Mi A1 Guides, News, & Discussion] LabWillem:
Unrooted after reboot

Hi,

May be I missed it: but has anyone came along this problem:

After reboot magisk is uninstalled (manager is still present) and device is unrooted.

it worked fine in the beginning.

Becouse I had changed the system partition I could unroot with Magisk but OTA still did not work after that.

So I flashed ROM (keeping settings) with MiFlash tool.

Then OTA worked again.

Now I tried to root again > (April boot.img) but after second reboot device is unrooted..... as explained in first sentence.

Anyone?
[Xiaomi Mi A1 Guides, News, & Discussion] Jfelips:
Every month/update will I need a patched boot.img ?? I'm on April update rn
[Xiaomi Mi A1 Guides, News, & Discussion] LOswaldoRO:
So, the bootloader keeps open, and still OTAs keep arrive even when this happen? With the bootloader open?

I mean, OTAs, to be installed successfully need the bootloader closed, does not? :confused:
[Xiaomi Mi A1 Guides, News, & Discussion] Tiemichael:
Based on my experience over the last few months there is NO need to lock the bootloader before OTA upgrade

---------- Post added at 02:52 PM ---------- Previous post was at 02:51 PM ----------

In general yes!

You can either download, or create yourself (either within Magisk Manager, or via TWRP)

---------- Post added at 02:52 PM ---------- Previous post was at 02:52 PM ----------
[Xiaomi Mi A1 Guides, News, & Discussion] jvcosmo:
Beautiful! Thanks!
[Xiaomi Mi A1 Guides, News, & Discussion] Sb2100x:
Yes it worked for me first time . But then I removed root from my device Now this process does not work for me .
[Xiaomi Mi A1 Guides, News, & Discussion] EkBalam:
Same problem. Unrroted after root.

I have the same problem as some of you.

Try rooting with the patch of January and April and always after restarting lost the root.

Then I decided to start from the beginning. I installed the stock rom with the April patch, followed one by one the steps and obtained the same result
[Xiaomi Mi A1 Guides, News, & Discussion] Dezqo:
I do not understand how any of you still have problems with this...

If anything ever goes wrong or if the ota fails, just use the "flash_all_except_storage" script! Solves every problem...

---------- Post added at 11:26 AM ---------- Previous post was at 11:24 AM ----------

No... an open bootloader has nothing to do with OTAs!

And even if it did... you can just lock the bootloader again if you want.
[Xiaomi Mi A1 Guides, News, & Discussion] bobola:
after i install OTA

Do I need to reflash the new patch img to get root back?
[Xiaomi Mi A1 Guides, News, & Discussion] HPRG:
Patch for May Security update?
[Xiaomi Mi A1 Guides, News, & Discussion] falseidol:
Can't load Magisk Manager from patched boot image

I tried following the instructions, but Magisk Manager won't get past the title screen with the mask on a patched boot image.

It loads fine when I try to run it without booting with "fastboot boot patched_boot.img."

I tried uninstalling and reinstalling, as well as trying an older version of Magisk Manager. Has anyone encountered this issue? Thank you!
[Xiaomi Mi A1 Guides, News, & Discussion] joemski:
May img. pls
[Xiaomi Mi A1 Guides, News, & Discussion] cubebon:
Bootloop after updated to May OTA

How to fix bootloop after update ? please help

Edit : i fix this with flashing stock april image with MiFlash
[Xiaomi Mi A1 Guides, News, & Discussion] jvcosmo:
Boot loop after may update... had to flash april again...
[Xiaomi Mi A1 Guides, News, & Discussion] Subhajitdas298:
Please provide patched_boot for may
[Xiaomi Mi A1 Guides, News, & Discussion] GeeOctz97:
I still can't update my A1 as it gives me the "Couldn't update - Installation problem" message halfway through step 1. Been like this since months ago when I was still on February security patch.

Now I have April security patch (installed via full-flashing, not OTA), May update is here, and it still gives me this error.

Any help would be GREATLY appreciated since I bought this phone thinking I would get regular update and this method appears to give a way to get root WHILE still getting regular updates.

Thank you
[Xiaomi Mi A1 Guides, News, & Discussion] HPRG:
Did you try uninstalling Magisk Module completely before updating? or did you opt to use the Restore option?
[Xiaomi Mi A1 Guides, News, & Discussion] XAB235:
May patched img? Thanks
[Xiaomi Mi A1 Guides, News, & Discussion] Bennybtc:
Please provide steps to update our phone without losing magisk/root access
[Xiaomi Mi A1 Guides, News, & Discussion] jvcosmo:
I've followed the guide from the first post about when OTA arrives:

https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md#ota-installation-tips
[Xiaomi Mi A1 Guides, News, & Discussion] HPRG:
Hmm there seems to be an issue with that method with this recent update. That's why I always go for the complete uninstal option . Coz it's much safer. Hope someone provides the latest patch.
[Xiaomi Mi A1 Guides, News, & Discussion] jvcosmo:
It works if you copy the latest boot.img to internal and apply magisk patch, then flash?
[Xiaomi Mi A1 Guides, News, & Discussion] HPRG:
No what I meant was I'd rather uninstall the tool completely and use the phone without magisk until the patched img gets released.
[Xiaomi Mi A1 Guides, News, & Discussion] jvcosmo:
I dont care much about the update. If a patched image apears, i will update and aplly the new patch. Until then, i will use my april rooted! :D
[Xiaomi Mi A1 Guides, News, & Discussion] HPRG:
Same here. ?
[Xiaomi Mi A1 Guides, News, & Discussion] XAB235:
as far as i understood, this update is preparing the Mi alA1 for migration to 8.1. So that s could be a reason about problems with OTA
[Xiaomi Mi A1 Guides, News, & Discussion] xabylr:
Recover after May update Magisk bootloop

It's even easier. You only have to download recovery-3.2.1-2-oreo.img twrp recovery boot image for oreo from here, then boot using

fastboot boot recovery-3.2.1-2-oreo.img

and then swapping the current slot from the Reboot option.

Then the system boots up normally to the prior version telling you that the update has failed.
[Xiaomi Mi A1 Guides, News, & Discussion] 003cyriac:
Had bootloop after may update, had to flash april then update to may patch. Then booted up twrp and flashed magisk 16.4,root working normally!!

Any ideas about dumping boot.img!?
[Xiaomi Mi A1 Guides, News, & Discussion] autorage:
It seems with May update data gets wiped when unlocking the device
[Xiaomi Mi A1 Guides, News, & Discussion] pantezuma:
I read many posts in another forum of people complaining that after May update, if you open the bootloader device data will be wiped.

As you flashed TWRP I'm assuming you opened the bootloader.

Did you have any issue with data wiping?
[Xiaomi Mi A1 Guides, News, & Discussion] rox5550:
Xiaomi Mi A1 May Patched Image

Xiaomi mi A1 latest patched boot image of May update.
[Xiaomi Mi A1 Guides, News, & Discussion] 003cyriac:
Yes it did erase my data, I had backup?
[Xiaomi Mi A1 Guides, News, & Discussion] NazwanBinMtNoor:
Hi,

I hv rooted my phone using this method (unlock bloader + root via magisk) and i install gcam + fix cam lag + google lens + fprint wakeup + enable nav bar and disable capacitive button + change font + ytube vanced

Now i need to customize status bar, try to find some method on xda, i found it must use subtratum and andromeda.

Q1 : Did we hv other method to customize status bar?

Q2 : Xposed framework need twrp to flash..can i boot to twrp and flash xposed framework? (i dont install twrp for waiting oreo 8.1)..i need xposed framework to install gravity box 3.1.5

Q3 : i boot to twrp n try flash twrp..but it failed..system say it must restore boot.img...do i need to unrooted my device, flash twrp n root again?
[Xiaomi Mi A1 Guides, News, & Discussion] sebin619:
i have tried this method and I got ota update. But it cannot install and it shows an error
[Xiaomi Mi A1 Guides, News, & Discussion] VolpeXDA:
So you uninstall Magisk, apply the update, reboot and the phone is wiped? :eek:

Which method is best for restoring the data? Titanium? Or an ADB backup? Thanks
[Xiaomi Mi A1 Guides, News, & Discussion] hieron123:
Somehow my stock boot.img backup is gone and I cannot uninstall in order to install OTA.

I recovered the boot.img file from the stock rom image. Where and how do I place it so that magisk can flash back the stock boot image?

Or should I fastboot flash stock boot.img then OTA then install magisk again? If so what is the full command for fastboot flash boot.img .... To get it to the right location

Verstuurd vanaf mijn Mi A1 met Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] pantezuma:
I haven't tried it yet buy maybe we can flash April rom via fastboot without locking bootloader.

If you take a look at the batch file provided, the last line is intended to lock it after the completion of flashing.

Not sure if OTA will work that way.

So what I would do:

1) Completely uninstall Magisk.

2) Flash April rom with that modification

3) Try to update to May (bootloader should still be unlocked).
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
From what I understand, the phone is wiped if you're unlocking the bootloader for the first time, not if it's already unlocked when you update
[Xiaomi Mi A1 Guides, News, & Discussion] biswasrahulraja:
mi a1 security patch

plz upload may security patch
[Xiaomi Mi A1 Guides, News, & Discussion] demencia89:
I was running 8.0 feb update with magisk and root. Disabled magisk to install march update but it kept failing. Magisk stayed uninstalled. Just updated to May update with no issue, is there a way I could get back root with magisk now?

---------- Post added at 05:09 PM ---------- Previous post was at 05:08 PM ----------

I'm already on may update, can I use this boot.img to install magisk?

Latest edit: Well I just fastboot the patched img from the comment I replied, reboted, run magisk installer and install on direct mode, rebooted and I'm now rooted on may update. Haven't loss any data or whatever. I'm loving this freaking phone. Flawless experience.
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
May patched img released

Download from here
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
The filehost says "for the Samsung Galaxy S5(G900H)", is there a mistake?
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
Check now???
[Xiaomi Mi A1 Guides, News, & Discussion] cubebon:
my data get wiped, how to restore them ? i didnt backup earlier
[Xiaomi Mi A1 Guides, News, & Discussion] Potus ThePlant:
Safety net is failing even though I followed the steps exactly as described. What can I try to fix it?

---------- Post added at 02:24 AM ---------- Previous post was at 02:23 AM ----------

You can't.
[Xiaomi Mi A1 Guides, News, & Discussion] pantezuma:
My suggestion:

If you are rooted and unable to update to may do the following:

1) Fully uninstall magisk

2) Flash via fastboot april rom but first edit batch file to avoid locking bootloader at the end of the process (already tested and working)

3) Update to may (tested and working)

4) With bootloader unlocked your data won't be wiped and you'll be able to root with the method of your choice

That's what I did and is working perfectly

Anyway, I'm not responsible for any data loss!
[Xiaomi Mi A1 Guides, News, & Discussion] Didit87:
how to edit the batch file ?
[Xiaomi Mi A1 Guides, News, & Discussion] Cr3sc3nt:
Just open file in text editor and delete the 2 lines that refer to " OEM lock "
[Xiaomi Mi A1 Guides, News, & Discussion] sgr2sagar:
DATA LOST

My all data is deleted while using command fastboot oem unlock in fastboot mode. It's happened after May 2018 update. Please help. I have lost all my Important data. :(

---------- Post added at 07:02 AM ---------- Previous post was at 06:36 AM ----------

Same thing happened with me :(
[Xiaomi Mi A1 Guides, News, & Discussion] Didit87:
what 2 line to delete ?

fastboot %* reboot bootloader

ping 127.0.0.1 -n 5 -w 1000 > nul

fastboot %* set_active a

fastboot %* oem lock || [MENTION=279333]ECHO[/MENTION] "lock error" & exit /B 1

fastboot %* reboot
[Xiaomi Mi A1 Guides, News, & Discussion] Midomad:
fastboot %* oem lock
[Xiaomi Mi A1 Guides, News, & Discussion] SystemDoctor:
Oddly enough, I flashed the Stock Oreo firmware which has the April Security Update, then installed Magisk using this guide and after through some setup, updated to the May Security Update through the guide linked here but ended up in a bootloop for some reason. I'll try and reflash again, this time the complete May Update from the very beginning.
[Xiaomi Mi A1 Guides, News, & Discussion] 94burns:
Has anyone been able to successfully update to may from April while rooted using the guide in this post? I am currently away from a computer and the update has been popping up for days but I don't want to try it and something goes wrong.
[Xiaomi Mi A1 Guides, News, & Discussion] ngohoainam:
same with me! my phone is may update. when i use patchboot for may to root. my phone unlock bootloader and wipe all my data on my phone storage! :confused: i lost my message and data (pic, videos,....:( )
[Xiaomi Mi A1 Guides, News, & Discussion] sgr2sagar:
Do you have any idea to get those erased data back ? I need that data very badly. I have tried all data recovery software. But none of them worked. :(
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
I'd advise against it - I tried it that way when updating from March to April and got a bootloop. You're safer to restore images, let it update and then reroot it using the direct install method. Install in second slot is unreliable (though you can recover from it easily without reflashing anything if you bootloop) and not really worth the risk when you're away from a PC
[Xiaomi Mi A1 Guides, News, & Discussion] Cr3sc3nt:
Unless you're willing to spend some serious cash to send your phone to a data recovery service center, it's gone. I've always kept all important things on the sdcard slot. I'm not hurting on space, 64GB it plenty, but I always have an SD card available, just in case.
[Xiaomi Mi A1 Guides, News, & Discussion] Christopher88:
Problem with OTA

Hello, i rooted my mi a1 about a week ago, and today i saw that may 2018 security update rolled out, and when i try to update i get an Installation problem, anyone can help? im kinda new to this whole thing.
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
Open Magisk, click uninstall and then "restore images". After that update, and when you're done get the May patched boot from the first post in this thread and root again like you did the first time
[Xiaomi Mi A1 Guides, News, & Discussion] Christopher88:
Thanks a lot for the fast reply, ill try that later, i thought though that this method doesnt block OTA.. anyway cheers
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
No problem! It's said it doesn't "block" OTA because with any other root method you will not be able to have OTA at all and be forced to flash manually - Magisk lets you have it both ways, just needing this little extra work during updates
[Xiaomi Mi A1 Guides, News, & Discussion] Christopher88:
i dont know if youre still here, i just unistalled through magisk as you said are restored images but still cant update, any ideas?
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
I was just about to leave, but that's weird, it should update fine after this. You did it like shown here, right?
[Xiaomi Mi A1 Guides, News, & Discussion] Christopher88:
i did, but i had first tried to install before uninstalling, and in the video the guy said not to press the button.. idk ... im getting frustrated :(
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
Did you try rebooting and trying again? It might still act like you're with the old boot image, though I've never had it happen myself so not quite sure about it
[Xiaomi Mi A1 Guides, News, & Discussion] Christopher88:
Yes i rebooted, and i checked with aroot checker and im not rooted anymore...
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
Really weird. Flashing the stock boot manually might help, anyone else after me will probably say to flash the whole ROM. I've uploaded the stock April boot here, try booting with it through fastboot to be sure it works, if it does do:

fastboot flash boot_a boot_9.5.10.0.ODHMIFA.img
fastboot flash boot_b boot_9.5.10.0.ODHMIFA.img

(this is just for the example, you can rename the file to stock_boot so it's easier for you - the name doesn't matter)

Had to use that today actually after losing my stock image backup from a mishap when I installed the April update which made me unable to restore before updating so I can safely say the commands work without any issues.

I'm signing off now so I won't be around to reply for a while
[Xiaomi Mi A1 Guides, News, & Discussion] Potus ThePlant:
Re-locking the bootloader isn't necessary?
[Xiaomi Mi A1 Guides, News, & Discussion] TheBigBoom:
Not at all, there is no reason to re-lock it. In fact, it would be a bad idea because as of the May update unlocking the bootloader will wipe your phone
[Xiaomi Mi A1 Guides, News, & Discussion] ninocass:
Looks like I have a change in my /system/ partition:

05-25 16:17:34.167 901 901 I update_engine: [0525/161734:INFO:delta_performer.cc(365)] Applying 5505 operations to partition "system"
05-25 16:17:34.178 901 901 E update_engine: [0525/161734:ERROR:delta_performer.cc(1057)] 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.
05-25 16:17:34.178 901 901 E update_engine: [0525/161734:ERROR:delta_performer.cc(1062)] Expected: sha256|hex = A49A2A40C978D0553FDE68E2FC9B56A8E6BE4A78946EEF9A63C4611367DAFCD6
05-25 16:17:34.178 901 901 E update_engine: [0525/161734:ERROR:delta_performer.cc(1065)] Calculated: sha256|hex = 3F40FC1523D9D85E60240282B64549D6FA925FD08D6F4AF26A60814ECA98E20A
05-25 16:17:34.178 901 901 E update_engine: [0525/161734:ERROR:delta_performer.cc(1076)] Operation source (offset:size) in blocks: 0:2,196:1,199:1,201:1,203:434,16381:73
05-25 16:17:34.178 901 901 E update_engine: [0525/161734:ERROR:delta_performer.cc(1242)] ValidateSourceHash(source_hasher.raw_hash(), operation, error) failed.
05-25 16:17:34.179 901 901 E update_engine: [0525/161734:ERROR:delta_performer.cc(289)] Failed to perform SOURCE_BSDIFF operation 1255, which is the operation 0 in partition "system"
05-25 16:17:34.179 901 901 E update_engine: [0525/161734:ERROR:download_action.cc(274)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing

Any tips on how to track down the change? I've flashed the stock boot manually. Could I download the full ROM and then do a diff between the ondevice /system/ and the ROM?
[Xiaomi Mi A1 Guides, News, & Discussion] pico977:
Hi,

I'm trying to update my phone, I opened Magisk and I clicked uninstall and then "restore images".

A this point Magisk isn't installed.

Now I try to update android, but the system update is blocked at step 1 of 2.

Do you have any idea?

many thanks
[Xiaomi Mi A1 Guides, News, & Discussion] Drunkoslav:
I installed Magisk trough this thread too and after restoring images and doing all steps to enable OTA May update, it still says "installation problem" after few seconds in step one. Luckily, i didn't get brick or bootloop but i would really appreciate some easy solution to aply May update. :(
[Xiaomi Mi A1 Guides, News, & Discussion] bobola:
Yeah, I m not updating to May yet.

The instruction to update is not very clear.

If anyone with successful upgrade can clear up the instruction that would be great.
[Xiaomi Mi A1 Guides, News, & Discussion] KermitNinja:
I just watched the video you are referring to. I'm on latest security update(May) and now that my phone is unrooted, I wanted to root it back. My question is, do I have to command "fastboot oem unlock" since my device bootloader is still unlock? Or I just have to proceed to "fastboot boot patched_boot.img" instead? I know I'm such a noob I'm so sorry for that. Hopes you reply though
[Xiaomi Mi A1 Guides, News, & Discussion] rox5550:
Magisk boot restore

Simply unzip this file which i attached earlier, switch on ur mi A1 in fastboot boot mode, from pc open command prompt (make sure u put this patched_boot.img in adb folder of ur pc/laptop).

Run following commands

Fastboot devices hit enter(to check whether ur device is connected or not)

If connected it will show u ur device.

Fastboot boot patched_boot.img hit enter

It will start booting ur device, now u have magisk magisk root enabled, with the help of magsik manager click on install thn select direct method it will start downloading a zip file once done wd downloading masgik manager start installing that zip.

During this process on mobile screen it will show u stock boot image found

Backing up stock boot imgae etc.

That means magsik manager successfully backed up ur stock boot image for restoring images process in future. No need to do anything more once done restart ur mobile. Now u have permanent magisk root.

To check ur stock boot image with the help of any root file explorer open device folder and under data their is a file namely stockboot.zip