yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Guides, News, & Discussion] ShawnMercer:
Unlocking erases everything. On any device I've owned. :P

---------- Post added at 04:37 PM ---------- Previous post was at 04:29 PM ----------

Use July patch if you are on july version 8.1 and yes make sure internet is on :)
[Xiaomi Mi A1 Guides, News, & Discussion] armujahid:
I unlocked bootloader on January patch and it didn't cleared anything then. reseting was introduced in some later patch and as per this thread it can be bypassed
[Xiaomi Mi A1 Guides, News, & Discussion] talla1:
I definately used the july patched_boot.img, but I'll try again just to be sure.

Also, I did a backup in twrp and then patched boot.emmc.win inside magisk manager to create my own patched_boot, and it also caused the same effect..

Any other ideas..?
[Xiaomi Mi A1 Guides, News, & Discussion] talla1:
I seem to be getting the same issue. Boot loop on Android One logo when booting from patched_boot.img on android 8.1 (july).

But I don't get your solution. If I boot with vol down + power, I just get to the fastboot screen again. How do I boot up the phone with patched_boot.img in order to install Magisk?
[Xiaomi Mi A1 Guides, News, & Discussion] sidg2:
Q1. Will OTA update possible after flashing "unlocked bootloader warning removal - SPLASH file " on magisk Rooted Mi A1 oreo 8.1 if I unroot the phone with magisk? Or do I need to reinstall the fresh whole stock ROM again?

Q2. If I flash TWRP Recovery then how can I reinstall stock recovery and then how can I get ota update with out reinstalling stock rom?
[Xiaomi Mi A1 Guides, News, & Discussion] talla1:
Found the solution here: https://xdaforums.com/mi-a1/help/root-mi-a1-june-security-patch-8-1-t3811639

Apprently, running magisk uninstaller before "boot flashed_boot.img" does the job and no more boot loop.

I believe this should be written in the instructions or in the ota update guide. Or both.
[Xiaomi Mi A1 Guides, News, & Discussion] naphy:
Bugs (on 8.1 version): Doesn't work if screen protection isn't activate or if the boot-screen protection is activate (that secure boot thing).

After I (successfully) root, one restart and the Root is gone xD Please fix!

Also, resetting does the same thing (kinda obvious, because it reboots in order to reset xD)
[Xiaomi Mi A1 Guides, News, & Discussion] awesome_paneer:
Not working for July patch

Whenever any updates came, I used to always unroot my phone, then do the update, then root it again because though magisk is made for rooting and having OTA at the same time, MI A1 wasn't working that way. Now I did the same procedure for android 8.1 July patch. Unrooted my phone, did the update and when rooted it, all the data got erased and I had to do a full STOCK ROM install. I tried rooting once more, but the same error arrives. It just tells me that android cant start and that I have to do a factory reset. Luckliy, I have all my data nicely backed up so no worries but I really want my device to be rooted. Any help will be appreciated.
[Xiaomi Mi A1 Guides, News, & Discussion] ngohoainam:
waiting for patched_boot.img for August :)
[Xiaomi Mi A1 Guides, News, & Discussion] avpenkov:
here you go))

https://drive.google.com/file/d/1rm_TsSdJOwO-LuJd11MfI1MYp4Qn0vx9/view?usp=sharing
[Xiaomi Mi A1 Guides, News, & Discussion] naphy:
I actually found how to solve it. When you root, you open the Magisk Manager app and you see that you have root, right? Well, if you restart, the root is gone!

Here's what to do: Root it exactly how you saw there, but when you see that you have root in the Magisk Manager app, DON'T RESTART! Tap "Install" and then "Install" again, then "Direct Install (Recommended)". After it finishes flashing, tap "Reboot" on the down part. This helped me (initially, I didn't got that popup with "Install Magisk..." so I thought that it doens't need that anymore, but you need xD).
[Xiaomi Mi A1 Guides, News, & Discussion] naphy:
New bug (I think it is): I closed my phone for one minute (power off), then opened it. Seems like it was in a boot-loop or something because it wouldn't open. Then, I tried to enter the Fastboot, but (idk if it's my phone or a specific combination of what you have to tap first) it rebooted... And it worked... Idk what happened, I was really worried because I didn't saved much thing :/
[Xiaomi Mi A1 Guides, News, & Discussion] Arief Darmawan:
Anyone have a patched boot for august?
[Xiaomi Mi A1 Guides, News, & Discussion] arnova:
Rooting my Mi A1 using this method was quite easy. Now I tried updating my phone to the latest OTA but somehow when I tell Magisk to perform an install I don't get the option to "Install to second slot" (for a/b partition systems)

