yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Guides, News, & Discussion] beeshyams:
[MENTION=3964603]majamee[/MENTION]

Information that may help others and at your discretion may consider to add in OP

I have a 32 bit machine with latest adb for 32 bit and when the batch files failed I ran individual commands. It failed at flashing system.img because the size was bigger than what the adb could handle (error: cannot load 'system.img': Value too large for defined data type)

The only workaround was flash the stock rooted zip from the thread maintained by Sooti and flash only the boot.img using fastboot commands in both partitions . OP in the thread had provided stock boot (https://xdaforums.com/mi-a1/development/rom-tissot-stock-oreo-8-0-rooted-t3735760)

May be of use to those still running 32 bit
[Xiaomi Mi A1 Guides, News, & Discussion] DoR3M3:
I flashed the latest version in MiFlash V9.5.11.0.ODHMIFA

Now when I flash AospExtended, and Magisk 16.0 in TWRP, Magisk doesn't show up in the App Drawer. I've never had any problems before flashing roms and Magisk when I just flashed from the Stock Oreo Rom.

Anyone else seeing this?
[Xiaomi Mi A1 Guides, News, & Discussion] Xaviers101:
Flash rom

Flash twrp

Reboot to recovery

Flash Gapps

Flash magsk

:good:

I didnt flash latest stock oreo the one u mentioned above.

I was on RR+ fk. I wiped system cache data and flashed aex. Everything is working fine. battery charging and backup all good.

---------- Post added at 06:41 AM ---------- Previous post was at 06:37 AM ----------

I think u have to flash stock rom via flash tool to lock the bootloader.(just my opinion)
[Xiaomi Mi A1 Guides, News, & Discussion] DoR3M3:
I think I figured it out, someone mentioned to me, besides the default Wipe; Dalvik/ART Cache, System, Data, to then go back to Wipe and select Format Data and type yes, and then I believe doing this on both slots...

Anyhow, I realized to many wipes and something was messing it up, so I just stuck to the old basic wipe instead; Dalvik/ART Cache, System, Data and it's working fine now... ;)

P.S. Anyone reading this, MiFlash can be really buggy at times, so it's better to just run the scripts and flash! :)
[Xiaomi Mi A1 Guides, News, & Discussion] sgloki77:
quick question,

when editing the bat file to avoid relocking the bootloader, what exactly needs to be removed?

is it only the "fastboot oem lock" part?

or is it the whole line

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

I just dont wanna bork the script
[Xiaomi Mi A1 Guides, News, & Discussion] ilija simeunovic:
Please update thread with the latest 8.1 update.
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Post updated with Fastboot image link for Android 8.1 July security update. :)
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
It is always the part with "oem" commands, which need to be modified. In your example:

from

ECHO "Flash keymasterbak error" & exit /B 1fastboot %* oem lock

to

ECHO "Flash keymasterbak error"

(Explanation "&" is being used to call one command directly after the other, as we remove the second command which includes the "oem lock" part the "&" has to be removed too. If too unsure, better to remove the whole lines including "oem" commands, if you want to avoid unlocking/ locking of your bootloader.)

Reminder: unlocking the bootloader deletes since Android 8.0 on the Mi A1 all data.
[Xiaomi Mi A1 Guides, News, & Discussion] ilija simeunovic:
Is it from Xiaomi official, or extracted package?
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
The link points to the official miui.com (Xiaomi-Server) as you can see ;)
[Xiaomi Mi A1 Guides, News, & Discussion] KaaMyA:
Thanks [MENTION=3964603]majamee[/MENTION] for your contribution.

Very clean and organized list, just what I needed :)

