yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Guides, News, & Discussion] zeyaan:
Noob Question, can i use terminal on phone instead of connecting to computer?
[Xiaomi Mi A1 Guides, News, & Discussion] roshin.Parameswaran:
bricked

I did everything as you said. The phone worked perfectly fine until I've done the last step. After I relocking the phone, it stuck on fastboot screen. It's not rebooting and the CMD is not showing the device. What should I do?
[Xiaomi Mi A1 Guides, News, & Discussion] ajaikumarnadar:
will this work on other phones like g4 plus.. i am willing to try it out..
[Xiaomi Mi A1 Guides, News, & Discussion] agus tasrudin:
Oke
[Xiaomi Mi A1 Guides, News, & Discussion] rzruzz:
Instead using magisk, is it possible to use command on twrp? Need confirmation
[Xiaomi Mi A1 Guides, News, & Discussion] giovaorama:
Obviously unlocking/locking the bootloader will wipe the data partition, right?

It uses to work like this in Nexus and Pixel phones.

Inviato dal mio LG-V500 utilizzando Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] sooti:
Guys the OP left out a very important step, flash stock boot.img, if you have TWRP or made any changes to boot.img/system.img the device won't boot, after locking the device you will get a black screen and go to 9008 mode, you will have to hold power + volume down to go to fastboot and then unlock again and flash stock boot, after that you can lock again

steps:

1. Reboot to fastboot by holding power + volume down for 5-10 seconds

2. oem fastboot unlock

3. fastboot flash boot_a (or boot_b if that's what you device is set to) [boot.img]

4. fastboot oem lock

5. fastboot reboot

---------- Post added at 03:59 PM ---------- Previous post was at 03:58 PM ----------

No, the Xiaomi a1 does not touch the data when unlocking/locking bootloader
[Xiaomi Mi A1 Guides, News, & Discussion] Onkar Ingale:
You didn't read my problem

You didn't get the problem please observe once again
[Xiaomi Mi A1 Guides, News, & Discussion] harshu0101:
I thought when you completely uninstall magisk stock boot.img will be restored. Is that wrong?
[Xiaomi Mi A1 Guides, News, & Discussion] sooti:
try what i said, you don't need to uninstall magisk, just flash stock untouched boot image, that should fix your problem

---------- Post added at 04:31 PM ---------- Previous post was at 04:25 PM ----------

You are correct, however, if you flashed TWRP before magisk (which you probably did), it will restore that boot.img, without magisk but with TWRP built in... only way uninstalling magisk will work is if you flash magisk from a non flashed TWRP (fastboot boot twrp) then flash magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] Onkar Ingale:
I just didn't uninstall

I clicked Restore images that's it

As I boot patched boot image it works and build.prop is fully appeared and as I Restore images build.prop

Is empty but the device works flawlessly but without camera2api

Can I Know what is permission (chmod) for build.prop when all is working
[Xiaomi Mi A1 Guides, News, & Discussion] sooti:
Did you try to open the camera app?
[Xiaomi Mi A1 Guides, News, & Discussion] Sigray:
Doesnt matter if its working or not, the Google Camera buggy (full of dots and artifacts) because of bad camera2 api.
[Xiaomi Mi A1 Guides, News, & Discussion] rEsonancE_0404:
I'm confused

The correct code is getprop persist.camera.HAL3.enabled 1 or getprop persist.camera.HAL3.enabled=1? :confused:
[Xiaomi Mi A1 Guides, News, & Discussion] rijujeevan:
Yes..dude
[Xiaomi Mi A1 Guides, News, & Discussion] Onkar Ingale:
Yes Gcam works but

All is working good but when I Restore stock images the build.prop becomes empty and camera2api is not present because file becomes empty and again when I install the magisk then all works fine and the build.prop appears
[Xiaomi Mi A1 Guides, News, & Discussion] Dusayanta:
Status of boot.img

After completely uninstalling Magisk does it return to original boot.img or the patched_boot.img remains?

