yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Guides, News, & Discussion] boka18:
I'd love to see the July patch boot image
[Xiaomi Mi A1 Guides, News, & Discussion] polandro:
Did you (or anyone else) find a solution to this?
[Xiaomi Mi A1 Guides, News, & Discussion] RedNas74:
I did the same thing. I rooted by flashing magisk through twrp. Everything works fine.
[Xiaomi Mi A1 Guides, News, & Discussion] Mihavey:
Can u explain me how to do this step by step? Thank you
[Xiaomi Mi A1 Guides, News, & Discussion] Sly2031:
My WiFi was only broke because I installed the Franco Kernel, I found it later to be that problem, not this particular way to root our phone
[Xiaomi Mi A1 Guides, News, & Discussion] divided by zero:
Awesome, thanks heaps! Was just stuck on the Wifi issue and this did the trick.
[Xiaomi Mi A1 Guides, News, & Discussion] arik100:
Is there a problem with WiFi?

Just did fastboot boot July patch,

WiFi doesn't work?
[Xiaomi Mi A1 Guides, News, & Discussion] pantezuma:
Sadly since they removed the option "Apply to second Slot After OTA" from Magisk Manager it's not that straightforward, so:

1) Fully Uninstall Magisk from Manager or flashing uninstaller from TWRP

2) Install OTA normally.

3) Reinstall Magisk.

Cons: You will loose all your settings and modules in magisk and will have to reinstall.

Lets hope developer adds the removed option soon enough.
[Xiaomi Mi A1 Guides, News, & Discussion] arik100:
so i rebooted, and wifi is back

guess what, root is finished...

should i patch the boot again?

should i flash TWRP and then flash Magisk? i guess OTA will be over...
[Xiaomi Mi A1 Guides, News, & Discussion] Parnas72:
You don't need to fully uninstall Magisk , just "restore images" from Magisk Manager, apply the OTA update and then reinstall Magisk. You won't lose any module or configuration because they're saved in the user data partition, as Magisk is a systemless framework.
[Xiaomi Mi A1 Guides, News, & Discussion] skkardam:
Not possible restore image from magisk manager when you are root your device through temporary twrp recovery
[Xiaomi Mi A1 Guides, News, & Discussion] Parnas72:
Well, I did it... why do you think it's not possible ?
[Xiaomi Mi A1 Guides, News, & Discussion] skkardam:
Sorry bro

Can you please tell whole procedure?
[Xiaomi Mi A1 Guides, News, & Discussion] Parnas72:
What I did was:

- Open Magisk Manager --> Uninstall --> Restore Images

- Download and apply OTA

- Reboot the phone... I was now on Oreo 8.1 unrooted

- Open Magisk Manager --> Install --> Download zip only

- Go to fastboot mode and "fastboot boot TWRP.img"

- Flash the Magisk zip downloaded above, this will patch your bootloader

- Reboot phone and Magisk is running with all previous modules/configurations
[Xiaomi Mi A1 Guides, News, & Discussion] skkardam:
Same thing I do with june security patch oreo 8.1 but when July ota come i can't restore images then i go to fastboot mode command same 'fastboot boot twrp.img' and flash magisk uninstaller file and after that my device automatically boot into stock recovery and wipe my all the data
[Xiaomi Mi A1 Guides, News, & Discussion] IS44X:
It wiped my phone after i typed in the command "fastboot oem unlock". ****. Have i completely ****ed up or is ther anything i can do still?
[Xiaomi Mi A1 Guides, News, & Discussion] RedNas74:
Use this guide: https://xdaforums.com/mi-a1/how-to/alternative-root-mi-a1-twrp-disabling-t3764271

No need for patched images this way.
[Xiaomi Mi A1 Guides, News, & Discussion] ngohoainam:
waiting for July patched boot img :)
[Xiaomi Mi A1 Guides, News, & Discussion] DDKO:
yeah, me too. But trust me, patient is better :3
[Xiaomi Mi A1 Guides, News, & Discussion] Jawadyounas17:
july security patch

