yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
well it is quite a few steps .there are three files to edit but I'll post them here soon.

also you need to enter edl

cmd:

fastboot oem edl

*however if your front cam is the only problem I would recommend leaving the persist via fastboot until the last moment

my 1st suggestion is :

flash Agni kernel by booting twrp without flashing it

cmd: fastboot boot recovery.img

•this is to say Agni works on stock and custom roms and also rooted or unrooted phones

•it offers 3 types of camera libs

old , new and miui

•i suggest flashing the kernel 3 times selecting each option until after rebooting your front camera works

•one of the options are ?% certain to work

if you're lucky the first you try works ....?

•DON'T use automatic detect because the reason the front cam isn't working is fualty libs so auto detect will detect wrong option ...

---------- Post added at 08:14 PM ---------- Previous post was at 07:32 PM ----------

How to flash persist in edl through Miflash

Downloaf stock pie rom (V.10.0.17.0) & 2018 MiFlash Tool

• install Miflash & its drivers

• extract the pie fastboot rom

• enter fastboot on phone and connect to pc

• open both cmd window in fastboot folder & Miflash

• verify device is detected by cmd:

fastboot devices

• now take the files i uploaded and replace the 4 files in your extracted fastboot rom

*will only work with this rom because the files you are copying were modified by me to force Miflash to flash persist

• select the fastboot rom in miflash

• select "flash_all" at the bottom window on Miflash

DO NOT SELECT lock or flash all & lock

• in fastboot run cmd :

fastboot oem edl

• refresh Miflash and when it detects the phone start the flashing process ..

* i will post links soon ...

---------- Post added at 08:32 PM ---------- Previous post was at 08:14 PM ----------

here is a link to the files

https://www.dropbox.com/sh/n5mupbr1kt8xu2e/AAAbEw0CFjVTZcXj4uCWN1fha?dl=0

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

fastboot rom needed to use

https://android.googleapis.com/packa...735b1656d1.zip

---------- Post added at 08:38 PM ---------- Previous post was at 08:37 PM ----------

well i have completed the explanation [MENTION=9307378]drawun[/MENTION]

did you try the kernel route or flashing the persist ..let me know what worked
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] drawun:
Really appreciate the help. I've done both and they don't work unfortunately.

Just to clarify on edl method, there are 4 files you provided I should copy namely: crclist.txt, flash_all.bat, persist(1).img and rawprogram0.xml. 3 of them replaced existing files and persist(1).img didn't because there's no previous file with the same name.

However, I don't find persist(1).img is being used that xml file. Is that correct? Or do you mean I should rename and replaced the existing persist.img?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
yes , you should rename persist(1).img ...but first DELETE or cut the original persist.img in the folder (that is why name is different )
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] drawun:
Thought so. I did it again this time with renamed persist.img and unfortunately it doesn't work either.

Appreciate your help though. Should help others if not me.

Thank you!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
well as i mentioned before , i think your problem is in the libs ..trust me a did it all ..in my case what worked was :

1. flash persist

*all sensors and camera working but not front

2. root

3. edit build prop and change my device name to whyred and also change the camera .xml name to whyred ...reboot ...front camera was working but only to take one photo and stopped

4. open device physically and disconnect and reconnect front cam

5. reboot

*working once and stopped

6. flashed Agni kernel forcing miui libs

*worked perfectly

7. changed custom rom and stopped working

8. change name build prop to whyred and also xml

9. disconnect and reconnect camera & reboot

10 . flash Agni forcing old camera libs

working perfectly .. everytime i change rom i flash Agni and use option to auto detect camera libs

** you can try changing build prop name & .xml to whyred

*** disconnecting and reconnecting camera physically

**** TRUST ME - TRY ALL THE OPTIONS IN AGNI to see which is correct

_maybe you failed in this because you didn't backup stock kernel and restore stock kernel or CLEAN flash rom & kernel each time you try the different camera libs ..if you just dirty flash one on top of another it will fail like it FAILED for me