Also, thanks for taking a time to help us, replying our questions ;)
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Happy, that I could help. I am also happy if that damn thanks meter fills up, I hate empty progress bars :D
[Xiaomi Mi A1 Guides, News, & Discussion] HidekiRyuga:
Very useful thread, Thanks for updating it to the latest rom.
[Xiaomi Mi A1 Guides, News, & Discussion] ibooth2004:
So using the script that doesn't wipe userdata, I can remove the "fastboot OEM lock" parts, and I can update my phone that has Magisk without losing any data?
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
So first of all, I am not using Magisk on the phone myself so I can't say for sure. Nevertheless as explained in the OP, it is the unlocking of the bootloader which is now triggering the data wipe as security messure. So, if you have an unlocked bootloader and you ensure by removing the "OEM" commands from the script and prevent any locking and unlocking during the process, the data wipe should not get triggered. Don't know if Magisk could influence this, I'd propose to follow these instructions by the author of Magisk: https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md
[Xiaomi Mi A1 Guides, News, & Discussion] ZoLtAnVaSs:
Hi there!

Despite many UI "facelifts", I decided to roll back my phone to Oreo 8.0. And for sure, I am staying with June Update 8.0 until a stable(for real) and not a battery killer & totally laggy 8.1 comes out.

For those who want also want to make this move: Install adb + fastboot (device drivers), Unlock your Bootloader, I used flash_all_lock.bat (to lock bootloader again) and that's all. Good to go.

Worked fine with latest 8.0 build (June Update).

PS: Bootloader lock & unlock wipes your user data.

Cheers! :D
[Xiaomi Mi A1 Guides, News, & Discussion] Kurkotain:
locked? mi a1

Greetings!

I'm having a confusing problem with my Mi A1. Bought 2 of them, one got the oreo update out of the box, mine didn't. Been waiting for months until i got tired of waiting.

Tried to flash it manually and through miflash tool

cmd flash shows

C:\platform-tools\8.1>flash_all.bat

C:\platform-tools\8.1>fastboot getvar product 2>&1 | findstr /r /c:"^product: *tissot" ||

and does nothing

while miflash shows

"error : Erasing boot failed, maybe the device is locked"

and shows error in the result

thing is, the device was first unlocked through the developer options menu, and confirmed by the miunlock tool

in case something went wrong i relocked it and unlocked it again through fastboot oem device unlock and confirmed status with fastboot oem device-info

i'm at my wits end and my googling of the problem shows nothing like it apart of bricked phones, which my phone still works fine if i let it boot to android.

i even tried to factory data reset it and still no go at flashing

can anybody help with this issue?
[Xiaomi Mi A1 Guides, News, & Discussion] geek7827:
doesn't work gives a 2&<1 get var product tissot error.. tried with mi flash tool, gets flashed in 1 sec shows success but doesn't changes anything. pla help asap. thanks in advance. I have to give my for in service center but can't with a custom rom and unlocked bootloader.. :p
[Xiaomi Mi A1 Guides, News, & Discussion] AndrewADB:
Hmmm... sounds like you need to proceed as though your Mi A1 was bricked, in other words, completely reflash its rom (be careful not to erase your IMEI and other WiFI and Bluetooth data, though). However, you can consider yourself lucky because you can backup all your data quite easily.

Check the various guides here on XDA, but basically all you need is a Windows PC, the Mi Flash Tools and the USB-C cable. And some patience. :D
[Xiaomi Mi A1 Guides, News, & Discussion] sgloki77:
any idea when V9.6.5.0 august build stock rom will be available?
[Xiaomi Mi A1 Guides, News, & Discussion] Mubaris:
Im getting a errorthat is mismatching device or file what should I do?? Pls help
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
https://xdaforums.com/showpost.php?p=75761406&postcount=118 ;)

1.) Ensure latest drivers

2.) If on Mac/ Linux try calling the script with "sudo"

3.) If all that does not help, execute the commands from the script 1 by 1

Good luck :)
[Xiaomi Mi A1 Guides, News, & Discussion] Mubaris:
I had latest drivers.i didn't understand what you mean by sudo !

---------- Post added at 02:11 PM ---------- Previous post was at 02:10 PM ----------

Or can u give me the link of latest drivers ?
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Are you even using Mac or Linux? But just in case, you are: https://en.wikipedia.org/wiki/Sudo