i need july 1 2018 security patch to root xiaomi mi A1
[Xiaomi Mi A1 Guides, News, & Discussion] Samhain77:
Here it is: https://drive.google.com/file/...S4frLrteCF2K/view?usp=drivesdk

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] mangelkool:
I fastboot this .img. When restarted, stuck on the white screen. I turned it off and then turned it on and got it OK, but Magisk is not yet installed.

Do I need to do this procedure again?
[Xiaomi Mi A1 Guides, News, & Discussion] Samhain77:
This is only the patched boot... You need to manually install magisk as usual

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] audinisio:
Link don't work for me : (
[Xiaomi Mi A1 Guides, News, & Discussion] Samhain77:
Sorry, try this: https://drive.google.com/file/d/1gnK8FzbxYTLK8OxgLn-lOElfNBuccjLw/view?usp=drivesdk

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] mangelkool:
I installed magisk manager before the "fastboot boot.img". When the phone rebooted, I opened magisk and click the Install button, but doesnt have the "direct method"
[Xiaomi Mi A1 Guides, News, & Discussion] fahrihassi:
Same here..

It didnt work for me..

Still waiting july patched boot:(:(
[Xiaomi Mi A1 Guides, News, & Discussion] Samhain77:
This is because I've shared the unpatched boot.img :(

Sorry but I've shared from the phone and I mismatched the files.

This is surely the right one: https://drive.google.com/file/d/1hac8MXSiw6N4UILn7UYvS4frLrteCF2K/view?usp=drivesdk

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] prorooter007:
thanks bro!

worked like charm
[Xiaomi Mi A1 Guides, News, & Discussion] DDKO:
Thank you. i'll try this
[Xiaomi Mi A1 Guides, News, & Discussion] chester_00:
Thank you very much 4 the patched file, it's works.

I recently upgrade me A1 with July update & now my gcam and others module are working.
[Xiaomi Mi A1 Guides, News, & Discussion] loray:
It worked, thanks!!!
[Xiaomi Mi A1 Guides, News, & Discussion] coolsight:
Yess !! This is the one. Thank you so much.
[Xiaomi Mi A1 Guides, News, & Discussion] mangelkool:
Thank, bro. Works like a charm!
[Xiaomi Mi A1 Guides, News, & Discussion] buffalodebile:
+1

Thank you !
[Xiaomi Mi A1 Guides, News, & Discussion] buffalodebile:
+1
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
Does anyone have problem with video recording after updating to 8.1 ? I can't record video (not any error occurs) neither via third party application such gcam. From default camers, I can record video only if from option of video select the fast forward recording while in normal I can't & in slow motion app crasses.
[Xiaomi Mi A1 Guides, News, & Discussion] Parnas72:
I have no problem recording video, with both stock camera and google camera.
[Xiaomi Mi A1 Guides, News, & Discussion] Samhain77:
No problem for me with gcam or default one.

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] DeWir3:
Thank you, worked perfectly :good:
[Xiaomi Mi A1 Guides, News, & Discussion] prorooter007:
If encountered bootloop after installing any magisk module like Xposed sdk 27 for Android 8.1

How to fix it?

P.s. I m without twrp for successful installation of ota
[Xiaomi Mi A1 Guides, News, & Discussion] x10adirect:
July update (8.1) problem

1st really thank for the information and the method, i am 1st time doing the root, so maybe a bit problem when doing the root. after i study the tread and youtube, i still unable to perform the root.

my problem is, after the .\fastboot boot patched_boot.img, my phone restart and all run correctly, but sadly i unable to open the magisk( when click on the icon it open on the load screen untill forever (on Mask Face). i do follow your reply and download the latest patched boot.

thank you for the help
[Xiaomi Mi A1 Guides, News, & Discussion] ngohoainam:
do we need to flash "Magisk zip" for both slot A and Slot B in TWRP? :confused:
[Xiaomi Mi A1 Guides, News, & Discussion] themalic:
Hello guys, does anyone have stock boot.img for 5th May update and also 5th June update? Mind to share here please? :)

