yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
Somebody can give me a link to the boot.img (or the ROM) from either

the update from 1. March 2018 (Android 8.0.0) or

the security update from November 2018 (Android ?)?

I don't find it neiter here nor in the other thread: [FASTBOOT][OTA] Xiaomi Mi A1 OTA & FASTBOOT Images

Thanks

frank

EDIT: the old 1.March 2018 (8.0.0) ROM is there (1.4 GB):

Android 8.0.0 [OPR1.170623.026.V9.5.9.0.ODHMIFA]

one link from the post above, I just didnt realize.

After the update from 8.0.0 to 8.1 I didnt pay attention (there is no more Xposed for Android 9!!!) and my system updated automatically to Android 9 with security patch from Januar 2019 (PKQ1.180917.001.V10.0.4.0.PDHMIXM).

The ROM for this I found on androidfilehost.

I am not sure, if the boot.img in this is be able to get patched with Magisk, but I will try.

Yes, this worked. But it set my A1 back to factory mode, all settings were gone. I think this is when doing fastboot oem unlock, after that command it got erased.

Never mind, I calculated with that.

I have root now, on Android 9.
[Xiaomi Mi A1 Guides, News, & Discussion] anirbannath:
I am aware of the difference between system.img and boot.img. I flashed the system.img as per your directions and that disabled the root apps that had probably altered the file in the first place (like AdAway). However, like I mentioned in my previous post, Magisk showed that the stock boot image was not there and so the OTA failed. At this point, I tried to manually flash the stock boot.img from the factory image and ended up completely bricking my phone. (I got that dead Android logo saying "No command")

That's when I decided to download the fastboot ROM and flash the whole factory 10.0.4.0 image in the "save user data" mode but when the phone rebooted after installing the ROM, I saw that the device had been completely wiped and I had to set everything up again from scratch.

Was it because I didn't alter the flashing script?

Is there any foolproof method to get updates on a rooted device without this nightmare happening over and over again? Even if OTA is not possible, I am willing to download the ROM as it arrives and flash it, but not if it erases all my data, even after explicitly commanding it not to.

I have also seen that this "save user data" batch file isn't there in some fastboot ROMs. Like the December update ROM that upgraded Mi A1 to Pie didn't have it, but at that time, I had used the "flash_all.bat" and all my data was perfectly preserved and the update was successful. Didn't lock bootloader either. So what's up with all these weird naming conventions?
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
You must have done something wrong. System partition doesn't hold any files related to root. They are in data and boot partition. Boot.img is basically kernel with recovery, flashing correct file can't result in a brick. "No command" is welcome screen of built in recovery mode.

Stock flashing script lock bootloader at the end of the process, which results in data wipe. You must modify these files by hand before running them. Do not use Miflash.

The official OTA update procedure with Magisk couldn't be easier. There is nothing more "fool proof".
[Xiaomi Mi A1 Guides, News, & Discussion] dixtir:
Completely off-topic question but somehow related. Is Gcam dead on mi A1 pie 9?
[Xiaomi Mi A1 Guides, News, & Discussion] paolocorpo:
Absolutely no

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] dixtir:
I feel like Gcam is no longer working on Mi A1 on pie 9. Autofocus goes berserk and sometimes I fear its possessed by a poltergeist or something.
[Xiaomi Mi A1 Guides, News, & Discussion] paolocorpo:
Yes you are right !

Gcam does not work well but can be installed

I was thinking that you were saying that Gcam is not installable on Pie ;)

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
Can anybody hint me, how to go back to 8.1, when already the 9 OTA is installed?

I was sleeping when that happened, had the auto update still activated and want to use Xposed which is for 8.1 in its last (even only beta) version.

Thanks, frank
[Xiaomi Mi A1 Guides, News, & Discussion] Zoro12:
I booted with the command

"fastboot boot patched_boot.img"

Is that okay

Will it work? did it keep my OTA functional ?? :eek:

---------- Post added at 08:52 PM ---------- Previous post was at 08:49 PM ----------

Also make a dedicated thread for installation of OTAs (after rooting with the above method!!! ;)
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
Yes, just go to Magisk manager, install, direct install.

OTA guide already exists - https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md
[Xiaomi Mi A1 Guides, News, & Discussion] def.man:
I'm selection direct install in Magisk Manager, I see the download finishing but nothing happens afterwards. I reboot after a while and the install button is still there and safety check returns error as aways. Have tried that like 4 times already.
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
Which command did you use?