("Select method" only show "Download Zip Only", "Patch Boot Image File" and "Direct Install"). I'm using Magisk 16.0. Anyone understands why the "Install to second slot" install option is missing on my phone?
[Xiaomi Mi A1 Guides, News, & Discussion] Su_veer007:
Kindly get August patched_boot.img
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
Where it is to download, because i find only the July patched boot.img.
[Xiaomi Mi A1 Guides, News, & Discussion] Arief Darmawan:
U can root ur devices without patched boot dude.

Just download magisk installer zip, then boot to twrp and flash it.
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
I don't need it for rooting but to update my mobile via ota because I face error installation.
[Xiaomi Mi A1 Guides, News, & Discussion] nipunsdaddy:
Will l lose all magisk modules installed before ota updates? i might try yr guide with Aug. update. wish me luck!!??
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
August patched_boot.img

Here you go. Patched_boot.img
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
Are you sure that it is the August because the July has the same size ?
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Yes i`m sure. I`ve made by myself yesterday. Boot.img was extracted from august update and patched in magisk. I used it to root my mi a1 and everything is working fine.

---------- Post added at 04:22 PM ---------- Previous post was at 04:10 PM ----------

If i understood you right. You need boot.img because of error during ota uptade? If yes you don`t need patched_boot.img but stock july boot.img. If you flash stock july boot.img, error won`t appear.
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
About error ota updating (I am on July & I want to update to August), should I use the July patched boot.img & not from August ? Is the same thing to flash it via twrp & not from adb ? General the patched boot img, what is it for ? To help to root your mobile or to manage to update via ota ?
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
It didnt work for me man ...i updated through ota in the latest patch then i unlocked the bootloader but my phone auto reboot it self then i went back did the second step but the magisk is showing me these View attachment 4579062

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Patched is for rooting with magisk. If you are on july update you have to reflash stock boot.img to bring back ability of ota uptade. After that you update to august security patch you can use my patched_boot.img to root your phone with magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
Right now im stock all around because i have flash the firmware through xiaomi mi flashtool after that i have unlocked the bootloader and thats it i haven t be able to root my phone

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
Where to find stock boot.img ? I am on July update now, should I flash the patched boot img of July ?
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
I'll post it for you when i get back from work. About 8pm. Ok?
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
Ok. The process is to flash the stock boot img of july via adb & after I can get the ota without any problem ?
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
July stock boot image. If it doesn`t help. Reflash full rom update to august and unlock bootloader. Btw what is the purpose of unlocking bootloader if you doesn`t root your phone?
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
The process is to flash it via twrp or adb ? After when my mobile starts then Should I select restore image via magisk or needn't ? Although many time the restore image from magisk writes no image to restore.
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Via adb
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
Is there any solution for me ?

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
About process ? Do I need do something with magisk for restoring image or no ?
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Describe your problem once again with details.

---------- Post added at 09:37 PM ---------- Previous post was at 09:32 PM ----------

Unistall magisk,flash stock boot.img. if it doesn't help flash full stock july rom and lock bootloader. Update to august security patch and unlock bootloader.
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
So i flashed the 1st august firmware and locked my bootloader after then i checked for any updates before unlocking the bootloader again ...after doing the latest upgrade i unlocked the bootloader and my phone auto reboot its self and then i set it up and went into download mode again and did fastboot boot image using the file from above that says tha is for the august patch ...my command line says done and after rebooting the magisk manager shows these (look for the photo attachments i post above)

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] nahuelvvn:
Its working great!! Thank you :)
[Xiaomi Mi A1 Guides, News, & Discussion] ngohoainam:
thanks you! :) your file works perfectly for August patch
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
How did u do it ??

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
Some1 plz help

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] Mmihir:
Every time I try to boot with this boot image. Android gets booted and when I try to Install magisk through it.. It gives me random reboots.. Same happens when I try to Install or update apps while booted to this image..

