yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] minnuss:
[MENTION=431800]webmasterone[/MENTION] , it depends what you did with the phone when you have root.

If you only want to uninstall magisk, or unroot your phone, go to the magisk, and do full uninstall of the magisk app inside magisk it self.

Then, when magisk do the restart of the phone, go to the fastboot, and flash stock boot.img of your current android version, and you will have unrooted phone.

If OTA fails after that, you have to flash system.img also...because you altered something in the system.

Then the OTA should work.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] webmasterone:
i rooted it with this tool

i would like to unroot it (to let ota automatically apply)
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Sticky92:
I tried to Boot TWRP. Im on the last november update (the 2nd) and now it's on bootloop. Do i have to flash something? How can i fix it?

I don't really want to reflash the whole rom with MIFlash

edit: well. im able to boot with an stock img using "fastboot boot stock_boot.img", but i want to know if it is safe to flash it with "fastboot flash stock_boot.img"

I'm sorry if it is an unnecesary question but this A/B partition system is something i cannot understand :S
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Marmalize:
Hello,

I wanted to relock bootloader, did i just have to run the relock bootloader command? Because i read it somewhere that i have to flash stock rom first. When unlocking the only command that i run fastboot oem unlock.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Marmalize:
Hi did you just use the lock bootloader command to lock it? or you need to flash stock rom 1st then lock bootloader?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] iamjet:
So if I just want to enable Camera2Api, I just have to choose no1 to unlcok bootloader then no7 to enable Camera2api? Does this work for November 5 patch?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] lept_2014:
If you've root, that method will work. But if you don't have root, this method doesn't work. Because you need a 'boot_rooted.img' and 'boot_stock.img' from your November 5 patch.

A better method is this.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Qyfaruxx:
Will this work for 2nd November patch.

Unlocking the bootloader and enable camera2 api..
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Shifat Islam:
Can I install TWRP temporary in pie with this tool?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] NicoLogics:
Need Help

ok so i used this toolkit to unlock the bootloader, root the phone and enable camera2 API. And i had a little bit of issues with that as well but i got it working.

Now that was a few weeks ago and last night i accidentally slept in while watching videos on the phone without the phone plugged to the wall. So it drained and as i woke up i plugged it in and tried to turn it on but it was stuck on the boot screen (NOT bootloop, just stuck at android one screen) so i tried to fix the phone with the toolkit but then i suddenly got in bootloop (that problem i had the last time) so i tried to fix it the same time as last time. Said "last time problem" was that while trying to go into TWRP i got stuck on partition B (in my case normally the empty one) which resulted in a bootloop and i also couldn't access fastboot. It would always bootloop, so i tried to let it drain and then plug it in and immediately go into fastboot which seem to work and there i could change the partition back to A.

This time i thought it may be a similar problem and tried to solve it but i failed now i cant flash any partition (will add screenshot with prompt from toolkit), both of the partitions are bootlooping, i can still enter fastboot (now anytime i want to) and with the toolkit i can still access TWRP where i also tried to wipe cache (didnt't help) restore the phone (same) or wipe all the data and all resulted in failure. now im kind of lost at this prompt of the toolkit and my amateur guess is that my last resort may be the EDL mode but i dont know much about it and therefore i seek out for help
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] douglasmendeszs:
I need help, in version 3 of the toolkit, I tried to unlock the gcam and now my Mi A2 with android pie is in bootloop and I can not get into edl mode to flash another rom

it is only recognized as 2d01a37 fastboot

help
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] papavegan:
My telephone reboot in continuous

Hello, sorry for my english

i have a problem with my xiaomi mi a2 and i hope you can help me i explain myself

I wanted to install a rom android pie for that

- I activate the devellopper mode

- unlock OEM

- With adb and fastboot I have to unlock the bootloader with the command fastboot oem unlock

- Install android 9 PIE

until no problem everything works except at the start of the phone I had a message that told me attention your phone is unlocked. So as a big clever I have to reverb the bootloader with the command fastboot oem lock and it's the brothel

the phone reboot without stopping on the logo android one then on the message. your device is corrupt. It can not be trusted and will not boot

I can put the fastboot mode but not the recovery mode

but no command works I think that because of the installation of android pie OEM is stalling

do you have an idea I do not know what to do thanks
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Matteo:
tool is outdated.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] royaltartufo:
Hi, I'm with the November patch (V9.6.17.0), i unlock the bootloader with the 3 commands (Unlock OEM, Unlock flashing, Unlock flashing critical).

Every time i reboot the phone this screen appears, its normal???