I am not sure, but if the patched img remains there the ota would fail. Is it so?
[Xiaomi Mi A1 Guides, News, & Discussion] GizmoFreak:
Created a complete video, root, unroot and google camera app using windows this time.

https://youtu.be/zmnftXOustI

---------- Post added at 10:50 PM ---------- Previous post was at 10:45 PM ----------

Magisk restores original boot image.
[Xiaomi Mi A1 Guides, News, & Discussion] Klasputnikov:
if i do a reset by the phone settings, i'll lose the gcam?
[Xiaomi Mi A1 Guides, News, & Discussion] Dusayanta:
Yes you will lose it. But you can install it again and it will work fine as because the api will still be there, which you added using setprop.
[Xiaomi Mi A1 Guides, News, & Discussion] jazzthe#1:
does video call from stock dialer (Jio Volte) works? i mean other person can see you?
[Xiaomi Mi A1 Guides, News, & Discussion] GizmoFreak:
Just tried duo and it works fine.
[Xiaomi Mi A1 Guides, News, & Discussion] Samhain77:
Nope... It's setprop persist.camera.hal3.enabled 1

Not getprop... You can use getprop after to see if it returns 1 as value
[Xiaomi Mi A1 Guides, News, & Discussion] Rudr875:
You can download it from here.?

https://www.xda-developers.com/install-adb-windows-macos-linux/
[Xiaomi Mi A1 Guides, News, & Discussion] jazzthe#1:
how do i remove this?
[Xiaomi Mi A1 Guides, News, & Discussion] xerxise:
How to recover from "system has been destroyed" error.

How to recover from "system has been destroyed" error.
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
Try to give "fastboot OEM unlock" command while connected in fastboot mode.
[Xiaomi Mi A1 Guides, News, & Discussion] javed1998:
Thanks for the guide. It is awesome. Enjoying portrait selfie ??
[Xiaomi Mi A1 Guides, News, & Discussion] KuroHidari:
su not found

em i wanted ask after i typed su on the shell

all that happened was /system/bin/sh: su: not found

any tips on how to fix this ? thanks
[Xiaomi Mi A1 Guides, News, & Discussion] rox5550:
Working flawlessly, hoping ota also work with this.
[Xiaomi Mi A1 Guides, News, & Discussion] KloNom:
Then the rooting process did not properly work.
[Xiaomi Mi A1 Guides, News, & Discussion] KuroHidari:
How do i fix it then? ._. :confused:
[Xiaomi Mi A1 Guides, News, & Discussion] Haizum74:
Read the start of the post and follow the instructions carefully. You did something wrong, go back read, re-read and try again.
[Xiaomi Mi A1 Guides, News, & Discussion] fwng:
My phone wont boot when the bootloader is locked :/
[Xiaomi Mi A1 Guides, News, & Discussion] Dharmendra Singh01:
Not working......saying.......setprop: Need 2 arguments.....
[Xiaomi Mi A1 Guides, News, & Discussion] KuroHidari:
the 1st step is for those that have rooted their devices right ?

i follwed all steps other than the 1st one
[Xiaomi Mi A1 Guides, News, & Discussion] KloNom:
Nope. You have to do the first step so your phone *is* rooted afterwards (don't worry, you'll unroot it later again).
[Xiaomi Mi A1 Guides, News, & Discussion] Zeik0s:
After the process

Thx for this, but afterwards I noticed in the Play Store, that my Mi A1 is no longer certified by Google. But shouldn't it be still certified?

EDIT:

Clearing Data of Play Store fixed it, now the Device shows up as Certified :D
[Xiaomi Mi A1 Guides, News, & Discussion] harshu0101:
While using that root method only patch img file was flashed. I don't know what "patched" means here, can you explain? Because now this is confusing to me. I've not flashed twrp to install magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] AmanJhawar:
Thanks to this guide I was able to unroot and receive OTA updates again. Much appreciated ?
[Xiaomi Mi A1 Guides, News, & Discussion] Jaza78:
Work fine,thank you.