Thanks in advance for your feedback.
[Xiaomi Mi A1 Guides, News, & Discussion] Parnas72:
Just install the Magisk zip.

The Magisk installation script automatically detects the active slot and installs in the currently active bootloader; no need to bother about the non-active slot.
[Xiaomi Mi A1 Guides, News, & Discussion] demencia89:
Any patched_boot.img for the July update? I got 8.1 on the July securty patch btw.

I tried with the patched_boot.img that Parnas72 posted but I get an error message saying it cant boot, and it asks me if I want to retry or to restore factory settings. I choose retry but I boot into normal OS where I can't install magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
July(8.1) patched img released

Download from here
[Xiaomi Mi A1 Guides, News, & Discussion] demencia89:
It's not booting either :( What could be wrong? I get the same error mesage saying my system data might be corrupt, that I can factory wipe or try again. Then it boots normally but it's not the patched_boot.img that booted.
[Xiaomi Mi A1 Guides, News, & Discussion] prorooter007:
Any Dolby Atmos working on latest 8.1 July build with magisk ?

PS I m without twrp
[Xiaomi Mi A1 Guides, News, & Discussion] Boobseekr:
Do we install this like how it was installed before? Using fastboot boot?
[Xiaomi Mi A1 Guides, News, & Discussion] x10adirect:
July update (8.1) problem

using this patched boot also cause the same problem. the phone unable to boot and restart to retry or to reset factory setting.

thank
[Xiaomi Mi A1 Guides, News, & Discussion] demencia89:
Same problem here, any solution for this?
[Xiaomi Mi A1 Guides, News, & Discussion] cheese12345:
do i need to set "preserve force encryption" and "preserve AVB 2.0/dm-verity" ?
[Xiaomi Mi A1 Guides, News, & Discussion] KungFuryy:
When i tap on Restore Images the following message pops up "stock backup does not exist!"

I'm on may 5 security patch.

Also i tried to update last month using the method provided in the thread from may 5 to june

the phone got stuck in a bootloop and i had to use MiFlash tool.

but my current issue is the first one which is the message that pops up when i tap on restore images
[Xiaomi Mi A1 Guides, News, & Discussion] wildwachsend:
Android 8.1 installed (june ). Used the "fastboot oem unlock" command and the phone factory reset. ıs the 8.1 rootable ?
[Xiaomi Mi A1 Guides, News, & Discussion] mardrest:
Yes, like 8.0, same recovery and magisk
[Xiaomi Mi A1 Guides, News, & Discussion] Parnas72:
How did you install Magisk last time ?

---------- Post added at 03:42 PM ---------- Previous post was at 03:28 PM ----------

"preserve AVB 2.0" is irrelevant, as the device currently uses AVB 1.0, so you may set it or not, it will have no effect;

"Force encryption" should also be irrelevant, as the device is encrypted by default... unless of course you want to decrypt it for some reason.

I would leave those flags to default value, unless you have specific reasons to change them.
[Xiaomi Mi A1 Guides, News, & Discussion] cheese12345:
thanks for your extensive answers.

worked like a charm, magisk is working as expected
[Xiaomi Mi A1 Guides, News, & Discussion] Mr.F.T.W:
Problem with entering the code

When i type "fastboot oem unlock" in powsershell in the correct folder it says "The term fastboot is not recognized as the name of a cmdlet...." in red and later it says in white that the command fastboot was not founf but does exist in the same folder but powershell won't load commands from this path but i could type ".\fastboot" if i trust this,

what should i do?
[Xiaomi Mi A1 Guides, News, & Discussion] demencia89:
Now I'm not getting the error anymore, but when I do "fastboot boot patched_boot.img" it gets stuck on "android one" logo. I left it over an hour a couple of times but it's just stuck on that animation.

Anyone on July update 8.1 was able to "fastboot boot patched_boot.img"? If so, can you share your patched_boot.img?