- fastboot boot patched_boot.img

or

- fastboot flash boot_a/boot_b patched_boot.img
[Xiaomi Mi A1 Guides, News, & Discussion] blondeal:
It doesn't matter for me to save my datas, so to unroot and return to a stock configuration (oreo) you suggest me to perform full clean ROM flash ? (how to proceed ?)
[Xiaomi Mi A1 Guides, News, & Discussion] priestoko:
in my 1st try i successfully rooted and installed GCam but it was laggy and i didn't know about this permissive file so i installed the last December update and re- download oreo

when i knew about this permissive file i tried to root my phone many times but i got stuck in android one logo

NB:when i re-flash the 2nd December stock rom i choose clean and lock option

any suggestion ?
[Xiaomi Mi A1 Guides, News, & Discussion] jitensetia:
Hi,

somehow I bricked my phone, and I had to downloaded the stock rom but I cannot get the Oreo update now. I tried every possible way to get the update but now it is not giving the update (enabling and disabling framework).

Currently I'm on build N2G47H.7.12.19

Also, to note I'm getting Android System webview as DISABLED... is it any problem ?

Thanks in advance
[Xiaomi Mi A1 Guides, News, & Discussion] NayLinHtet:
If I want to goback stock,what should i do?
[Xiaomi Mi A1 Guides, News, & Discussion] vkbhanwariya:
Is this patched boot image work with beta build. I don't have installed Stable oreo. I am on beta :D:D. Can you explain me how to patched boot image:confused:
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
No dont try this on beta.
[Xiaomi Mi A1 Guides, News, & Discussion] hemantv:
So unlocking the bootloader doesn't wipe any of the data on the storage? If it is that so, it would be really nice. I don't want to setup all my stuff again. The one time I did it on my Nexus 5, wiping the data was implied.

Let me know so that I can have some fun this weekend. :)
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
Dnt take tension

Ur data will be safe.

???
[Xiaomi Mi A1 Guides, News, & Discussion] Zoro12:
Wait till u receive it it may take time

---------- Post added at 07:33 AM ---------- Previous post was at 07:29 AM ----------

It will work for beta too

But be careful

---------- Post added at 08:05 AM ---------- Previous post was at 07:33 AM ----------

It's a one way trip

As now you have downgraded to nougat you won't receive Oreo update now because Google has stopped sending OTAs
[Xiaomi Mi A1 Guides, News, & Discussion] punkmexic:
what happens if i re-lock my xiaomi mi a1? will that be a problem? or should i stay unlocked? i don´t like the message that adverts that im unlocked and that xiaomi can't check my security or something.....
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
First unroot ur phone then lock bootloader.

Otherwise ur device will be brick
[Xiaomi Mi A1 Guides, News, & Discussion] coolkoushik07:
Your method won't help ota update by magisk proceedure..
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
Yes, once Xiaomi releases fastboot Oreo ROM, perform full clean flash and you have 100% stock phone. At the moment you can return back to fully stock Nougat only.

---------- Post added at 09:17 AM ---------- Previous post was at 09:14 AM ----------

Strangely this phone will not erase data when you unlock/relock the bootloader. It's a bit of security flaw.
[Xiaomi Mi A1 Guides, News, & Discussion] Zoro12:
Will 1st command cause problems??

Cuz I used 1st command

Help?!!!
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
No, that's the correct way. If you're still having issues installing Magisk, reflash stock boot.img and repeat steps (fastboot boot patched_boot.img, direct install Magisk, reboot). I suspect that you have flashed patched_boot.img at some point.
[Xiaomi Mi A1 Guides, News, & Discussion] Zoro12:
I have no issues but I am still concerned for the OTA ;))) tysm dude!
[Xiaomi Mi A1 Guides, News, & Discussion] dixtir:
Same here buddy. I want to rollback to Oreo but I still haven't found a clear-cut tutorial on how to do it.
[Xiaomi Mi A1 Guides, News, & Discussion] paolocorpo:
Do you have a backup of your relevant partitions like EFS, persist done with Oreo ?

If no there is the risk to loose some functions like IMEI or Mac address or/and as worst expectation ...

.. to have a bootloop

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] anirbannath:
I suppose I must have done something wrong then. Thanks for the technical specifics.