FYI I've tried clean flashing july update and then come to august and then unlocked bootloader than after that booted with this boot image
[Xiaomi Mi A1 Guides, News, & Discussion] sgloki77:
I don't get why this thread even exist, can mods lock it up for good?

if you wanna root your phone just boot into TWRP via fastboot and flash the magisk zip

not this patched boot img mess
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
I don't know what you are doing wrong. For me it worked fine. After update to august do factory reset and try with the newest magisk manager and direct install method.
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
And what if u dont want twrp ?

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
Plz walk me through the steps again ! I really want to learn what i do wrong ...here is a screenshot of the information

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Do factory reset. Then after boot install newest magisk manager. Then restart to fastboot. Then type: fastboot boot patched_boot.img. When system is booted enter magisk manager and select install. Then select direct install. When completed, select restart in magisk. That's all. Good luck ;)
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
Thx man i will try it ...so i need to do everything from the start again[emoji29][emoji29] the file that i will flash is for august patch right ??

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Factory rest via phone settings. Not flashing rom again. After factory rest setup everything in setup wizzard and do the rest that i described before.
[Xiaomi Mi A1 Guides, News, & Discussion] panostheodorakis7:
Yes got it i need to backup my apks ....plz confirm the file

Στάλθηκε από το Mi A1 μου χρησιμοποιώντας Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Yes it is august patched image. I told earlier that i made myself. Tested on my phone. Other users used my file and everything is working fine.
[Xiaomi Mi A1 Guides, News, & Discussion] Krishna16:
Hey, are you sure that the boot images listed are for the august security patch?? Its says June and July. I'm a bit confused here.

---------- Post added at 08:00 AM ---------- Previous post was at 07:53 AM ----------

I have a question though. Will my phone factory reset itself when I flash this boot image?? I can't afford losing my data right now. Thanks.
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Post 1427 - this is the file that i uploaded. And yes it is for august security update.

---------- Post added at 08:14 AM ---------- Previous post was at 08:12 AM ----------

Read instruction from 1 post. You do not do fastboot flash!!!

You have to type fastboot boot patched_boot.img, in magisk do direct install and reboot you phone. If you have bootloader already unlock you won't lose any data.
[Xiaomi Mi A1 Guides, News, & Discussion] RedNas74:
You don't need to flash twrp. Just boot to it using fastboot then flash magisk. With this method I never had any problem.
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Hey.

Did it work? :)
[Xiaomi Mi A1 Guides, News, & Discussion] jasmeet21:
[MENTION=7177145]jashancheema[/MENTION] Waiting for your upload on August patched_boot. Thanks
[Xiaomi Mi A1 Guides, News, & Discussion] myself379:
Hi guys,

For those who decided to wait for 8.1 Oreo to be stable first before updating via OTA.

You must follow the steps as stated in the first post of this thread. Make sure you uninstall your root via Magisk Manager by using restore image. You don't have to remove Magisk Manager itself, or Xposed if you had them. Just disable them will do, to be safe, at least restart once after you uninstall Magisk root.

Then update via OTA, complete the whole process and make sure you able to boot into new 8.1 Oreo safely.

Then proceed with rooting via Magisk, follow the instruction as stated in the first post.

However, if you encounter a stuck boot like me, where it stuck at the "Android ONE" loading screen and the loader is animated endlessly even though you're using the correct patched_boot.img.

You need to use Magisk Uninstaller, to do that boot into Fastboot and "fastboot boot" TWRP to temporary use TWRP boot, and flash the "Magisk Uninstaller.zip" get it here. Make sure you DO NOT install TWRP, read before you proceed anything within the TWRP recovery. Your data will be remain, don't worry.

Then "fastboot boot" your patched_boot.img

