yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Guides, News, & Discussion] Edwin Hamal:
Does the boot command actually boot the patched boot.img? That's awesome if it does.
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
Yes follow all steps
[Xiaomi Mi A1 Guides, News, & Discussion] harshu0101:
This will probably void warranty, right? Also, whenever OTA arrives you just go ahead with it or you gotta something?
[Xiaomi Mi A1 Guides, News, & Discussion] cyberangel22k:
How can you restore stock boot image when an ota arrives?
[Xiaomi Mi A1 Guides, News, & Discussion] Funnnny:
You can restore boot.img stock and then patch it again with Magisk's keep OTA functionality
[Xiaomi Mi A1 Guides, News, & Discussion] traianescu:
How? The same way, with the fastboot command?
[Xiaomi Mi A1 Guides, News, & Discussion] rizkinevitry:
how about to unroot ? my camera laging
[Xiaomi Mi A1 Guides, News, & Discussion] cmk7128:
To unroot, fastboot flash the stock Oreo boot.img. For the lagging camera, you can install the SELinux Permissive Script magisk module (which requires Magisk root).
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
SElinux switch app is very handy, you can quickly and automatically change the SELinux mode.
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
The instruction say "fastboot flash boot patched_boot.img"

Your instruction say "fastboot boot patched_boot.img"

Which one? Flash or boot?
[Xiaomi Mi A1 Guides, News, & Discussion] Funnnny:
It should be fastboot boot, I think OP made a typo
[Xiaomi Mi A1 Guides, News, & Discussion] rizkinevitry:
do you have a stock boot.img for oreo ?
[Xiaomi Mi A1 Guides, News, & Discussion] traianescu:
from xiaomi: http://en.miui.com/thread-1420590-1-1.html
[Xiaomi Mi A1 Guides, News, & Discussion] GoWRules:
Ok. The root works, but if i install the Mi A1 tweak Magisk module for G Cam, i get stuck in the boot animation. WEhat can i do for enable api 2?
[Xiaomi Mi A1 Guides, News, & Discussion] konradit:
Can't flash modules
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
Boot again with patched_boot.img

---------- Post added at 06:18 PM ---------- Previous post was at 05:58 PM ----------

It used to work without issues in Nougat, at least for me. The issue maybe because of Magisk or Oreo itself because this is the first security patch for Oreo. It more difficult when we cant boot to twrp anymore, not like nougat, its is easier if we can boot to twrp. So currently, the patched_boot method is the best method for me.
[Xiaomi Mi A1 Guides, News, & Discussion] chester_00:
just boot...

flashboot boot patched_boot.img
[Xiaomi Mi A1 Guides, News, & Discussion] paveu241:
After rooting with this method Camera opens very slow. Any fix for it?
[Xiaomi Mi A1 Guides, News, & Discussion] goofball2k:
Use the magisk module to allow for selinux permissive, or get a tool that will allow you to change selinux to permissive.
[Xiaomi Mi A1 Guides, News, & Discussion] RicardoRyuma:
I getting error to install january update from OTA, How o fix this?
[Xiaomi Mi A1 Guides, News, & Discussion] chester_00:
Hi, you need to install Masgik Manager ... with some modules, read this post:

https://xdaforums.com/mi-a1/how-to/enable-google-pixel-camera-mia1-t3730057
[Xiaomi Mi A1 Guides, News, & Discussion] goofball2k:
what have you done to your phone that is different than stock?
[Xiaomi Mi A1 Guides, News, & Discussion] rajajit181:
january fastboot boot.img not working

The january boot image is not working for stable update.

The device is getting into bootloop and if we force restart the device with pressing the power button in bootloop the device is turning on and magisk is not being installed
[Xiaomi Mi A1 Guides, News, & Discussion] Gurpreet Josan:
Thx bro i successfully root without any error ??????????
[Xiaomi Mi A1 Guides, News, & Discussion] Soham Biswas:
Deleted
[Xiaomi Mi A1 Guides, News, & Discussion] bichoalexis:
So this is why I didnt get the direct installation in magix? so the only way its just wait for a new Update?
[Xiaomi Mi A1 Guides, News, & Discussion] xb360:
Can you help to give me a guide how to flash the OTA update?