By the way, that official OTA update guide for Magisk is showing a 404 on Github. Could you maybe lay down the steps once more?
[Xiaomi Mi A1 Guides, News, & Discussion] dixtir:
I've done none of that aforementioned necessary steps.
[Xiaomi Mi A1 Guides, News, & Discussion] _mysiak_:
It has been moved to a new link https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
Me neither unfortunately.

So I forget about Xposed, which is sad, including Xposed additions, Xposed Edge, gravity box...

Damn.

---------- Post added at 22:13 ---------- Previous post was at 22:11 ----------

But if i first do a TWRP backup of 9 and try that down grade, i could restore the backup if not working, isn't?
[Xiaomi Mi A1 Guides, News, & Discussion] paolocorpo:
It sounds good but I can't give you the certainly

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] adenology:
I've done with oem unlock and my system is on 10.0.4.0, however an error occured after i tried to type "su" in terminal emulator it said "permission denied" any ideas how to make it works? thanks
[Xiaomi Mi A1 Guides, News, & Discussion] paolocorpo:
Are you running stock 10.0.4.0 version ?

Have you booted using teh relevant patched_boot.img ?

Has the device restarted after the cpomand of boot ?

If yes ... you would have temporary root permission ...

TO me no priblem with this procedure
[Xiaomi Mi A1 Guides, News, & Discussion] adenology:
yes i am running stock 10.0.4.0 version and downloaded boot img from the link you provide, it's the same version with mine right? i'll attach device version screenshot below.

the device is restarted after the command in fastboot. however when i type the su command in termux the error occured. :l
[Xiaomi Mi A1 Guides, News, & Discussion] paolocorpo:
Probably could be better generate patched boot by yourself using your device!!

Now I can't ... Later I will provide you the relevant procedure if it is necessary for you

Inviato dal mio Mi A1 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] haloho:
patched 5 feb pleas3
[Xiaomi Mi A1 Guides, News, & Discussion] shikyo0413:
maybe this will help. got it from facebook group.

credit to this awesome person.
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
Does anybody know the answer of this very basic question:

If i do the actual system update with the Magisk trick (to keep Magisk after the update), will TWRP be still there?

Or do i need to flash it (,TWRP) again with fastboot, after the update?

Thank, frank

(EDIT: emphasize TWRP to better understanding the question, insert the link to the "Magisk-OTA-trick")
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
How to keep the magisk after update ? With the choise image restore ? When I make update then I lose twrp & magisk. The magisk as magisk manager exists but doesn't work because it needs the zip flashing. What do you mean that you keep the Magisk?Only Magisk manager or with zip flashed so that the rooting works properly ?
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
Have you read the first post?

Especially the fat red link to that Guide?

USE THIS GUIDE WHEN OTA ARRIVES

I mean TWRP. Not Magisk. TWRP.

---------- Post added at 21:13 ---------- Previous post was at 20:53 ----------

I just tried to start the new system update (fevruary 2019) and went the way in the Magisk OTA guide, where it says:

Magisk > Uninstall > Restore images

But: I get then an error "Stock backup does not exist!"

(in fact I get the german message: "Kein Original Backup vorhanden!" and looked up the original en-string at github)

How do I get that Stock backup and which is ment exactly?

I found that question on reddit, but I am not sure if that fits.

Is that a common problem?

I found it unsolved here in posts #411 and #478

Iasked it in the Magisk Thread...
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
The guide not found. Resend me the link.
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
Dont know what I did wrong, corrected it. Here is it (and in the first post anyway):

Tutorials
[Xiaomi Mi A1 Guides, News, & Discussion] Johnn78:
I have seen it again but doesn't work in my mi a1.
[Xiaomi Mi A1 Guides, News, & Discussion] Razoralpha:
Can anybody upload the unpatched boot.img from the february rom update?
[Xiaomi Mi A1 Guides, News, & Discussion] morcio:
One is here: https://xdaforums.com/mi-a1/how-to/guide-rooting-mi-a1-twrp-wiping-post-t3824550

The other one, already patched, is here: https://xdaforums.com/showpost.php?p=78969076&postcount=1796

NONE OF THEM WORKS ON MY PHONE, please let me know if it has worked for you.
[Xiaomi Mi A1 Guides, News, & Discussion] Razoralpha:
Thank you it did work for me. (The unmodified one)
[Xiaomi Mi A1 Guides, News, & Discussion] Parnas72:
After OTA update everything is stock, so you'll have stock recovery and stock bootloader (no TWRP).