So first of all which OS are you running?
[Xiaomi Mi A1 Guides, News, & Discussion] Mubaris:
Windows 7
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Then you can either use the following tool & guide as stated in OP: http://en.miui.com/a-234.html

Or you could use the following tool to install latest fastboot & adb for Windows: https://xdaforums.com/showthread.php?t=2588979
[Xiaomi Mi A1 Guides, News, & Discussion] Mubaris:
Flash done but not booting up
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
According to the image you are trying to flash a very old firmware version. Try to exchange the tissot_image you are using, by one more up to date. You can find the latest Download package here:

http://en.miui.com/download-333.html
[Xiaomi Mi A1 Guides, News, & Discussion] Mubaris:
I tried to flash the new firmware but it showing me the error that missmatching image and device.!
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
To see why the mismatch message apperas:

Please boot your device in fastboot mode and run the following command

fastboot getvar all

Please share the output here, so that we can have a few more details in order to help. :)
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Thread updated, last Fastboot package with October 2018 security patch added
[Xiaomi Mi A1 Guides, News, & Discussion] lord-overwrite:
Google calendar app it's too big 555 MB it's a bug
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Then please report it to the devs of this rom, I am merely providing here some assistance with keeping log of the so far released fastboot files.

Afaik you can repot bugs about the ROM itself here: https://en.miui.com/forum.php?mod=bugfeedback&fid=5&page=1 ;)
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Thread updated, last Fastboot package with November 2018 security patch added
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Everything seems so complicated, isn't there a tool to assist me? --> I did some research and there seems to be one: https://toolaio.tk/

[IMG="toolaio-screenshot01"]https://i.postimg.cc/13hZrjH6/Tool-1-1-0-4.png[/IMG] All credits for this tool go to its creator mauronofrio

[IMG="toolaio-screenshot02"]https://s5.postimg.cc/txnwo6s87/1.0.8.1_advanced.png[/IMG]
[Xiaomi Mi A1 Guides, News, & Discussion] Xaviers101:
currently my phone is bricked while trying to 'clean flash all and lock' via mi flash. The process ended with an error which i never seen before and now i m stuck in bootloop. apparently the bootloader seems locked now so cant perform the following:

cannot fastboot oem unlock

cannot boot into twrp image.

cant use mi flash tool again (same error with all 3 flash modes)

cannot adb sideload rom zip

Should i throw my mi a1? cos all hopes seems lost. please help.
[Xiaomi Mi A1 Guides, News, & Discussion] Kurtinaitis:
Hi Xaviers101.

Can you enter in fastboot mode?

I,ve been in similar circunstamces in the past but after some hours of trying, i could save it changing the active slot through fastboot and booting again( i cant remember now the command). The other slot had system uncorrupted.
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Can you still get your phone into fastboot mode? If so and you are not affraid to use Linux, I'd say this and the shell script would probably your best bet. If you are Windows and rely on some assistance, please feel welcome to give https://toolaio.tk/ a try. As it sounds, you've got not too much to loose right now. You are welcome to give an update here and if you need further assistance, I would need to know the exact error screens at least as a lead.
[Xiaomi Mi A1 Guides, News, & Discussion] Xaviers101:
> thanks for replying to my post.

Yes, i can enter fastboot mode but i cannot use command: fastboot boot recovery.img to boot twrp nor i can use fastboot oem unlock (remote: device locked). It seems that the mi flash process though ended badly, apparantley has locekd the bootloader. Regarding changing slot i will do a research and try it meanwhile if you get some info regarding it please quote me. thnks!

---------- Post added at 04:10 AM ---------- Previous post was at 03:51 AM ----------

The tool clearly mentions "before proceeding with the commands, to make sure oem unlocking and usb debugging is enabled"

This i cannot do because i cannot boot to system to go to developer options to enable them. bootloader is locked and cant even use command : fastboot oem unlock .
[Xiaomi Mi A1 Guides, News, & Discussion] Xaviers101:
I want to share with you all my bitter experience just recently. i almost took my device to service centre post which i was planning to throw my device if no other options.