I'm currently on Oreo Dec security patch, rooted with Magisk and TWRP recovery.

How should I proceed to flash the OTA update and do I need to flash Magisk again?
[Xiaomi Mi A1 Guides, News, & Discussion] Gurpreet Josan:
Camera lag issue after magisk
[Xiaomi Mi A1 Guides, News, & Discussion] ngohoainam:
install this module by using magisk manager. my mi a1 is rooted sucessfully and this module 1.2 works well :)
[Xiaomi Mi A1 Guides, News, & Discussion] jai krishna:
Will the patched boot release for every month
[Xiaomi Mi A1 Guides, News, & Discussion] Rajeev:
It should be
[Xiaomi Mi A1 Guides, News, & Discussion] RicardoRyuma:
I just did the process of this thread
[Xiaomi Mi A1 Guides, News, & Discussion] goofball2k:
Easiest way to prepare your phone is to do a dirty flash of the December Oreo ROM. You would use either MiFlash to do this, or use the batch files that come with the ROM download. I don't have the link to it directly any longer, Xiaomi has appeared to remove the public link but it has been linked many times on this forum.

After you have downloaded the required ROM files and extracted them to a folder, you will want to go into Magisk Manager and remove all modules. Reboot the phone to make sure you can get back to the OS.

You will want to select the option to save user data in MiFlash. If you want to use the batch files, you'll want the batch file that is named something like flash all except storage.

Put your phone in fastboot, connect to your computer, then start the flashing. Once it completes, it should reboot your phone, it will relock your bootloader, remove your root, and you should be ready to receive the OTA, when they send it.
[Xiaomi Mi A1 Guides, News, & Discussion] hacker1:
Start Magisk Manager, tap "Install", create your own patched boot image...