Thks

https://imgur.com/a/Ywc23qk
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] lept_2014:
Yes, it's normal.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Qyfaruxx:
Hi Guys,

Just wandering if you guys can help me out.

I'm currently in pie with November patch. Few days ago I received a notification update of December patch, but as soon as I downloaded it and the phone attempting to install the update it giving me an error message says,

"Couldn't install system update".

I tried resetting the phone by factory reset but problem persist.

I am thinking of resolving the issue by flashing the update through Mi Flash. But I'm not sure how to do that.

Really appreciate the advice given to solve this.

Phone current status :

- Unlocked bootloader

- Unlocked critical flash bootloader

- Rooted with magisk before - unrooted now

- Camera Api2 enabled with GCam Installed

Thanks in advance for those who help me with it.

Regards
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] juanvlieg:
Mi A2 updated last week to Pie. As of this morning phone has become useless. When you turn it on it displays the android one logo and then shuts down.

None of the unlock/fast boot procedures work
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] yunusasik:
Use MiFlashtool and Flash 10.0.2.0 Fastboot files

http://bigota.d.miui.com/V10.0.2.0....0.PDIMIFJ_20181206.0000.00_9.0_02b8deeb6d.tgz
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] juanvlieg:
Thanks , but I already tried that. first I got an error cant find "Flash_all_except_storage". then I renamed the files but I got another error that device is locked.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Matteo:
Need to unlock bootloader.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] sharifulabedin:
Same kind of problem happens to me. I have rooted my phone with patched_image. After 1 day it boot looped. So I flash pixel experience rom. But I have fail to every possible way I know.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] csong:
Hello, can you make a version that supports 10.0.2.0? I'm a rookie. I don't use FastBoot root.

My English is not very good
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Matteo:
My fork of the Toolkit works. This one is outdated pay attention.

Matteo
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] mosaiques:
I haven't install any update since October. I've unroot the phone with this tool to apply the OTA updates but I only got a bootloop. :confused:
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] rob420p:
If u would could u send a link I got the a2 lite and would love to see if it's possible to use with slight mods mainly boot patch.mainly for personal use if I did share it would only be with yr permission and also giving u full credit for it
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] mosaiques:
I've managed to update my wife's MI A2 to Android Pie, it was a very long run though. :rolleyes:

AFAIK, and with all the respects to the developer, this thread and tool is not updated anymore and it make no sense to use it. It causes only problems.

Cheers!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Matteo:
yep, that's why i decided to create my own then to psh it on xda, to allow users to use an updated toolkit etc, and the toolkit is really better, a language engine, auto updater, notification engine blabla xD but nobody see it, people prefer use an outdated toolkit without read the moderator edit, instead of search during 10 sec and find mine xD

Cherrs

Matteo
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] mosaiques:
I didn't find your tool. Where is it if I may ask?

P.S.: Never mind, I got it. Jeez! Why I didn't see that before!

Good job Matteo!!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Matteo:
Tx man eheh, enjoy it ( ps new version 4.3, check it in some minutes, i will update the thread )

Have a nice day/night

Matteo
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Maharram:
is it working with mi a2 pie? 10.0.2.0?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] TetsuyaTsurugi:
who is your program please ?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] aydinbahadir88:
hello dear Mi friends

I bought the Mi A2, turned it on and then came an update to 9.0

have it installed soooo

then the mobile phone does not start anymore! It's in the bootloop

did not enable USB debugging and bootloader is locked

what can I do ?

I would be very grateful for your help :)

---------- Post added at 07:29 PM ---------- Previous post was at 07:29 PM ----------

hello dear Mi friends

I bought the Mi A2, turned it on and then came an update to 9.0

have it installed soooo

then the mobile phone does not start anymore! It's in the bootloop

did not enable USB debugging and bootloader is locked

what can I do ?

I would be very grateful for your help :)
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] MarcusMario0605:
You are already be advised to have your bootloader always unlocked just in case, or at least have oem unlock option turned on. But if you get into that situation, here's some method of fixing that,

Try forcing reboot by pressing and holding the power button until it reboot,try to see if that is fixed.

If not, try holding volume up and power button at the same time to see if you get into the recovery, if it does, it shows says no command, press the power button once and get into a menu, do a factory reset.

If not either boot into fastboot mode, change to the opposite slot (a to b or b to a) if it allows you to do that.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
New release!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] filski1:
Hi,