"""currently my phone is bricked while trying to 'clean flash all and lock' via mi flash. The process ended with an error which i never seen before and now i m stuck in bootloop. apparently the bootloader seems locked now so cant perform the following:

cannot fastboot oem unlock

cannot boot into twrp image.

cant use mi flash tool again (same error with all 3 flash modes) """

If all above sounds familiar , u have basically hard bricked the device, i would suggest you try the following(one or the other unti u solve the issue):

1. first of try to get to EDL MODE by command: fastboot oem edl (this should restart your phone to black screen and the notfication should should blink which is an indicator) Then flash via mi flash tool in EDL mode.

Alternative way to reboot to EDL mode ( refer: https://xdaforums.com/redmi-note-3/how-to/guide-reboot-to-edl-mode-fastboot-test-t3398718)

2. adb sidellaod rom zip ( search google for the method, its easy!)

3. flashscripts to flash rom without mi flash tool (refer: https://xdaforums.com/mi-a1/how-to/ota-official-fastboot-image-n2g47h-7-12-t3728929)

4.Slot Switch ( enter fastboot mode and connect to PC, run minimal adb fastboot/cmd/powershell, enter commands: fastboot --set-active=a

fastboot reboot/// try to see which slot works for you : repeat: fastboot--set-active=b) btw this worked in my case. :)

5. Fastboot command line tool refer: https://toolaio.tk/ ( TOOL ALL IN ONE)

6. LAST RESORT: TEST POINT METHOD to enter EDL MODE and then mi flash rom. requires little bit of peeping under the hood) refer: http://en.miui.com/thread-1680467-1-1.html

THANK YOU SO MUCH GUYS : [MENTION=9442754]Kurtinaitis[/MENTION] (for the slot switch idea)

[MENTION=3964603]majamee[/MENTION]

[MENTION=9299667]romantissm[/MENTION](for pushing me forward, not to give up on my beloved mi a1)

[MENTION=8676627]AridaneAM[/MENTION]

ps- mi a1 is a great phone , treat it nicely. go easy with the 'flashing'
[Xiaomi Mi A1 Guides, News, & Discussion] Kurtinaitis:
fastboot set_active A

fastboot set_active B

It sounds me something like that.

Some command to check active slot as well but i cant remember.

Try and we'll see.

Good luck mate. I was desperated and finally got it. Dont give up.

I had a bookmark in my computer to a reddit thread but original thread was deleted.
[Xiaomi Mi A1 Guides, News, & Discussion] Kurtinaitis:
Congrats!

Happy flashing! :)
[Xiaomi Mi A1 Guides, News, & Discussion] spicediablo:
How do I flash latest without bootloader getting locked? Do I hold down the volume + while rebooting?

The last time I flashed using mi flash and lost my data. Now I have to be careful...

Sent from Sagit
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
Look here:

https://xdaforums.com/showpost.php?p=78272924&postcount=740
[Xiaomi Mi A1 Guides, News, & Discussion] spicediablo:
But how to modify the script?

Sent from Sagit
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
With basic coding skills and a text editor or otherwise, please have a look at the other 2 tools in OP in the FAQ area, if that is maybe easier for you to accomplish your goal.

Edit:

Plus, reading carefully would also help a lot. I just re-checked for you the OP, which clearly states:

Short Flashing Guide:

Choices for flashing/ Which script to run?

flash_all = Full flash, like factory reset, bootloader stays unlocked

--> If you want to keep your data, it should be working fine with that script after removing these two lines:

fastboot $* flash userdata `dirname $0`/images/userdata.img
if [ $? -ne 0 ] ; then echo "Flash userdata error"; exit 1; fi

(no guarantees!)

P.S.: Hit thanks ;)
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
I removed "fastboot oem lock" command, "clear all and lock" and "clean all" script.

You can download the Rom I posted and flash it with Miflash, script is already modified.
[Xiaomi Mi A1 Guides, News, & Discussion] spicediablo:
Can i have the link please?