Послато са Mi A1 уз помоћ Тапатока
[Xiaomi Mi A1 Guides, News, & Discussion] alphacker4:
it says that su not found
[Xiaomi Mi A1 Guides, News, & Discussion] Remgrado:
Nice guides.
[Xiaomi Mi A1 Guides, News, & Discussion] reci_filo:
Thx for this guide mate.
[Xiaomi Mi A1 Guides, News, & Discussion] Sanjaysoni:
If I unlock the bootloader for this process and relock it at last, my warranty will be void even after relocking the bootloader?
[Xiaomi Mi A1 Guides, News, & Discussion] birdie:
Why just one set prop command?

What about

setprop persist.camera.eis.enable 1

?

---------- Post added at 03:04 ---------- Previous post was at 03:03 ----------

Xiaomi honors your warranty regardless your bootloader lock status.
[Xiaomi Mi A1 Guides, News, & Discussion] senthil19:
I'm in February update.

Is it ok to follow this guide and use the recovery patch you provided in the description.
[Xiaomi Mi A1 Guides, News, & Discussion] gad1nm:
Noob question...

Is it possible to use this method to force enabled AR Stickers with ro.config.calibration_cad command??
[Xiaomi Mi A1 Guides, News, & Discussion] xeltos:
I did this procedure. And locked the bootloader again.

But now I get asked for a pattern every time I reboot.

Is it normal?
[Xiaomi Mi A1 Guides, News, & Discussion] m192:
Hello, I am about to get this device, and will do this procedure the minute I get it. Noob question, what's the best mod/app to use that utilizes Camera2API? Thanks!
[Xiaomi Mi A1 Guides, News, & Discussion] The_Scrub:
Facing installation problem with the new March update after doing this.

I require assistance.
[Xiaomi Mi A1 Guides, News, & Discussion] Daishinkan Beerus:
What to do after it says system has been destroyed?
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
Connect the phone in fastboot mode and type

Fastboot oem unlock
[Xiaomi Mi A1 Guides, News, & Discussion] ajmc_1:
Me too...

Did this. But cannot update to March security patch. Why is the update showing error?
[Xiaomi Mi A1 Guides, News, & Discussion] Shadow10746:
Can I do this method on a xiaomi mi note 3 or must it be an A1?
[Xiaomi Mi A1 Guides, News, & Discussion] swap111295:
I executed

Enabled instead of enable in set prop command ...

Will it make the difference
[Xiaomi Mi A1 Guides, News, & Discussion] Denislino:
Flex, those commands will work on any rooted magisk device?
[Xiaomi Mi A1 Guides, News, & Discussion] kapil.git:
system is destroyed :)

8. Relock your bootloader:

fastboot oem lock

After I relock my BL I cant get my phone running it says "The System Has Been Destroyed"

I had to unlock BL with fastboot..to boot once again. I think you cannot lock bootloader if you have a magisk or any other su method patched in current flashed boot imaged
[Xiaomi Mi A1 Guides, News, & Discussion] jhs39:
You can't ever relock your bootloader unless you are 100% stock. Any mods like root or a patched bootloader or an altered system image or a custom recovery and your phone won't boot if you lock the bootloader. With most phones you would have hardbricked the phone.
[Xiaomi Mi A1 Guides, News, & Discussion] kapil.git:
Well thanks for taking time to elaborate things.

Yes I was able to boot ok into system after I unlocked BL and then flashed stock boot.img

Guess I have to live with that ugly "your system is insecure" warning at boot or

modify my ROM with noads hosts file etc.. and wait for a initrd less su method like some su binary in /data etc
[Xiaomi Mi A1 Guides, News, & Discussion] sracka:
Hello,

is this also working for Xiaomi MI6 with the newest Miui global ROM?
[Xiaomi Mi A1 Guides, News, & Discussion] AndreaSpooky:
Hi,

I wanted to apply this kind of fix (flag up + OTA available), but I found this thread too late, so I unlocked and applied the flag with BUILD.PROPS (also installed other stuff on the phone later).

Is there a way for me to revert this situation, and make my present ROM available for OTA again?