Thanks!
[Xiaomi Mi A1 Guides, News, & Discussion] barrack1:
I faced the same problem. The error msg is from the stock recovery during the boot process which it hangs for some time.

You just have to try again until it boots from the patched boot image successfully. It took me several tries.

After rooting, it hung on me once during booting but after that, it didn't happen again.
[Xiaomi Mi A1 Guides, News, & Discussion] abhi.dibyendu91@gmail.com:
Getting error message as cannot load patched_boot.img

After unlocking the boot loader,while trying to boot the img file, error message is coming as cannot load patched_boot.img. Also I tried to boot it in a segment,but error message is "no such file in inventory."

Please guide what to do
[Xiaomi Mi A1 Guides, News, & Discussion] Cooop:
This method works fine for me except of that amazon shopping, amazon alexa and amazon underground app doesnt work any more. They instantly crash if i try to start them. Any ideas how to solve it?
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
Yes u can unisntall root in magisk manager app
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
Go to magisk manager and press install button then click direct install

Reboot
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
As far as I know, uninstall from Magisk manager will restore backup of boot.img. As you instruct users to FLASH modified boot.img, there is no backup of stock boot image, hence you can't unroot from withing the Magisk. To unroot you have to FLASH stock boot.img.
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
There is stock boot.img backup

Go to /data and see
[Xiaomi Mi A1 Guides, News, & Discussion] kenux66:
Of course, check your pm

Sent from my Mi A1
[Xiaomi Mi A1 Guides, News, & Discussion] Cooop:
I already did this step.
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
You probably have it from old Magisk installation, backup of actual boot.img is created during Magisk installation. Just try it, remove Magisk and backup of boot.img, follow your instructions and try to unroot.

---------- Post added at 12:49 PM ---------- Previous post was at 12:43 PM ----------

Restore stock boot.img and then do it properly

1. fastboot flash boot_a stock_boot.img

2. fastboot flash boot_b stock_boot.img

3. fastboot boot patched_boot.img

4. install magisk manager

5. install magisk directly

6. reboot

This way you have stock boot in backup and you can follow standard OTA update procedure with Magisk. There is absolutely no reason to flash patched_boot.img, boot it only once to install Magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] blondeal:
You flash it with fastboot command ?

If I simply do this FLASH with the "stock boot.img" my phone will be unrooted ?