Sent from Sagit
[Xiaomi Mi A1 Guides, News, & Discussion] wmfanboy25:
https://android.googleapis.com/pack.../979dc18ab3b41cc5bfca4d1321be8ec78ed97ca0.zip
[Xiaomi Mi A1 Guides, News, & Discussion] Amanpreetsingh:
This is pie rom ??
[Xiaomi Mi A1 Guides, News, & Discussion] wmfanboy25:
Yes but I don't know how to extract the fastboot images from it
[Xiaomi Mi A1 Guides, News, & Discussion] Amanpreetsingh:
I have the link for fastboot rom but I need twrp rom.

This is the link

https://drive.google.com/file/d/15egbHONHGgm0AnvFYm2PCOmSyz0_utRR/view?usp=drivesdk
[Xiaomi Mi A1 Guides, News, & Discussion] wmfanboy25:
Thank you so much
[Xiaomi Mi A1 Guides, News, & Discussion] Amanpreetsingh:
Can you make twrp flashable ??
[Xiaomi Mi A1 Guides, News, & Discussion] wmfanboy25:
I can make a twrp backup if you want
[Xiaomi Mi A1 Guides, News, & Discussion] Amanpreetsingh:
That can be restored by twrp ???

If you creating a backup then please backup all partitions bcoz its the pie update and many things has changed. Thanks for the help
[Xiaomi Mi A1 Guides, News, & Discussion] rohitddd1:
please help guys !

yesterday I flashed Pie Rom then i reverted back to Dot 8.1 then in the Morning i got a call and there was no sound only in the in call voice + i tried Whatsapp call same problem but this only was there in "CALLS" because i can hear all system sound and even sounds of Call Being Hanged up .. The problem starts here -->> Then i flashed LR final because i thought it might be a Rom Thing but same + the QS panel was not coming down not even navigation buttons were working again i flashed the same (Clean Install) and then same problem so then i flashed STOCK ROM 8.1 ..phone dint boot + gets stuck on boot animation + not even a single CUSTOM rom is flashing ..every rom i being Stuck on BOOT animation ! :( pls help i will cry now ! :crying::crying::crying::crying: :) waiting for Help ...thanks in advance
[Xiaomi Mi A1 Guides, News, & Discussion] Necrodaemon:
Mi Flash or Fastboot method?, I update my A1 with Fastboot method usefull, I think that MI Flash method is working to Downgrade at 8.1 or Update to 9.0.0 oficial (no beta) in next days
[Xiaomi Mi A1 Guides, News, & Discussion] ayush2901:
I have the same problem as his, every rom i flash gets stuck on bootanimation. Any ideas? It started happening after i tried to restore the stock 8.1 back from the pie beta rom, via miflash.
[Xiaomi Mi A1 Guides, News, & Discussion] UCFour:
By any chance, did you use "FLASH-ALL CLEAN" script ? [MENTION=7134998]rohitddd1[/MENTION]
[Xiaomi Mi A1 Guides, News, & Discussion] ayush2901:
I used the miflash tool to flash the pie rom, over the stock 8.1. It was after flashing back the stock 8.1, that i had gotten the phone get stuck on boot animation. The option i selected there was clean_all option, therefore using the flash_all.bat, both times
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
If you have a backup of EFS partition, restore it from TWRP, I was in the same situation and doing so I was able to recover my device.
[Xiaomi Mi A1 Guides, News, & Discussion] ayush2901:
Did you restore the efs backup when you were bootlooping through the pie update (through booting twrp), or when you downgraded to oreo 8.1, booted into recovery and then restored it?
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
After the downgrade (to Nougat in my case).
[Xiaomi Mi A1 Guides, News, & Discussion] ayush2901:
Thank you for your reply, i will try it out after downgrading to oreo
[Xiaomi Mi A1 Guides, News, & Discussion] adnbwta:
This is due to the new firmware in december update, try to downgrade to stock oreo firmware use fastboot or mi flash then flash custom rom if you wanna keep using custom rom, but you can reflash stock pie and the issue will gone.
[Xiaomi Mi A1 Guides, News, & Discussion] rohitddd1:
yes mostly