The "trick" only reinstalls Magisk after the OTA.
[Xiaomi Mi A1 Guides, News, & Discussion] SM-03:
Can anybody give me the download link of the original stock ROM image file for Mi A1 Pie v 10.0.4.0 January 2019?
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
Here is all ROMs:

Rooting Mi A1 without TWRP
[Xiaomi Mi A1 Guides, News, & Discussion] Timtai:
I'm confused about the last step of install Magisk using direct method. I have already finished the other steps and rebooted the phone. However, when I run Magisk Manager to install Magisk, a window appears asking if I want to install Magisk-v18.1.zip now. When I click "Install", another window appears which states:

Select Method

Download Zip Only

Patch Boot Image File

If I choose Download Zip Only, then it just downloads the zip file and nothing else happens. No install of Magisk. I'm hesitant to choose Patch Boot Image File since I don't want to brick my phone by choosing the wrong option.

Can someone provide a bit more direction about this? The Magisk Manager on my device does not provide a "direct method" as indicated in the steps on the first page.

Thanks!
[Xiaomi Mi A1 Guides, News, & Discussion] HrÏtHîK M!Ke:
Reflash the patched boot IMG and then direct install will appear;)
[Xiaomi Mi A1 Guides, News, & Discussion] Timtai:
Thanks for the quick reply. I'm still unsure exactly what you mean though. Are you saying I should select "Patch Boot Image File" from Magisk Manager? And if that's the case, do I just browse to the folder which contains the patched boot image and select that?
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
No. You need the boot.img of your system, you patch that with Magisk, then you flash it, but not with Magisk.

The boot.img needs to be the one of your system, exactly that.

The instruction of post #1 has only old links of these. You have to download it from somewhere, there is another post on xda with all them.

To flash the patched_boot.img you need a computer and the requisites on your phone must be taken (unlock, usb debugging etc).

When you first unlock the phone, all data are cleared, attention.
[Xiaomi Mi A1 Guides, News, & Discussion] KenK13:
Hi, I was able to get root with the instructions supplied here. But I have a question I didn't see mentioned in the pages I looked at. What happens if I wish to install TWRP after performing root using the patched_boot.img/Magisk method? Will I lose OTA updates or still be able to get them? TKS!
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
Installing TWRP will lose you OTA update. If you chose to install TWRP, you don't have to follow this patch_boot method.
[Xiaomi Mi A1 Guides, News, & Discussion] KenK13:
OK. Thanks. That's what I wanted to know.

Is there an app or some type of PC program though that would allow me to do a similar backup such as what TWRP does and restore it if needed at a future date? Not just a Titanium type backup of various apps, but something that would backup the necessary partitions and allow for full restoration?
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
Here [RECOVERY] [TREBLE] TWRP with Tissot Manager (Treble & Dual boot support)

It call bootable TWRP or hotboot

Download img file. Use "fastboot boot" command. DO NOT flash/install
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
[FONT=&quot]Oh! That is the first time I hear this.[/FONT]

[FONT=&quot]I rooted my A1 with Magisk like described in #1 and then I flashed TWRP.[/FONT]

[FONT=&quot]I was trying to update then to the February 2019 update with no success and asked that here, #1797 and in the Magisk thread.[/FONT]

[FONT=&quot]Nobody told me to uninstall TWRP first.[/FONT]

[FONT=&quot]No wonder then, why it failed.[/FONT]
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
Magisk is focusing on preserve the system while having the root. OTA is more than that such as recovery and boot partition. Difference manufacture have difference partition, that why you should not ask there

Edit: You not only have to uninstall twrp but you have to flash stock recovery
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
So how could I then uninstall TWRP to get back OTA possibility?
[Xiaomi Mi A1 Guides, News, & Discussion] ltf_195:
The safest method is by download MiFlash and flash stock ROM here to make sure your phone back to stock.

1. Follow the guide and Flash stock rom. Be careful, because even though you chose to save user data, it will lock your bootloader and wipe your data. Refer this post to avoid data wiping. Backup your data for safety.

2. Check for the update and update to the lastest security patch.

3. Install Magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] NTJ:
I need some help, I was trying to update OTA but when I press restore images it said: "stock backup doesn't exist!"

Can anyone walk me through this?

---------- Post added at 09:15 AM ---------- Previous post was at 09:15 AM ----------

I need some help, I was trying to update OTA but when I press restore images it said: "stock backup doesn't exist!"