I don't know, maybe restoring the original BUILD.PROPS and, running the adb command, and finally locking the original BL: will this be enough or I'll have to run a factory reset and then run this thread guide from scratch?

Thanks
[Xiaomi Mi A1 Guides, News, & Discussion] Jandersonvs:
Hi

Would anyone know to inform me if I do hard reset on my device losing the whole process done?
[Xiaomi Mi A1 Guides, News, & Discussion] ggolu99:
how to disable camera 2api ??? no root
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
Easy method= factory data reset

Otherwise in adb shell type:

rm /data/property/persist.camera.HAL3.enabled
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
An even quicker method would be to make an update ZIP that writes the file to /data/system/properties (or whatever the path is, can't remember right now). Then it's just be:

1) Unlock bootloader

2) Boot TWRP recover image

3) Flash ZIP

4) Reboot to bootloader and lock
[Xiaomi Mi A1 Guides, News, & Discussion] herrminatrix:
Hi,

I did all the steps using powershell and TWRP, console said everything's fine - unlocked, booted with twrp, written all the shell commands, locked bootloader again.

Google camera still doesn't work - have no idea what causes the problem...please help...

I have used detailed instructions from various sources:

https://www.the***********.com/enable-camera2api-eis-xiaomi-mi-a1/

https://xdaforums.com/mi-a1/how-to/root-enable-camera2api-eis-t3749541

Nothing seem to work
[Xiaomi Mi A1 Guides, News, & Discussion] dceamit46:
:cyclops:
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
If anyone is interested I made a simple .bat tool that has some options for lock-unlock bootloader, boot temporary Twrp and enable camera2 API. It's similar to AridaneAM's but:

You can look at the code

Twrp should mount system read-only without asking (no more swype to allow modifications)

Has an updated Twrp (less encryption problems)

You can choose to relock bootloader or not

You can abort procedure if you face any problem

Should work with other devices too if you replace twrp-specific file.

https://1drv.ms/u/s!AnNVEh3KeCSVj9crBKKtc1b94d-hXA ITA

https://1drv.ms/u/s!AnNVEh3KeCSVj9dKdG6gk78Igw8vdg ENG
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
I can't upload something that doesn't exist....

Someone else can make it, doesn't interest me. I have the idea, my work is done.
[Xiaomi Mi A1 Guides, News, & Discussion] mrfaggio:
Hi,

the commands work, but if, after them, i do a factory reset or i do a wipe to data partition do i lost these changes?

thanks.

MF
[Xiaomi Mi A1 Guides, News, & Discussion] AdamBenson:
valid for the mi mix 2?

hi every one. Would someone tell me if this guide is also valid to activate Camera2Api on the Mix 2.

Thanks in advance.
[Xiaomi Mi A1 Guides, News, & Discussion] 21vm:
Seems good ! do u know if it's working with 8.1 / june update ?
[Xiaomi Mi A1 Guides, News, & Discussion] kaz3ro:
everything is ok until step 8, after i close bootloader and reboot, the phone start like if i did a hard reset, it ask me to configure everything again and it isnt rooted and dont have the camera2api enabled. the only solution i can find is just leave it rooted and with the bootloader unlocked
[Xiaomi Mi A1 Guides, News, & Discussion] TheFatality:
How can we do the same for Mi6???
[Xiaomi Mi A1 Guides, News, & Discussion] ADRez:
If only /data is touched but not build.prop, wouldn't it be possible to write props even without unlocking and rooting?

Enviado desde mi ONEPLUS A5000 mediante Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] mi.a1:
bypass wipe during booting to twrp (first time boot to twrp still trigger wipe)

Try this step. Make sure to backup all your data beforehand. I assume that the device is still locked, OEM unlocking and USB debugging is enabled, and twrp file is present.

1. Go to fastboot mode

2. Press the volume down button while typing fastboot oem unlock (bypass wipe)

3. Press Enter (phone will reboot for a while before going back to fastboot without entering the MI screen)