be sure to match the released version (how to check? Go to settings > System > About Phone > Build Number) remember, every number is important.

I've attached a patched_boot.img based on tissot-F-OPM1.171019.026.V9.6.5.0.ODHMIFE and the official ROM can be found can be found in this thread.

If you wish to create your own patched_boot.img, it is simple, just make sure you have the complete ROM of the release version and download the file (.zip or tar.gz) and extract the boot.img, copy it into your phone and open Magisk Manger to patch the boot.img, then copy out the patched_boot.img and load via "fastboot boot"

Updated (1-September-2018) : Magisk Manager updated to v5.9 and Magisk to v17, I updated the patched_8.1_boot as well, link is the same

https://www.dropbox.com/s/wtc622umcqu4gfr/patched_8.1_boot.img?dl=0
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
Instead to flash stock rom from mi flash tool so that to have the abillity to get ota, is it to flash ONLY the boot.img which can be extracted from the ROM ? If yes, how to flash ? From magisk, twrp or adb ?
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
Already uploaded.
[Xiaomi Mi A1 Guides, News, & Discussion] DDKO:
when ? and who uploaded this august image?
[Xiaomi Mi A1 Guides, News, & Discussion] portox:
read the latest posts or search
[Xiaomi Mi A1 Guides, News, & Discussion] myself379:
Not quite understand what you meant,

For my case, noticed that everyone always use "fastboot boot" instead of "fastboot flash", it means we load the patched_boot.img temporary into the A1 system and boot up normally, and since it was a patched boot, you now have the "Install Directly" option available in Magisk Manager.

After rooting, you will have to reboot, but this one you didn't boot from patched_boot.img, but from the system own boot.img instead, except this time you already applied Magisk systemless root.

Hope these clear things up.
[Xiaomi Mi A1 Guides, News, & Discussion] EmilRodSalvador:
Can I update OTA if I uninstalled some system apps?
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
If for example now, I am on July update & I want to get the August update. Should I flash the patched_ boot.img of July or of August so that to get the August update ? Via adb, magisk manager or twrp ? If it is via adb then the command would be "fastboot boot patched_boot.img" or "fastboot flash patched_ boot.img" ?
[Xiaomi Mi A1 Guides, News, & Discussion] freekarol:
I didn't use patched_ boot.img while rooting my phone. I don't know why I should... I unlocked my phone - booted TWRP - flashed Magisk - rebooted phone - installed Magisk Manager. And done...
[Xiaomi Mi A1 Guides, News, & Discussion] RavinduSha:
No you can't

If you are on july update and rooted, just open magisk manager and uninstall magisk. then reboot your device. then take the update via OTA.

you don't need to boot into patched boot files to get the OTA. they are used to ROOT the device.
[Xiaomi Mi A1 Guides, News, & Discussion] xhbc:
link patched_boot.img agustus pleas
[Xiaomi Mi A1 Guides, News, & Discussion] EmilRodSalvador:
Another question: If I used substratum (using root), can I update OTA?
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
If unistallation of magisk, can't boot the mi a1(it gies me automatically in twrp) then what is the solution ? To flash some patched_boot.img ?
[Xiaomi Mi A1 Guides, News, & Discussion] myself379:
The fastest and best way to understand this process is to backup everything of your Xiaomi A1 now and experiment on it. Like we all did, we always always Titanium Backup it and copy the directory of our phones. Then we play around, read and read until we feel a little bit confident and go for it.

Based on your replies, I would say that you read a lot but not quite understand because you didn't hands-on, and you're afraid to do so because you keep afraid of losing your data.