_maybe you even need to do the whyred modification or physically disconnect and reconnect camera EACH time YOU CLEAN flash kernel and rom and choose a camera lib option in Agni

∆that is how i had to work to fix my front camera

#jasmine to wayne conversation that triggered arb 4 that edl bricked that was revived as wayne & jasmine on custom rom with working front camera#
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] drawun:
I'm really doubting myself when doing things physically to the phone. Maybe I'll find another time to try again. Will update when I do. Thanks!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
well or try the steps without opening the phone because i can't know 100% which of these steps or combination of were the definitive fix and or in which order and so on
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] drawun:
Found the problem. It is hardware related. I'm not sure how to fix though. A slight pressure on the front camera connector or on the board near to the front camera connector will reproduce the issue. I even removed that tiny sponge which supposed to pressed down the connector firmly to the board and it still doesn't work.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
I removed my "sponge" and trust I thought it was the same problem .. because sometimes if I pushed on phone the camera would work a little ..I even thought it was a cheap cam module ..

But finally it worked 100% as I explained working on the software it started working ..

Maybe try one more thing I did but I still think it is software ..

I cleaned the both sides of the connector by dropping a drop of pure alcohol on each side and rubbing it dry with q-tip

But even though I put a hard piece of small wood where the sponge was and even though it worked a few times it wasn't that ..it was despite of it ..it was in software ...right now I have no sponge , no wood , no plastic and it works like a bomb
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] drawun:
It's so weird to pin down on software but maybe it is what it is.

But right now, it's working so I'll put a hold to further attempt.

I even replaced the thermal paste(that pink substance) on copper sheet with my thermal paste I have around for computers! lol
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
Yeah crazy how a small thing can make a big problem... but if it isn't broken right now , better not fix it ...:svetius:;)
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
Hello im kind of new to this phone. I mean i had this phone before but i did not root or flash any ROM. So im planning to get back on stock 8.1. I have read flashing instructions too. But there is one thing that bugs me. Do we have to flash the ROM on both slots (A, B)? Lets say i flashed first time on slot A. So do i have to switch slot again to B and flash the ROM?

TIA
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
Flashing stock ROM with standard means presumes using fastboot app by running a command script (.bat for Win , .sh for macOS or Linux) zipped into each fastboot ROM image. If you read content of , e.g. "flash_all.bat", you'll see that partition images are beeing flashed into both slots, although somewhat assymetrically.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
I did not read that part. Highly appreciate your help sir
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
this is off the topic and one more thing. My adb mode is working fine, however fastboot is not working for Mi A2. In the device manger it detects as Android with the warning sign then i tried to update drivers via internet option, but that does not work. Then i tried searching and downloading different sites, but it is not helping. All my other phones fastboot works fine. Appreciate if you could point me out in the right directtion.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
Try to use external USB 2.x hub - for example, I use the one built in a Dell monitor.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
I only have usb 3.0 and 3.1 :crying::crying::crying::crying: is this only for MI phones because usb 3.0 fastboot working fine with my all pixel devices. Thanks will try from another PC i guess
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
Your problem is not usb 3 ..the driver signing of windows 10 is the problem

You need to download Xiaomi drivers by using the latest miflash install drivers function ..but *ONLY* after disabling windows signed driver management

If you do those two things it will work fine ..
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
Aha! Thank you sir! I know how to disable windows signed driver management. But installing Mi Drivers is the part i do not know. May i know what should i do? After disable driver signature enforcement, do i have to install latest Mi Flash tool and let it detect Mi A2? something like that?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
Well first you need to UNINSTALL all the old copies of miflash and driver packs you installed before and restart pc ..then disable signed driver management and reboot ..then from the link below download LATEST miflash and use the installer .exe to install drivers and miflash

https://www.xiaomiflash.com/download/

Then open miflash and while open connect your phone to pc via usb and wait until you here the noise and toast that drivers are installing .