I have the same problem as aydinbahadir88. Volume up and power button shows only fastboot, no option to factory reset. Mi Unlock gives error message "Current account cannot unlock this device", fastboot unlock commands give "Flashing Unlock is not allowed". Any ideas on how to resolve? I'd rather avoid opening the device for the EDL points.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
Release 1.0.1 now available, adb is now included in the kit! See changelog for more details on changes
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
Release 1.0.2.0!

New Version available!!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] tazmako:
can use it to convert from 6x to A2?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
not yet, working on it though.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] StarSix01:
The reboot in edl. Button Wont work
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Matteo:
Can you please do not talk about me by saying slanders? it's your toolkit thread, talk about me and say slanders is 100% useless, nobody care.

You leave me during collab, and try to scare me saying you hacked me, i never try to make you banned or anything else on xda, so now stop talking about me and leave me alone.

Btw you can change net framework version from 4.6.1 dev to 4.5, it will add support to both windows since windows 7 without install anything. You will just need to make some minor edits in code, not really difficult.

Then you can make an updater engine yoursel and use stream commands to check for updates, it will allow you to check for updates, download them etc without any other file, and allow you to have a full custom updater, instead of a free framework, it will be more customizable...

Then you can delete useless xml files from releases zips, and try to optimize some parts of your code, so toolkit is more responsive and less big.

For the rest it's good.

Matteo
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] emgi2:
Is it working for Android 10 version?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] bartoloandre98:
what does number 12 do exactly please?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] minnuss:
I have a "request" to add to your tool enable camera2api, I will be grateful, and allot of guys here in our little community :)

Maybe something like this would work.

https://xdaforums.com/redmi-note-5/how-to/guide-enable-camera2-api-root-vince-t3821903

Thank you in advance.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
I'll see what I can do. No promises though ;)
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
Thanks for the recommendation, I added it to version 1.0.3. let me know if it works. I have a custom ROM and it worked fine, but stock can be finicky.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Alocin:
Hi, unfortunately this is not working for me on stock rom, September update. Here is the log:

please enable usb Debugging. After continuing please press allow superuser access on your device.
Press any key to continue . . .
adb server is out of date. killing...
* daemon started successfully *
/system/bin/sh: su: not found
/system/bin/sh: su: not found
/system/bin/sh: su: not found
ECHO is off.
< waiting for any device >
Sending 'boot_a' (28265 KB) OKAY [ 0.673s]
Writing 'boot_a' FAILED (remote: Flashing is not allowed in Lock State)
Finished. Total time: 0.692s
Sending 'boot_b' (28265 KB) OKAY [ 0.681s]
Writing 'boot_b' FAILED (remote: Flashing is not allowed in Lock State)
Finished. Total time: 0.708s
Rebooting
Finished. Total time: 0.013s
please verify root is gone and camera2 api is enabled. if your phone is still rooted please run the unroot option manually.
Press any key to continue . . .

Do you think you can fix it? Thanks
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] minnuss:
Another recommendation, some backup options, and of course, to update your tool to september OTA update.

EDIT: I can confirm that your camera2api option is WORKING, and after the enabling it, root is gone.

I would just suggest automatic first action, when you ask a user to go to fastboot manualy with combination of buttons, to go with adb command automatically - adb reboot fastboot.

Anyways, is working great.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
While it should work with stock, you need to unlock flashing and unlock flashing critical. go to the bootloader unlock and unlock at least flashing critical. You can still recieve OTA with an unlocked bootloader. Another thing, because the september update does not have a working root, This most likely will not work. I didn't update to the september version because it was pulled. I will update the script to support September update when it is re-released.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Alocin:
Ok, thank you!

Do you know if there is a way to unlock Mi A2 without wiping data? It was possible with Mi A1 by holding the volume down button after unlocking
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
Once the september update is re-released by xiaomi I will look into it. The update was pulled because it had some issues and obviously xiaomi thought it better that people had the august update over the september one. I am going to trust their judgement, having read some people's experiences in the forums.

For the adb reboot, I have been working on automating the first part (reboot into fastboot), the hard part is that it hangs waiting for a device in adb, so anyone already in fastboot will have to boot their phone back up for the script to shut it down again.... I am trying a few things though. We will see how it goes.

As for backup, If you have any ideas on the technical aspect of how that would work I would do it in a heartbeat. right now I just launch TWRP and back up that way.

A feature I was thinking about adding was a boot into edl mode option. It seems like a common issue people have.

As always, thanks for the input. I will look into each of these a bit more to see if I am missing something.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
If there is, I am not aware of it. I know some things I do get me up and running pretty quick include a few prep steps before resetting.