Can anyone walk me through this?
[Xiaomi Mi A1 Guides, News, & Discussion] rafasilva93:
I feel the same man, the best gcam i had ive uninstalled thinking in upgrade... that's my biggest fault

The actual gcam is a totaly trash and i cant find what is the version i had, i already downgrade to oreo 8.1 and i try to install in the celsoazevedo site from

GCam_5.3.015-Pixel3Mod-Arnova8G2-1.4.apk (Arnova8G2, 2018-10-04, changelog)

to

GCam_Pixel3Mod_1.3_build.6.1.021.apk (Arnova8G2, 2018-11-27, changelog)

Installed and tested at least 90% of all those versions and all sucks and isnt with the same software of the cam i had HDR+ 1.0.220943774z the best gcam of all to me (this you can search looking for the exif of an photo taken by the camera)

I have asked here on xda for help and i got 0 answers about that ahahhahhahahha
[Xiaomi Mi A1 Guides, News, & Discussion] tigerija:
I had this issue and after I restarted my phone it worked fine.

Where can I find April patched boot to root with magisk (Android Pie)?
[Xiaomi Mi A1 Guides, News, & Discussion] lutziferien:
Patched boot image June 2019?

Hi, is there a patched boot image for June 2019 available? I'm on Android 9/Magisk Manager 7.3.1 and got unrooted after a security/Magisk update on 1st of june...
[Xiaomi Mi A1 Guides, News, & Discussion] Alexths:
Here you are :)

https://drive.google.com/open?id=1zclIgJmX_fYHQAxIW58f5S8r-HSAmvFD
[Xiaomi Mi A1 Guides, News, & Discussion] Robinson919:
Talk about timing!

I reset my phone, flashed a new ROM, just because there was not patched boot image, now you hit me with this, I'm happy but disappointed that you didn't submit earlier.

Thank you tho!
[Xiaomi Mi A1 Guides, News, & Discussion] bergemes:
ANYONE

For anyone who wants patched boot images

search for ''Enable Camera2 API on Xiaomi Mi A1 running Android Pie (Without Root)''
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
Hello back now again here :)

I did that now, flash the stock 10.0.9.0 to start new with a clean stock recovery. I had too much "The System has been destroyed" messages lately. Every time I needed to flash patched_boot.img again to get the phone to boot.

The flashing worked, I edited first the batchfile and deleted the line with the lock command :)

All data are still there, only Magisk has gone :)

After an OTA to 10.0.12.0 I installed Magisk again with instructions in first post here and the patched_boot.img from the previous post (#1828).

Thanks, works.

---------- Post added at 19:58 ---------- Previous post was at 18:59 ----------

What I really don't understand is, how I could restore Magisk after an OTA, as described on github. After the OTA the boot.img is different and so the patched_boot.img would be different. When I uninstall Magisk (restore Images) it would write back an old version of boot.img to system, but this would be different from the stock boot.img after the OTA, isnt it? The OTA would not work with an old restored boot.img, would it?

What did I not get here?

And after all, I still have not a file data/stock_boot_<sha1 string>.img.gz

(where <sha 1 string> is the sha1 of it)

EDIT: the stock_boot... is there again.

I had an issue with the modem, the phone didnt work anymore after 10.0.9.0 flashing, so I had to restore the modem from TWRP backup and it worked.

I guess the next update OTA wont work therefore, as I changed the modem (restore).

I will try...

... and write here if it worked or not (if I dont forget).

... not working, the September 2019 update, I won't try the October Update, as it won't be any different, I guess.
[Xiaomi Mi A1 Guides, News, & Discussion] lutziferien:
Hello there,

after installing magisk 20 (edit), I get a "the system has been destroyed" message after reboot. I can get the mobile back to work temporarily by booting over fastboot, but at the next reboot (even after flashing with Magisk), the same error occurs.

Edit: Problem solved.

Uninstalling magisk/unrooting, updating with October 2019 Android 9 OTA update & re-rooting with magisk 20 solved the problem.
[Xiaomi Mi A1 Guides, News, & Discussion] francwalter:
I hope you didnt try to install TWRP, cause this makes this system destroyed thing.

I doubt that Google Device Health has something to do with the issue.

I would propose to flash the system newly, but with preserving installed apps (not doing factory reset) as that is possible.
[Xiaomi Mi A1 Guides, News, & Discussion] lutziferien:
Thanks for the quick answer. No TWRP involved, no,. I'll try to flash the system.