(as explained in : "en.miui.com/thread-1420590-1-1" (I can't publish html links))

Thanks!
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
Yes, to unroot you can use stock boot.img from the link you provided and then

fastboot flash boot_a stock_boot.img

fastboot flash boot_b stock_boot.img

Some of the Magisk files will remain in data partition, but phone will not be rooted anymore.
[Xiaomi Mi A1 Guides, News, & Discussion] blondeal:
OK !

Last questions (sorry I'm a noob),

- Do you know if the "stock_boot.img" is official ?

- Can I remove files remaining in data partition after unroot ?

- And finally, do I have to execute both commands for slot a and b or only one will work and be necessary ?

Thanks a lot
[Xiaomi Mi A1 Guides, News, & Discussion] Cooop:
Makes absolutely sense for the OTA :), but the amazon app problems still remains.

Deinstalled Magisk and followed your steps but the amazon apps still crashing.
[Xiaomi Mi A1 Guides, News, & Discussion] jitensetia:
Did anyone experience delay in loading camera... After this root... Mine comes up after 3 seconds
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
Which Amazon app exactly? I've tried "Amazon shopping" from Google play store and it doesn't crash with Magisk, SELinux enforcing or permissive. Maybe try to uninstall, install and clear Amazon app data (to be sure that settings were not restored automatically).

---------- Post added at 01:50 PM ---------- Previous post was at 01:46 PM ----------

It should be official, but to be 100% sure you'll need to wait for an official fastboot ROM from Xiaomi. If you are trying to return to stock configuration, I would advise to wait for fastboot ROM and then flash it with MiFlash (keep user data) - this way you'll have 100% stock ROM with locked bootloader. After Magisk removal from boot you might be able to clean remaining files, though I never tried it. Usually it's done from TWRP recovery by flashing the "magisk uninstaller". If you want to be 100% sure that you have also intact data partition, you might want to perform full clean ROM flash.

---------- Post added at 01:52 PM ---------- Previous post was at 01:50 PM ----------

It takes about 5 seconds to load or switch camera on rooted Oreo. Current workaround is to switch SElinux to permissive mode (by Magisk module, command in terminal or use dedicated app).
[Xiaomi Mi A1 Guides, News, & Discussion] Cooop:
Amazon Shopping, Amazon Underground, Amazon Alexa and new Prime Video. Amazon Kindle and Music are working.

I already tried reinstallation and data/cache clearing but the apps still crash. With and without the selinux module.
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
You could try catching logs via adb to see the culprit. Connect your phone to PC, enable adb, from command line run command "adb logcat *:E", run apps which are crashing, stop adb logcat (ctrl+c) and attach the output here.
[Xiaomi Mi A1 Guides, News, & Discussion] Cooop:
Very strange. I connected the phone to my notebook for the logs and startet the apps... all of them are suddenly working. Lets look if this remains :).

Thanks for your help.
[Xiaomi Mi A1 Guides, News, & Discussion] amflafuente:
Amazon cloud works for me. Maybe a Amazon problem.

Enviado desde mi Mi A1 mediante Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
Flash this magisk module

https://xdaforums.com/apps/magisk/module-magisk-selinux-permissive-script-t3577549#login
[Xiaomi Mi A1 Guides, News, & Discussion] navroza:
Thanks, that was the issue.
[Xiaomi Mi A1 Guides, News, & Discussion] prorooter007:
My safety net is not passing! What to do

Please help

Does it means that I cannot install next ota and have to flash fastboot ROM?

I m on July security patch
[Xiaomi Mi A1 Guides, News, & Discussion] x10adirect:
Thank for your kind reply, i already try many time and the problem still the same

thank you

"after many time testing the phone is bootable, but magisk unable to load (stuck on the loading screen)
[Xiaomi Mi A1 Guides, News, & Discussion] demencia89:
Alright I'll keep on trying then, thank you for your reply!

Edit:

Unbelievable, first try after reading this comment, patched_boot booted in under 10 seconds, so if in 30 seconds you're not asked for your password, reboot and retry untill it works.

Thank you all the ones that helped and good luck to the ones still trying!
[Xiaomi Mi A1 Guides, News, & Discussion] barrack1:
Yeah thats what I did, if it takes too long just power off or reboot and try again.

Someone else in a thread which I asked about this problem suggested using the alpha/beta version of magisk (16.7) to fix this issue.

https://xdaforums.com/mi-a1/help/stock-rom-8-1-july-rooting-causes-hangs-t3819653

https://xdaforums.com/mi-a1/help/rooted-device-freezes-booting-secure-t3819483
[Xiaomi Mi A1 Guides, News, & Discussion] x10adirect:
after success reboot, are you able to open the magisk ?

thank for your reply
[Xiaomi Mi A1 Guides, News, & Discussion] Mohammad Yamama:
After July Update i am not able to unlock boot loader or rooting my phone, when i try to unlock boot loader my phone got reset..what i do? Developers please fix this
[Xiaomi Mi A1 Guides, News, & Discussion] chteh0721:
after i uninstall magisk when ota arrive, there is no option for me to choose install into second slot. may i know what's wrong ?
[Xiaomi Mi A1 Guides, News, & Discussion] HrÏtHîK M!Ke:
I also had this issue.When it stuck on Android One logo reboot your phone again to bootloader (press power+ vol down in "Android One" logo) then again boot patched_boot.img . This time it will reboot to the system and you can install magisk.

:D
[Xiaomi Mi A1 Guides, News, & Discussion] Parnas72:
There is nothing to fix, it's a feature implemented by Xiaomi since last May upgrade for security reasons. This prevents someone who steals your phone to unlock it and get access to your personal data.
[Xiaomi Mi A1 Guides, News, & Discussion] lef7er1s:
+1
[Xiaomi Mi A1 Guides, News, & Discussion] Anticolick:
Hi guys i have latest patch (july 2018) and i try that img . i can install successfully magisk but when i open fingerprint and restart my device stuck in bootloop why?

---------- Post added at 05:05 AM ---------- Previous post was at 05:00 AM ----------

i can root and use :d but when i try to make fingerprint on it stuck in bootloop :d. For no wipe in unlocking bootloader just press vol down key in when you write

fastboot oem unlock

after write fastboot reboot

you will see device is not format itself
[Xiaomi Mi A1 Guides, News, & Discussion] Parnas72:
Guys, "install to second slot" has been withdrawn from Magisk as the functionality had some issues. Maybe it will get back in next release.
[Xiaomi Mi A1 Guides, News, & Discussion] x10adirect:
i was follow your way, well it boot as plan, but when open magisk, it stuck and unable to load.

thank you
[Xiaomi Mi A1 Guides, News, & Discussion] HrÏtHîK M!Ke:
I'm not having that issue. But some modules do not work for me (like: Android P DP4 Boot animation).

I'm having the worst battery life, SOT of 2.5hrs.
[Xiaomi Mi A1 Guides, News, & Discussion] x10adirect:
thank your feedback

i try many time and result still same:(
[Xiaomi Mi A1 Guides, News, & Discussion] tuvoj21:
Verry nice work! Ty si much dude !
[Xiaomi Mi A1 Guides, News, & Discussion] 21vm:
Hi,

When i try to "restore" on Magisk before applying the ota update, i have the error message "file does'nt exist"... what am i supposed to do ??
[Xiaomi Mi A1 Guides, News, & Discussion] MrTextman:
I think this accidentally just ruined my phone.

I used fastboot and flashed the patched rom, which broke the OS. Then I reflashed the same rom and it deleted everything but at least it sort of worked.

After that, I tried to install magisk, which seemed to have worked, until I realised that my SIM card was no longer realised, and then it rebooted.

And now I'm stuck at the android one logo.

Thanks.

Update: Reflashing the patched rom seemed to have fixed everything... kind of.

Though I feel like this should be in the main post.
[Xiaomi Mi A1 Guides, News, & Discussion] jack_21:
It is supposed to boot from the patched image, and not to "flash" it

However, the bootloop at Android One logo (from 8.1) it's a common issue, just reboot your phone when this event occurs using vol down + power
[Xiaomi Mi A1 Guides, News, & Discussion] MrTextman:
Yes I understand that now.

Also, do I have to do that every time I boot up the phone?
[Xiaomi Mi A1 Guides, News, & Discussion] siddhant91:
I get stuck on the android screen everytime i try to install magisk.. I've tried the patched image.. tried creating the image myself on 16.7 magisk and even tried installing the zip via TWRP. I installed the update after uninstalling magisk. Any solutions?

Thanks
[Xiaomi Mi A1 Guides, News, & Discussion] :
What do you mean by "installed the update after uninstalling magisk"?

What Security Patch Level are you on?
[Xiaomi Mi A1 Guides, News, & Discussion] talla1:
Hi,

I upgraded to 8.1 and couldn't retain magisk. For some reason, the installing on the second slot option was not available, and magisk got uninstalled.

So I'm trying to reinstall but I'm stuck on loading screen after running:

fastboot boot patched_boot.img

I tried multiple times. I tried using patched_boot.img I downloaded and also created my own patched_boot.img in magisk manager and tried it. Same result.

Any idea how can I diagnose the issue and get Magisk back? Or perhaps a workaround to installing it?

Thanks!

Tal
[Xiaomi Mi A1 Guides, News, & Discussion] armujahid:
bootloader unlocking (fastboot oem unlock) is causing factory reset on July patch. Please add it as a warning. I lost all my data :D