(You don't to have magisk installed/working, you just need the "Magisk Manager" app.)
[Xiaomi Mi A1 Guides, News, & Discussion] kkn14:
I just rooted using this method

Installed Gcmod5 after enabling magisk module for camera2api

I dont see any HDR+ option on screen

Any ideas?

Have set the settings to Nexus 6 and 6P
[Xiaomi Mi A1 Guides, News, & Discussion] prabhjot-singh:
Go to settings -> advanced

There you go!

---------- Post added at 06:00 PM ---------- Previous post was at 05:20 PM ----------

the patched boot image for january is still having that wifi bug, please upload fixed img file [MENTION=7177145]jashancheema[/MENTION] [MENTION=4970751]Rajeev[/MENTION]

---------- Post added at 06:04 PM ---------- Previous post was at 06:00 PM ----------

still not working wifi

means its showing the devices around but not connecting!

EDIT: don't know how but after 2-3 attempts this img file is working now, thanks dev(s)
[Xiaomi Mi A1 Guides, News, & Discussion] raze19:
Does this mean the prescribed link here for updating to OTA is not working or not advisable?

I was going to try the linked method of installing OTA but I don't have a stock boot image - magisk says I don't have a backup. s
[Xiaomi Mi A1 Guides, News, & Discussion] zak6693:
I tried this method with both December and January version. I tried the January version after getting ota. But both time after booting the patch image my phone stock camera app opens in about 4-5 sec. Same with the gcam. I tried the method 2-3 times after flashing fresh new Oreo ROM through miflash tool. Anybody having fix for this ?

Please help.
[Xiaomi Mi A1 Guides, News, & Discussion] Kookaburra88:
Stupid question, but what boot.img need to be selected?

The one from the actual installed fastboot images or is the boot.img somewhere hidden on the device?
[Xiaomi Mi A1 Guides, News, & Discussion] goofball2k:
This has been discussed several times, it's an issue with SELinux, you can use a magisk module or a program to change to permissive.
[Xiaomi Mi A1 Guides, News, & Discussion] nikkpap:
January ota came do I will proceed with the info above, my phone passes the safety net... It will break my setup? Daes anyone tried it?
[Xiaomi Mi A1 Guides, News, & Discussion] Ravenger09:
My device is in bootloop. My device was rooted with your instructions, then January update notification (89mb) has shown. I followed this, where did I do wrong?

Tips and Tricks

OTA Installation Tips

I did this. -> When an OTA is available, please go to Magisk Manager → Uninstall → Restore Images. Do not reboot immediately or you will have Magisk uninstalled.

Then I did this:

After restoring stock boot image, apply OTAs as you normally would (Settings → System → System Updates)

Once the installation passed step 1 and starting step 2, go to Magisk Manager → Install → Install to Second Slot. This will install Magisk into the second boot image slot, which is the updated slot.

I rebooted my device after OTA finished update with Magisk installed the things to second slot. It is in bootloop now.

And I didn't understand this, can you explain?

Let the OTA finish its job. After a reboot, the bootloader will switch to the updated system. Magisk should still be installed since we already patched the new boot image.

When should we patch the new boot image? Before all of this? Because I flashed the new boot image after the reboot and device couldn't boot.
[Xiaomi Mi A1 Guides, News, & Discussion] hacker1:
You need the stock boot image from your currently running rom.

You can get it from the fastboot images Xiaomi releases from time to time, or extract it from your device using twrp (just fastboot boot it), or use adb if you still have magisk running (e.g. ota updated, but not rebooted yet). IIRC partition 22 is boot_a, partition 23 is boot_b
[Xiaomi Mi A1 Guides, News, & Discussion] dædpøøl:
hello guys, i can't uninstall magisk by restore images option because it shows "stock backup does not exist!". how to solve this?
[Xiaomi Mi A1 Guides, News, & Discussion] kkn14:
Thanks alot for your help guys

One last issue

My camera is shows a blank photo taken but when I tap on it to delete in any camera app, it hangs and nothing further happens
[Xiaomi Mi A1 Guides, News, & Discussion] akfandi:
Same problem with me after update Oreo patch january 89MB. Any solution?
[Xiaomi Mi A1 Guides, News, & Discussion] uliek01:
For anyone who get boot loop, missing wifi, root lost after January boot image patch, here solution for that.

I did the following steps and did not find any problems with my MI A1 until now.

- You must reflashing rom again with xiaomi flash tools, and must choice clean flashing and lock, remember your data will be wipe.

here's link download N2G47H.7.12.29 (Android O) 1084 MB (28 Desember 2017 Patch) ;

http://bigota.d.miui.com/7.12.29/tissot_images_7.12.29_20171228.0000.00_8.0_c9a6ea979b.tgz

- After flash finished, wait to update January security patch from OTA, then update until finish and restart your device.

you must see your firmware now is OPR1.170623.026.8.1.10 with 01 Jan 2018 security patch

- Install latest version of magisk manager , you can get it at official magisk page, if finished reboot your device to fastboot mode.

- Now you can unlock you device and root with patched_boot.img as explained earlier in this thread at page 1

- After restart, open magisk manager, install with direct install then reboot your device.

- to prove this you can try to reboot your devices several times , you will not get root lost.
[Xiaomi Mi A1 Guides, News, & Discussion] Kookaburra88:
You mean one of the two boot.emmc.win files contained in the nandroid backup? Is it required to switch the file ending (of a file cop) for magisk?
[Xiaomi Mi A1 Guides, News, & Discussion] Kookaburra88:
Here is the nandroid list belonging to post right before
[Xiaomi Mi A1 Guides, News, & Discussion] nikkpap:
As far I saw no one can prove that any method works it's really pissed me of... It's the first device of mine, that makes so Hard my life. It's a good device but on software something is not right... I have it for 3 months now... And I am thinking to trade it.

And one more question in the pixel XL phones do they have the same problems or is just our device only.
[Xiaomi Mi A1 Guides, News, & Discussion] Groovecain:
Dont make your life so hard, after getting OTA January , and try to uninstall magisk to restore boot.img with magisk but after reboot i got bootloop. (i forgot to disable my modules maybe)

when bootloop occur i just set my partition to B and fastboot boot stock December boot.img , after OS completing applying update, i just need to fastboot boot january patched boot.img and install magisk via magisk manager, reboot - > done :good:
[Xiaomi Mi A1 Guides, News, & Discussion] xivay:
Yes they too have A/B partitions so you'll face the same problems there.
[Xiaomi Mi A1 Guides, News, & Discussion] RicardoRyuma:
"error : Missmatching image and device"

Can you solve this problem?
[Xiaomi Mi A1 Guides, News, & Discussion] more.pavankalyan:
Done everything like suggested but my device is not rooted when magisk is opened it shows " magisk is not installed " and when i press install, it shows two options i.e " download zip only " and " patch boot image file " but my bootloader is unlocked....
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
You might have Mi 5X with A1 ROM. Verify at this page https://www.mi.com/verify/#imei_en, if it doesn't show Mi A1 phone, return it to seller.
[Xiaomi Mi A1 Guides, News, & Discussion] uliek01:
are you sure if your device MI A1?
[Xiaomi Mi A1 Guides, News, & Discussion] hacker1:
You just need the boot.emmc.win file, the boot.emmc.win.sha2 file is just a checksum. Change the file extension to .img (otherwise MagiskManager won't recognize it), and patch it in MagiskManager.

Then either fastboot flash the patched image file, or (if you want to be able to restore stock from MagiskManager later) fastboot boot it, go to MagiskManager, tap install -> direct install, reboot
[Xiaomi Mi A1 Guides, News, & Discussion] Kookaburra88:
Nice, would it be possible to append this information to the OP in case somebody wants to do it on its own or is just curious about the source of the patches boot.img's?
[Xiaomi Mi A1 Guides, News, & Discussion] RicardoRyuma:
Yes, sure
[Xiaomi Mi A1 Guides, News, & Discussion] goofball2k:
Did you boot using the patched boot.img file? You need to boot from this img.
[Xiaomi Mi A1 Guides, News, & Discussion] more.pavankalyan:
Yes booted using patched boot.img file in the pc
[Xiaomi Mi A1 Guides, News, & Discussion] RicardoRyuma:
[IMG="Imei"]https://image.ibb.co/cEEi96/Capturar.png[/IMG]
[Xiaomi Mi A1 Guides, News, & Discussion] priash7:
What happens when I enable OEM unlock???
[Xiaomi Mi A1 Guides, News, & Discussion] xivay:
It premits you to perform oem unlocking.
[Xiaomi Mi A1 Guides, News, & Discussion] priash7:
What happens when I disable OEM unlock after installing magisk?
[Xiaomi Mi A1 Guides, News, & Discussion] Rawwr:
you brick your phone.
[Xiaomi Mi A1 Guides, News, & Discussion] vamsi2405:
Will it work on nougat 7.1.2 December patch
[Xiaomi Mi A1 Guides, News, & Discussion] Ni9e.:
Im new to Xiaomi devices previously i used Lenovo Zuk series all with custom roms and twrp. I have bought Mi A1 and a little confused about flashing because i want to keep it stock so i can get updates time to time but i need root also. Can someone tell me exact guide for rooting and backing up current stock rom ? Also is it possible that i install twrp recovery and still get OTA?
[Xiaomi Mi A1 Guides, News, & Discussion] priash7:
Thanks....gud to know
[Xiaomi Mi A1 Guides, News, & Discussion] tobey2k:
Hey guys, i rooted my A1 with this tutorial.

If I modify my build.prop to get gcam working and unroot this device to get the latest ota,

does the gcam still work??
[Xiaomi Mi A1 Guides, News, & Discussion] Apih95:
No....
[Xiaomi Mi A1 Guides, News, & Discussion] goofball2k:
Don't modify build.prop, just get the magisk module that will enable camera2 api instead.
[Xiaomi Mi A1 Guides, News, & Discussion] edkmho:
I have successfully rooted and install Magisk in my device and it is working fine.

Many thanks.
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
Hi,

I flash my phone with Oreo December yesterday, then I install Magisk using instruction from this thread. After that, I update to January OTA also using link from this thread but I got error "Couldn't update", "Installation error". So I can confirm Oreo OTA update cannot be installed with Magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] macelaru:
You followed USE THIS GUIDE WHEN OTA ARRIVES and still cannot install OTA?
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
Yes
[Xiaomi Mi A1 Guides, News, & Discussion] chuba_hypnotize:
Could I follow this method for nougat ? or anyone have guide root method for nougat version ?

thanks.
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
https://xdaforums.com/mi-a1/how-to/guide-install-magisk-root-xposed-t3701009
[Xiaomi Mi A1 Guides, News, & Discussion] hacker1:
January OTA installed fine for me, coming from Oreo December (with Magisk).

Did you restore stock before installing ota?
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
Yes, I restore stock image. I have to uninstall magisk, lock bootloader, then only i can install the update. Did you used patched_boot from this thread to root your december Oreo?
[Xiaomi Mi A1 Guides, News, & Discussion] proinsias:
I flashed the oreo stock image 2017.12.29 and then i followed your guide but after install magisk with direct installation and reboot the device don't boot and now I have a script "no command" I've tryed to fastboot patched_boot.img and reboot without magisk and if I try to install magisk at the next restart the device will lock again with the word no command. How can I solve this? Maybe I don't have to use the direct installation of magisk?
[Xiaomi Mi A1 Guides, News, & Discussion] okahdidi:
Thank you for this

---------- Post added at 06:25 PM ---------- Previous post was at 06:23 PM ----------

Oh really? How did you do that?
[Xiaomi Mi A1 Guides, News, & Discussion] hacker1:
No, I patched the boot image in MagiskManager. But if you restore stock in MagiskManager before applying ota, it doesn't really matter where you got the patched boot image from.

Restored stock in MagiskManager, and then just applied the ota.
[Xiaomi Mi A1 Guides, News, & Discussion] okahdidi:
For me I think the disconnect here is people having issues with installing OTA even with magisk is when they flash Dec Oreo with mi flash or any other means. However those who updated normally Via OTA to Oreo and then install magisk I think have no issues with installing January OTA with magisk
[Xiaomi Mi A1 Guides, News, & Discussion] okahdidi:
Please don't be angry,can u just type how u did it? Plz don't refer me to any link. Just type please how u did it. Thanks
[Xiaomi Mi A1 Guides, News, & Discussion] hacker1:
Did what? Restored stock in MagiskManager?

Start MagiskManager, tap "Uninstall", select "restore images".
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
How you patch boot img and install magisk. Could you provide proper steps?
[Xiaomi Mi A1 Guides, News, & Discussion] samrattt:
is busybox installing can disabled my ota?
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
Install busybox from magisk download section
[Xiaomi Mi A1 Guides, News, & Discussion] SrikanthMergu:
I made a vedio instructions for above procedure step by step do watch it for more understanding

Thanks

Subscribe my channel for more vedios related to mi A1

[youtube]1amTkFxlQUY[/youtube]
[Xiaomi Mi A1 Guides, News, & Discussion] Prakhar Rajpal:
Just unlocked bootloader

Trying to install magisk but in the magisk manager app it is not showing the option of direct install

Please help asap
[Xiaomi Mi A1 Guides, News, & Discussion] xivay:
I think you are right. I have flashed oreo rom dec security patch & rooted with magisk. I haven't yet received jan security patch update. Is there any way to update without reverting back to stock? If not, I shall remain unrooted for the good.
[Xiaomi Mi A1 Guides, News, & Discussion] T3K0:
Anyone else getting really slow camera start after installing Magisk?

I don't have any Modules installed just Magisk.

When I restore the Image its back to normal (Still not really fast but the same it was before).
[Xiaomi Mi A1 Guides, News, & Discussion] NITRO_100:
Please, this has been discussed million times here, you need to install selinux permissive module..
[Xiaomi Mi A1 Guides, News, & Discussion] T3K0:
My bad, but I thought that its only a fix for modules.
[Xiaomi Mi A1 Guides, News, & Discussion] croocklyn:
Hello,

I've followed every step, but when entering an exit command like this : The term 'fastboot' is not recognized as the name of cmdlet... etc

So I can not continue the process on the power shell windows. Anyone can help me??
[Xiaomi Mi A1 Guides, News, & Discussion] Soham Biswas:
Do one thing. Go in the fast boot folder. Instead of shift+ right click tap on the searchbar (on top of pg where it gives the description of this pc >fastboot ) in that page and type "cmd" >entre> this would give you the black command shell type in the commands as given in op. Note that you've correctly installed adb.
[Xiaomi Mi A1 Guides, News, & Discussion] xivay:
Normally it shows up. If it didn't you may have to install it from twrp. Of course I won't suggest you that. Can you attach a ss?

---------- Post added at 04:09 PM ---------- Previous post was at 04:01 PM ----------

When your device is connected in fastboot mode, go to device manager & look for android under your user. If on dropping down android panel, you get "Android ADB Interface" you'll surely face this problem. To solve this, you need to manually configure the drivers. Choose "Android ADB Interface" & choose update drivers. Now manually update it to "Android Bootloader Interface". Your device will then show up on "fastboot devices" command.
[Xiaomi Mi A1 Guides, News, & Discussion] okahdidi:
I suggest u flash d original stock ROM,update normally Via OTA and then root
[Xiaomi Mi A1 Guides, News, & Discussion] Prakhar Rajpal:
Ok unlocked bootloader disables the ota updates
[Xiaomi Mi A1 Guides, News, & Discussion] xivay:
I'm not sure tho. Please consult other members.

---------- Post added at 04:18 PM ---------- Previous post was at 04:15 PM ----------

I know that. But I don't want to face this hassle every time an update pops up. Magisk guide isn't working. We're left with flashing stock rom every time. What we should look for is an hassle-free method to update our device, just like Pixel owners do who have the same A/B partitions.
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
I have unlocked bootloader and Magisk installed. I received OTA today, used the recommended way to apply it (restore boot.img, install OTA, install Magisk to second slot, reboot) and guess what, everything works on the first try, absolutely hassle free, whole procedure took less than 5 minutes.. ;) If it doesn't work, it's most probably user who screwed something up.
[Xiaomi Mi A1 Guides, News, & Discussion] Prakhar Rajpal:
Well i am trying to install magisk by direct method thru magisk manager but it is not showing that option (only showing patch boot img and download zip)

Please help
[Xiaomi Mi A1 Guides, News, & Discussion] xivay:
Dude you're the one with silver lining! Are you sure the recommended guide works?
[Xiaomi Mi A1 Guides, News, & Discussion] afrizal87:
I'm already rooted, magisk and twrp installed,im on December path, could it be fine if i use this method to get January update? Coz they don't mentioned if it would be fine if already installed twrp
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
To use "direct install" you need to be already rooted.

1. make sure that you have fully stock installation

2. fastboot boot patched_boot.img (any patched Oreo boot image should be fine, but don't flash it, only boot once)

3. install Magisk, direct installation

4. reboot

Well, as long as you meet the prerequisites, it works absolutely fine. The only reported issue was for Nougat->Oreo upgrade, but incremental updates within the same Android versions are ok.

I don't have experience with installed TWRP, but it would be probably better to restore stock boot image manually. Next time don't install TWRP, only boot it when you need it. This way you can use Magisk OTA guide without issues.