4. Type fastboot boot twrp.img (this time don't press the volume down button )

5. Device will boot to twrp (if this is the first time that your device boots to twrp, you can't prevent wipe from happening. your device will be wiped once twrp finish booting). Skip to step 7 if your device ever booted to twrp before

6. Now that your device has been wiped, go to fastboot again

7. In fastboot mode, type fastboot boot twrp.img for the second time (no need to press volume button down)

8. It will boots to twrp and this time, you will see the TWRP screen (leave your phone and go back to your computer screen)

9. Now type adb devices to see whether your device can be recognized

10. Type adb shell

11. Type setprop.persist.camera.HAL3.enabled 1

12. Type setprop.persist.camera.eis.enabled 1

13. Type exit

14. Type adb reboot bootloader

15. Now, you're back in the fastboot mode. Press the volume down button while you type fastboot oem lock

16. Device will reboot for a while before going back to fastboot (bypass wipe)

17. Type fastboot reboot (no need to press volume down button)

18. VOILA!! You have enabled camera2 api and eis on your mi a1! Your phone is not rooted, bootloader locked and will still be able to receive OTA updates!
[Xiaomi Mi A1 Guides, News, & Discussion] ClowReed:
The correct command is setprop persist.camera.HAL3.enabled 1 and setprop persist.camera.eis.enabled 1. There's a space between setprop and persist, not a dot, as setprop is the command to change the line persist.camera...
[Xiaomi Mi A1 Guides, News, & Discussion] ferox83:
Also, you probably need to SU between before step 11.
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
No, in twrp you already have superuser access.
[Xiaomi Mi A1 Guides, News, & Discussion] Ricky0178:
Will this tool work even for the a2 version?
[Xiaomi Mi A1 Guides, News, & Discussion] ktouy:
i´m trying this volume down method, but still 2 different results, first one did not activate cam2 api, and second time i´ve tried wipe was done everytime, not just the first it boots TWRP

any clue?

Thank!!
[Xiaomi Mi A1 Guides, News, & Discussion] AsItLies:
Wondering the same. One thing for sure, if you flash patched_boot.img you have to be sure to have the version that matches the currently installed build version on A2.

The rest of it *seems* like it should be the same, but I'm not positive. Part of the problem, depending on which way you do it, may be that the A2 is treble and I don't think the A1 is...
[Xiaomi Mi A1 Guides, News, & Discussion] DiesFrae:
I managed to do everything and got the GCAM to work but relocking the OEM again wipes the data so it removes the HAL3 enable command! any solution for that?
[Xiaomi Mi A1 Guides, News, & Discussion] taurnilf:
11. Type setprop.persist.camera.HAL3.enabled 1

12. Type setprop.persist.camera.eis.enabled 1

13. Type exit

14. Type adb reboot bootloader

15. Now, you're back in the fastboot mode. Press the volume down button while you type fastboot oem lock

16. Device will reboot for a while before going back to fastboot (bypass wipe)

17. Type fastboot reboot (no need to press volume down button)

18. VOILA!! You have enabled camera2 api and eis on your mi a1! Your phone is not rooted, bootloader locked and will still be able to receive OTA updates!
[Xiaomi Mi A1 Guides, News, & Discussion] DiesFrae:
Does this method still works? I have a Mi A2 (same process though)
[Xiaomi Mi A1 Guides, News, & Discussion] Jayson1109:
Does this guide apply on my oppo f5?
[Xiaomi Mi A1 Guides, News, & Discussion] sipollo:
If you have a working TWRP boot into it, go to advanced-terminal and type the commands

setprop persist.camera.HAL.enabled 1

setprop persist.camera.eis.enable 1

Reboot and you're done.
[Xiaomi Mi A1 Guides, News, & Discussion] ozgurubuntu:
Hi,

Back to Stock Rom fastboot (no data wipe and no delete apps) Gcam is here and working. Enable Camera2API this article. Any gave error OTA update arrives? Thank you
[Xiaomi Mi A1 Guides, News, & Discussion] faffu41:
I'm pretty sure that the mi A2 already has camera2api enabled.
[Xiaomi Mi A1 Guides, News, & Discussion] AsItLies:
No, the Mi A2 does not have it enabled. It could happen in a future update, of course. But as it is now, it's not enabled.
[Xiaomi Mi A1 Guides, News, & Discussion] miltens:
I tried this but something happens. While I have my pin lock enabled, twrp asks for encryption password which should be the same as my pin, but I get a wrong password message. When I disable the lock, and boot into twrp, it boots, does something really fast (I can't see what) and then normally boots into android. Any chance you can help?

Edit Seems like it was a TWRP problem, and it was unable to mount /data. I used the TWRP provided in the rootless tool folder and it worked. Solution provided in: https://xdaforums.com/showpost.php?p=75586341&postcount=290
[Xiaomi Mi A1 Guides, News, & Discussion] Pa9an:
-nevermind- solved myself
[Xiaomi Mi A1 Guides, News, & Discussion] Acookook:
OK. So I managed to enable Camera2 API with the OP's guide ( and the rooting guide) without downgrading the device or using TWRP, although I erased my phone a few times and had to repeat the rooting of the phone. It all works now. At this moment my phone is downloading the Oct security patch.
[Xiaomi Mi A1 Guides, News, & Discussion] chrizjames95:
I want my phone to be rooted even after enabling camera2api and also like ota how can I proceed?
[Xiaomi Mi A1 Guides, News, & Discussion] elbi14:
U cant install ota update on rooted devices.

Just install updated rom zip . Flash on twrp
[Xiaomi Mi A1 Guides, News, & Discussion] chrizjames95:
But I rooted using magisk by this method---

https://xdaforums.com/mi-a1/how-to/root-mi-a1-oreo-8-0-disabling-ota-magisk-t3728654

(i think it says we can install ota after uninstalling magisk and some other steps )

But anyway now I like to enable camera2api and eis HOW CAN I do it help please:)
[Xiaomi Mi A1 Guides, News, & Discussion] duniatri:
I have the same issue.

Have my device enabled Camera2API using this method, I can download the Oct OTA update, but can't install it. "Installation problem".

Is there any way to solve it?

Thanks
[Xiaomi Mi A1 Guides, News, & Discussion] mdebiprasad563:
This method is the only way to stay updated with OTA after rooting mi a1 with magisk manager .
[Xiaomi Mi A1 Guides, News, & Discussion] tnttrx:
both after unlocking and locking back the phone, it was automatically erased and re-encrypted (factory reset). :(
[Xiaomi Mi A1 Guides, News, & Discussion] BalaN83:
Use volume - button on the time of issuing lock and unlock command.
[Xiaomi Mi A1 Guides, News, & Discussion] sonic_ear:
How? I still didn't get it
[Xiaomi Mi A1 Guides, News, & Discussion] barrack1:
Don't worry, that method doesn't work well anyway and the phone will wipe user data once you boot into TWRP later on.
[Xiaomi Mi A1 Guides, News, & Discussion] Xinxeta:
Does this method work on Pie update?
[Xiaomi Mi A1 Guides, News, & Discussion] Mankiratsinghsehra:
I followed all the instructions and Camera2Api Was enabled but as soon as I locked and unrooted my phone it seems to have disabled the api as well as all the googlecamera apks are just crashing. Please help
[Xiaomi Mi A1 Guides, News, & Discussion] AKBIROCK3:
use this app to enable HAL3

https://play.google.com/store/apps/details?id=com.proxdz.hal3enabler
[Xiaomi Mi A1 Guides, News, & Discussion] :
Can anyone please explain what this line does

persist.camera.stats.test 5
[Xiaomi Mi A1 Guides, News, & Discussion] juliscy157:
Hello there. I wanna ask something, if we enable camera2 API with steps above, is it true that all of our files will deleted? Just like factory reset.
[Nokia 3 Questions & Answers] Deleted member 5928740:
Oreo Beta is releasing soon so are you guys positive or negative about it?
[Nokia 3 Questions & Answers] redweaver:
I honestly don't know. I expect that there will first be a beta stage, when people will be able to test Oreao on their devices. It's then that we'll know if upgrading would be worth it