1. Download someting like this app and back up your messages and calls to your internal storage (this app has a warning, just ignore it)

2. make sure your contacts are synced with google or your email accounts.

3. copy the entire contents of your phone's internal storage (whatever shows up when you choose transfer files) into a folder on your computer.

4. double check everything is copied and backed up

5. re-check.

6. unlock bootloader and factory reset the phone.

7. once the phone is back up, restore your phone using your email account and choose the option to restore from previous phone/backup from google (they make it a lot easier)

8. once in your phone, copy everything from step 3 back onto your phone in the SAME PLACE it was before.

9. restore your messages and call logs using that app we used earlier, select the file which should now be back on your device from step 8.

10. fix any special settings you missed

11. Boot into TWRP and make a real backup.

Note: TWRP with our phones causes bootloop, so the original bootloader will be re-applied. this means you can still get OTA after running TWRP if you leave it unrooted.

Hopefully this can help :)
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
Because I have no life, I spent some time today working out the kinks. It should automatically try to put the device in fastboot via adb. If the device is already in fastboot it will run as normal.

I also added some basic backup functionality. It is much less flexible than TWRP but should work for people that want to go from locked bootloader to an unlocked bootloader with minimal issues.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] stopthetime:
nothing happens, back to the main page
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
Did you extract the whole zip? or just the toolkit. The toolkit requires the folders ProgramFiles and images to be present to work.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] stopthetime:
Yes, I extract everything and open with admin privilege
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
Don't open with admin. See if that fixes it. If it is an issue I can fix it in a future update.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] stopthetime:
I managed to run it without administrative privilege.

When I unlock the bootloader, it arrives on the Android one screen, it goes to the colored stripe and it does not change anymore. What can it be?

---------- Post added at 06:50 AM ---------- Previous post was at 06:24 AM ----------

after activating camera2api. Can I block the bootloader again?
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] dodjob:
Hey there,

Just a little feedback :)

I have the "b" partition active.

When I use your tool to get TWRP and finally wipe the dalvik-cache I saw that it flashes the b partition by default.

Can you tell me if you added the "getvar active_partition " in your script? And forced the script to flash the "non active" partition?

I tried to flash TWRP manually (before using your tool" with the command "set_active a" but it isn't recognized by my fastboot (no idea why. Specially because set "set_active b" is recognized ??

So after having using your "install & boot in TWRP" I had to manually "set_active b" in order to get the system to boot (which worked flawlessly ;))

Finally, note that I didn't unlock critical. Everything I needed currently didn't need it and I want to have so little modifications made to my device before things get more stable ??☝️

Thanks for the tool, it's a real treat anyway ;)

Regards,

H.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] minnuss:
Hah, thanx man, at least you are doing something positive, for all of us, and for you, because you are upgrading your skills with every code you write here. :good:
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
Great input, I will make a few changes to accommodate for alternative partitions and update some instructions on unlocking in my next release. Thanks for the help!
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
I assume it has to do with the reboot bootloader command. Try to enter fastboot manually and see if it works. I will add new bug fixes to the reboot command.

I know locking the bootloader causes a factory reset. I guess it is worth a try to lock it again if you are ok with that. Most likely it will still work. But I have never tried.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] minnuss:
I flashed the phone with your images and flash_all.bat script, back to stock.

Then I tried to use number 7. enable camera2 api, and the problem is that it did not install root correctly, when phone reboots, the user must download full magisk, then the proper root will function.

After enabling camera2 api, which i did manually with adb shell, it pop up on screen to allow access with root privileges.

Then su, and then setprop persist.camera.HAL3.enabled 1

After that, complete uninstall of magisk, and when magisk reboot the phone, quickly go to fastboot and flash on both partitions stock boot.img.

That was the correct steps for me.

And people, one warning, do not use "setprop persist.camera.eis.enable 1" when in adb shell, because it will fuc*ed up video recording, just don't use this command, trust me.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Daha3ker:
aight. I will see if I can do adb push to install the correct magisk, then run the command and remove magisk before rebooting. I hope that will work. We will see i guess.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] stopthetime:
truth. when you start, you do not have root and api
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Bayy27:
If I type "fastboot flashing unlock_critical" or choose "Unlock Critical" Will it wipe all data like UBL? I allready have Unlocked Bootloader with "fastboot oem unlock"
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] minnuss:
Yes it will. Did it last night.
[Xiaomi Mi A2 / 6X Guides, News, & Discussion] stopthetime:
You can make a video with the camerw2api function?

I tried using non-root. The first time the phone up, it was without the API and without root.