OTA would never work if we "fastboot flash patched_boot.img". We only "fastboot boot patched_boot.img" to temporary boot into a patched system and install the root via Magisk Manager. OTA won't work any of the system is modified.
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
I don't aftaid to lose the data because I have transfered the data which I want in my pc. I had problem in ota from July to August & I had made a lot of attempts for ota (restore image via magisk, completely unistal magisk but system doesn't boot & goes me in twrp, the ota stuck in first step either with message error installation either endless loading the first step, flash a few patch_boot.img July, August & stock (in stock I lost twrp), I found update_s.zip & I tried to flash it via twrp/flashfire/flashify with no result. Every time when my system doesn't boot I restore boot from twrp backup & my mobile could boot but couldn't get ota & the solution was via miflash tool & with some trick to flash stock rom without losing data & after to get ota of August properly & after I flashed again twrp/magisk/xposed sdk 27). In previous ota (from June to July), I simple restored image from magisk & I got July ota. Now from July to August, the restoration didn't work while many times appears me that not any image exists to restore & I mind in next ota if restoration won't work then if it exists some simple solution for example by flashing some patched_boot.img instead to download again the stock rom & use miflash tool to flash it & via twrp to flash twrp, magisk & xposed sdk 27.
[Xiaomi Mi A1 Guides, News, & Discussion] fixxxer102:
You can't read don't you? I posted it by myslelfy. So scroll few posts and find!

---------- Post added at 07:01 PM ---------- Previous post was at 06:59 PM ----------

do you have twrp installed or just boot twrp? If you have installed twrp you won't get ota
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
When I was in June update with twrp installed then I restored image via magisk & I got the July update properly which means that the twrp doesn't affect the ota.
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
It depends on the order of installation. If you install Magisk first, it takes backup of stock boot.img. If you install TWRP and then install Magisk, it will backup modified boot.img and therefore restore option in Magisk won't work. My guess is that in June you followed Stock-> Magisk -> TWRP. In July, Stock -> TWRP -> Magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
When you say Magisk you mean for example Magisk 16.7 & not Magisk Manager 5.8.3. I think that in both times I had Stock -> TWRP -> Magisk because I install twrp & via twrp I installed magisk. If the magisk has modified boot.img then shouldn't work the option of restoration image so that to restore from modified to stock ?
[Xiaomi Mi A1 Guides, News, & Discussion] beeshyams:
If you did Stock - > Magisk - > Kernel and uninstall Magisk will Kernel also get replaced by stock kernel?
[Xiaomi Mi A1 Guides, News, & Discussion] myself379:
Ah, forgive me for my wrong accusation.

Hmm, note that Xiaomi A1 follows A/B partition, therefore you might be mistaken that by installing TWRP on Partition A means you have TWRP on the whole system, actually its literally A/B partition. That means it is possible that you have TWRP on Partition A and having stock recovery in Partition B, and when you apply OTA, it first download the files and copy over to the complimentary partition (i.e.: If the update is on Partition A, then it'll copy over to Partition B and package there or vice versa).

If you wish to have a proper OTA, just start from scratch again, full clean flash both Parition A and Partition B to the latest Oreo 8.1 OPM1.171019.026.V9.6.5.0.ODHMIFE via "fastboot flash". Lookup other thread on how to change boot sequence between Partition A and Partition B. If the official ROM hasn't released yet, just grab any old will do, it'll auto-detect new updates in any way.

To me, this A/B partition system is quite genius implementation from Google.
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
Yes, I was able to apply OTA with Franco Kernel this way couple of times. Just make sure that you use kernel which does not touch the system partition.

---------- Post added at 09:39 AM ---------- Previous post was at 09:27 AM ----------

Magisk is set of both, Magisk core which is installed in boot image and Magisk Manager used for Magisk management. Magisk installation scripts create backup of currently flashed boot.img and if it's stock, you can restore boot image later and apply OTA. I'm certain that installed TWRP will cause OTA to fail.
[Xiaomi Mi A1 Guides, News, & Discussion] navin431:
August security patch

Can u please provide the August patch to root sir
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
Why don't you flash the magisk from twrp so that to root it ?
[Xiaomi Mi A1 Guides, News, & Discussion] Vaibhavk2001:
Not able to root

When I boot in patched_boot.img my phone gets stucked in bootloop and when i forcefully reboot my phone it boot agains normally without any root. Plsss help
[Xiaomi Mi A1 Guides, News, & Discussion] ngohoainam:
thanks for your useful guide :):good:
[Xiaomi Mi A1 Guides, News, & Discussion] Bazilli:
+1.