---------- Post added at 09:21 AM ---------- Previous post was at 09:16 AM ----------

Tried To flash Every Rom , tried Downgrading to oreo stock tried installing pie again ....i used clean_all script pls help buys i went to service center they Said 7500rs for motherboard (but still the phone is halfway booting i told to use EDL they said motherboard problem only solution is to change it):crying::crying::crying: pls help --- no roms are booting but every rom is flashing
[Xiaomi Mi A1 Guides, News, & Discussion] UCFour:
You have EFS partition backup?
[Xiaomi Mi A1 Guides, News, & Discussion] Abhaysinh:
Oh it's your YouTube channel.

Btw nice video bro, On mi a1 pie beta:good::good::good:
[Xiaomi Mi A1 Guides, News, & Discussion] KeNNy-X:
Install Pie Beta via TWRP.
[Xiaomi Mi A1 Guides, News, & Discussion] rohitddd1:
how to do that ..nice channel btw ...and pls tell instructions on how to fix and EFS partition...i dont have any Backups (Nandroid)
[Xiaomi Mi A1 Guides, News, & Discussion] UCFour:
Check this thread

https://xdaforums.com/mi-a1/how-to/solution-bootloop-9-0-beta-t3876533
[Xiaomi Mi A1 Guides, News, & Discussion] Userbaban:
can you specify the command ? it is always giving me " unrecognised option " ...

help !!
[Xiaomi Mi A1 Guides, News, & Discussion] Kurtinaitis:
fastboot --set-active=a

or

fastboot --set-active=b

Depends on the partition which storage the untouched system.

I did it a couple of months ago, so i can't remember exactly the command.
[Xiaomi Mi A1 Guides, News, & Discussion] ibooth2004:
Could you please update this to Pie?
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Done :) Please hit thanks if I helped you ;)
[Xiaomi Mi A1 Guides, News, & Discussion] mmanius:
After installing V10.0.4.0 Stable fastboot has changed mac wifi it's normal ?

clean flash

8.1 - f4:f5db.....

9.0 - 00:0a:f5......
[Xiaomi Mi A1 Guides, News, & Discussion] samy2015:
mine also changed the wifi mac address after update to 10.0.4

it's ok as i didn't face any problems but i was thinking about the mac as it is a hw-thing that can't be changed but i think i was wrong

---------- Post added at 01:44 PM ---------- Previous post was at 01:40 PM ----------

use mixed files

like boot file from 10.0.2 and other files from 10.0.4 rom

my device was bricked because of downgrading , every rom was successfully flashing but not booting

then i used 10.0.0.3 files with 10.0.0.2 boot.img and pack them then flashed in twrp and phone booted,

try at your risk
[Xiaomi Mi A1 Guides, News, & Discussion] xiaomiacmilan:
After update to February security patches Mac wifi bug fixed
[Xiaomi Mi A1 Guides, News, & Discussion] jack_21:
Yes, that is fixed in Feb patch
[Xiaomi Mi A1 Guides, News, & Discussion] Amanpreetsingh:
Can anybody tell me how to flash fastboot rom ??

I don't know exact steps !!
[Xiaomi Mi A1 Guides, News, & Discussion] majamee:
Please read the official post in detail, everything you have to know should be in there. ;)

https://xdaforums.com/mi-a1/how-to/ota-official-fastboot-image-n2g47h-7-12-t3728929

If this does not help, go to youtube search for your mobile phone + fastboot :)
[Xiaomi Mi A1 Guides, News, & Discussion] 25vikasp:
Can anyone share boot and system .IMG files of pie firmware on Google drive, or any gdrive link for complete fastboot firmware
[Xiaomi Mi A1 Guides, News, & Discussion] priyeshpatel:
Thanks for the scripts!