Refresh miflash and if it detects a phone you are good to go ...for extra measure ..

Toggle usb debugging on in dev settings and open cmd window ..then run :

adb devices

Adb will start the daemon and you will get a toast on phone asking to allow adb connection ..choose "allow always"

then in cmd window of adb type :

adb reboot bootloader

This will enter phone into fastboot mode ..wait for sound and toast of drivers installing ..in fastboot cmd window run :

fastboot devices

It should be detected now look at miflash and refresh it and it show that device is recognised

This should mean ALL the adb, fastboot, xiaomi and mtp drivers should be installed
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
Thank you Sir! At first it did not worked. However i updated drivers through windows device manger> select the location of where i extracted Mi Falshtool> now it asks to install unsigned drivers> voila!:good:. Only bad thing is it seems i cant flash stock android 8.1 (currently on android 10) due to the error "current device antirollback version is greater than this package". So i checked my antirollback version by following xiaomi anti rollback protection article and got the result as the number i have is less than my current rollback index (fash all bat say - version 2, fastboot say - version 1). ha ha. Seems like im stuck on android 10
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
Well even if your anti is 2 you can still flash android pie for sure ... furthermore if I'm not mistaken if you flash the very last android 8.1 update you will also be good to go with anti 2

I've only ever heard of problems with starting from anti 3&4

But are you on jasmine & flashing android 1 ? Or are you on Wayne flashing MIUI

Remember the two are not cross compatible and you need to convert "repartition" your device to change from one to the other
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
well my A2's anti is 1 as per fastboot results. Well what i tried was both last android 8.1 (Android 8.1.0 [V9.6.16.0.ODIMIFE]) and 9.0 (Android 9.0 [V10.0.17.0.PDIMIXM]) and when i checked the bat file both of them have Ant 2. Ha ha. I dont know what to do. Do i have to download every other images tho check this. :silly: Ah im on jasmine and i used only fastboot files provided in this thread.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
I converted my A2 to X6 because I don't like A/B partition ..so I don't remember where I saw it ..but there is a list somewhere that is maintained with all the official firmware and kinda like in an excel format table it says next to each stock rom of it contains anti rollback and if it does the level it contains

But I'm pretty certain that if fastboot says your device is 1 it is 1 ... furthermore I'm pretty sure that the firmware you want to flash being 2 is no problem because anti 2 doesn't restrict anything and if the firmware version is higher that the phone version it flashes fine

The problem would be the inverse

Also the flash all bat story always gave me troubl and I just flashed the phone by selecting the fastboot rom from inside miflash and flashes it using that ...

Have you tried ?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
I did not worked before, but when i try again now via Mi Flash it started flashing :o:o:o. However strange thins is going on. Mi Flash Tool says it is still flashing but my phone rebooted to system after few minutes and now on android 8.1. But still Flash Tool says flashing. Could this be Flash Tool bug and should i ignore this. Or should i reflash using Flash Tool sir
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
If it boots to system correctly on it's own it's okay
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
Yes i understand sir. The only thing bugs me is that even though fastboot detects the phone, i cant execute a fastboot code. For an example if i try to execute fastboot reboot, it won't reboot to system. It just populate FAILED (Write to device is failed (unknown error)) (please refer attachments). Also when i try to reflash/refresh Mi Flash Tool, phone populate "press and button to shutdown" message in a full back screen. That's it. Flashing is not working.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] KevMetal:
Because you installed the stock rom 8.1 you need to unlock bootloader

Open the developer settings by pressing on build number in /settings/about and enable the OEM unlock toggle option

Now enable usb debugging and connect to pc and run cmd window and type :

adb devices

*On the phone allow usb debugging connection "allow always"

Type :

adb reboot bootloader

Type :

fastboot devices

Type:

fastboot oem unlock

*Select yes on phone with volume button

*Phone will erase

RELEAT ALL THE PROCESS BUT CHAnge last command

Type:

fastboot flashing unlock_critical

*Phone will erase data

DO ALL THE STEPS TO ENABLE AND RECOGNISE IN ADB but don't do unlock bootloader commands

Now you are finished ..

Type :

*You need the twrp in the fastboot folder and give name recovery.img

Fastboot boot recovery.img

INSIDE RRCOVERY GO TO ADVANCED OPTION OF WIPE AND JUST FORMAT DATA AND SAY YES ..THEN REBOOT BOOTLOADER

THEN ENTER IN CMD WINDOW:

fastboot boot recovery.img

*Now you have booted custom recovery

Now just install installer zip for custom recovery and installer zip of magisk by using pc to put on internal memory of phone
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Zedsdeadbaby:
Anyone have the lastest one ? (11.0.13.0)
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
Thank you sir but the problem is my bootloader is already unlocked (oem + critical unlock). I saw some post stating this is related to USB 3.0, we just have to use USB 2.0 port. But since i already have installed usb/fastboot drivers properly and working fastboot i have no idea what is the issue here. However i will try flashing android 10 and let know the results
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
Stock fastboot ROM image V11.0.13.0.QDIMIXM

Here: http://bigota.d.miui.com/V11.0.13.0....QDIMIXM_20200819.0000.00_10.0_8702a6f736.tgz
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
Could you please tell me that are/were there any bugs after the conversion to 6X? i would like to test 6X stock and also like to test 6X roms as well. One last question, did you follow this thread as the conversion guide sir [GUIDE] Convert Mi A2 to Mi 6X [MIUI 10 Oreo] [MIUI 10 Pie]
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] jugaaru:
Im not the same one, but i also converted my a2 to 6x a few months back using the guide u mentioned, 1. There were not any bugs and i didnt encounter any problems 2. Custom Roms were great 3. I reverted back to A2 as more custom roms support a2 than 6x. 4. carefully follow the steps to not trigger ARB.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] crazykas:
highly appreciate your response bro!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
Official 2020, September, MiA2 ROM images V11.0.14.0.QDIMIXM

Stock fastboot ROM image: https://bigota.d.miui.com/V11.0.14.....QDIMIXM_20200928.0000.00_10.0_62d0264480.tgz

Stock recovery full OTA: https://bigota.d.miui.com/V11.0.14....Global_V11.0.14.0.QDIMIXM_6e562068f2_10.0.zip
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] :
thanks for the fastboot rom image. I just reverted my pixel experience to stock rom using this image via flash tool. weird that I encounter using miflash is it didn't show that my flashing is success but my phones erase data and shutdown and when i turn it on. it goes to the initial setting up of a new phone. before my phone is unlocked now it is locked now. thinking again if i should unlocked my bootloader again or stick to locked.

thanks!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
My opinion is to keep MiA2 unlocked due to usual issues with OTAs.

Probably you have used flash_all_lock.bat, and got phone locked?

You could just use flash_all.bat when returning to stock from a custom, and while sticking with stock you can use flash_all_except_data.bat to keep settings, apps, phone calls and sms logs, etc.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] :
yes! I intended to revert to stock rom with locked bootloader. so far for my mi a2, I haven't encountered any issues in OTA, all are successful (unlocked bootloader). BTW, I just updated today my phone (october 2020 security update).

for safety I just enable oem unlocking and usb debugging in developer options just incase there is a problem in OTA update like bootloop.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
Official 2020, October, MiA2 Stock fastboot ROM image V11.0.15.0.QDIMIXM

https://bigota.d.miui.com/V11.0.15.....QDIMIXM_20201019.0000.00_10.0_3ea0b7a69b.tgz

CAPTCHA:

Both after installing OTA and after clean fastboot flashing of this version with flash_all_except_data -> rebooting phone forces to stock recovery and requests factory reset.

Reflashed back V11.0.14.0.QDIMIXM in order to make data backup
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Battleroyal3:
Bootloader

Hey guys, I have a doubt. If have you unlocked bootloader (both unlock and unlock critical commands), does it unlock both the slots?. I had the October patch error so tried to flash ota via miflash ended up with flash devcfg a error. My boot screen has unlocked logo though. I have not rooted. Few days go I messed up a rooted slot and it went to bootloop and it ended up booting to inactive slot. I have then updated to September security patch too. So is this problem caused by my mess or October patch fault?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] 1ntr0v3rt3ch:
Thank you so much for this guide and thanks also to [MENTION=5835303]Aerobatic[/MENTION] for the latest fastboot images! It helps a lot!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Immanuel Raj:
Yes it unlocks both slot [Bootoader is single one and there is no slot for that its just a bootloader]

It was said that the v15 update had some problem and looks like u did mess too u could install ota via ota itself why u need miflash even ....just do a ota update or flash al using cmd [dump that **** mi flash]
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Battleroyal3:
Well, if I install via ota it says "your cannot load Android system your data is corrupt". And I don't want to flash everything or factory data reset. Any other way to restore my os in slot b?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
My guide is here: https://xdaforums.com/showpost.php?p=83816925&postcount=31
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] HRSE:
This is one more reason to retire Mi A2.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Battleroyal3:
Mine is just unlocked (the one in developer settings) not the critical one where it factory resets everything. So if I just relock it would that make my ota update easy as in stock locked phone? Also I can't disable OEM unlock in dev settings. Anyother way to disable it, I might as well try it.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
Hmmm, trying to decipher... "OEM unlock" in dev settings is just a setting allowing unlock via fastboot, and it is recommended to have it enabled to resolve soft-brick without disassembling phone for TestPoint. If you cannot disable it, probably you've made at least "fastboot flashing unlock". Are you sure you did not make "fastboot flashing unlock_critical" (thus fully unlocking)? If yes, this was mistake, - IMO phone must be either fully locked or fully unlocked. See what "fastboot getvar all" says about lock state.

Not sure, because I saw reports that fully stock MiA2 also had problems with the 11.0.15.0 OTA.

Anyway, if you have phone partially unlocked, locking it will erase user data (unlocking critical - too), so we again return to my guide on how to save user data.

As you could notice, I personally prefer to have phone fully unlocked.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
Official 2020, November, MiA2 ROM images V11.0.17.0.QDIMIXM

Stock fastboot ROM image: https://bigota.d.miui.com/V11.0.17.....QDIMIXM_20201118.0000.00_10.0_16dbde5639.tgz

Stock recovery full OTA: https://bigota.d.miui.com/V11.0.17....Global_V11.0.17.0.QDIMIXM_d31e9828ac_10.0.zip

Note: seems like this update on unlocked phones will need factory reset, if factory reset was not made after updating to October, 2020, 11.0.15.0.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] HRSE:
is it possible to revert to 11.0.15.0 without losing data?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Aerobatic:
I have not tried - just fastboot-flashed 11.0.17.0 over rooted 11.0.15.0 using "flash_all_except_data.bat", reinstalled Magisk Manager 8.03, Magisk 20.4, Riru 21.3, EdXposed 0.4.6.3, GravityBox 10.1, - everything seems to work, so I do not think I'll have to revert to 11.0.15.0.

As no problems were met with keeping /data with 11.0.15.0 -> 11.0.17.0, I do not see why you cannot revert 11.0.17.0 to 11.0.15.0 fastboot-flashing stock ROM (link was published above) with "flash_all_except_data.bat" thus keeping your /data (sure if your phone is already fully unlocked).

Yet I am almost sure that reverting to 11.0.14.0 and below will need factory reset.

BTW, if you've recently installed 11.0.17.0 OTA over 11.0.15.0, with fully unlocked phone you can revert to 11.0.15.0 just changing boot slot to the opposite (A -> B or B -> A) in fastboot or TWRP.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] HRSE:
sorry I'm a bit confused: is it required to do a factory reset after updating from .15 to .17 if my phone is unlocked?