yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Samir 120:
It says failed (remote:dtb not found) in fastboot boot patchedboot.img step, any idea whats wrong?I tried with latest magisk as well as with the one in the patched boot file.

Im in the latest build 11.0.4.0 stock.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] rgglabs:
Stock camera app stopped working

The device i am using is Mi A2 (jasmine_sprout) , after following the instructions camera2api was enabled and Gcam mods started working but unfortunately my stock camera app stopped working and front cam flash as well. Any solutions on these problems ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] mddanishansari:
I recently flashed PixelExtened ROM on my MiA2 running Android 11. I checked with Camera2 Probe and Hardware Support Level of all Camera (Camera ID 0, 1, 2 and 3) are showing LEVEL_3 as green.

Does that mean Camera2 API is already enabled in my phone? And I don't have to follow these steps, right?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Tech0308:
Yep, custom Ron's usually already enable camera2api
[Xiaomi Mi A2 Lite Guides, News, & Discussion] brooklyn_bounce:
Hi Guys,

If I understand correctly this method will unlock bootloader, load the camera2 API changes and then relock the bootloader again, all this without erasing my data, am I right?

That's awesome, but my question is, can I use that with Mi A2, with the obvious changes with the propper boot images? Thats because on MI A2 forum the guide to unlock bootloader says that it will always reset my phone.

Thanks in advance.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] brooklyn_bounce:
Repost, sorry. Someone can delete this one.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] m4ctep:
Hi ,

here is a Patched Image for 10.0.18.0 (Magisk Ver.: 23.0) : Download

adb reboot bootloader
fastboot boot magisk_V23.0_patched_10.0.18.0.img

Wait for Reboot....

adb shell
su
setprop persist.vendor.camera.HAL3.enabled 1
setprop persist.camera.stats.test 5
setprop persist.vendor.camera.stats.test 5
reboot

Install Gcam now and Heave Fun !
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ansel26:
Do i need to install magisk via direct install or do i need only to install magisk manager ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] h3r0n:
only magisk manager
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ansel26:
So i have the bootloader unlocked and i want to keep it.

I was thinking, do i need to hold the volume down button anyway or i can just reboot in fastboot mode, flash patched boot and then do the commands of adb... ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] HTCDevil:
You can leave it unlocked without

fastboot oem lock
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ansel26:
Okay i understand that i can keep bootloader unlocked, my question is do i need to hold the volume down button ?

Or since i have already bootloader unlocked i don't need to hold It
[Xiaomi Mi A2 Lite Guides, News, & Discussion] HTCDevil:
Volume down pressed needed only when you execute

fastboot oem unlock

and

fastboot oem lock

So, if you skip last one you have to keep pressed volume down only for first command. Understand?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ansel26:
Sorry if i bother you again, do i need to run fastboot oem unlock even if i have bootloader unlocked ?

Can't i just reboot in fastboot mode and run the command "fastboot patched boot" ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] thorin0815:
No need to run it again if your bootloader is already unlocked.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] HTCDevil:
No problem, you can give directly from fastboot boot patched_boot.img
[Xiaomi Mi A2 Lite Guides, News, & Discussion] nickSnake:
After typing su, it says permission denied. Using Oct patched_boot
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ansel26:
After you type su, you get a pop-up on the phone and just type allow.

After that proceed with the guide and it should work fine.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] anko13:
Same question?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ansel26:
Sorry the first part was an answer to the problem of the other member.

As regards me, i installed correctly everything and camera works great?.

I was wondering, can update to october security patch ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] HTCDevil:
You could do this
[Xiaomi Mi A2 Lite Guides, News, & Discussion] nickSnake:
No luck, no pop-up on my phone after typing su
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ansel26:
Update to october security patch and google camera still works.

Thank for the guide :)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] guilamu:
Tried this, and I can't relock the bootloader it says "The system has crashed" with a red thingy. If I re-unlock the bootloader it works, though but I can't update the phone anymore...
[Xiaomi Mi A2 Lite Guides, News, & Discussion] bedencic:
where is the problem, that camera uses so much time to take picture, i even got hdr off, and it takes long time to take picture.

i was using lg g4 before, and i took picture right away.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Mayur_Dhuri:
Can I use this command, without unlocking bootloader or without rooting device to enable camera2api on MI A2?

fastboot oem enable_camera_hal3 true
[Xiaomi Mi A2 Lite Guides, News, & Discussion] policepooh:
The system has been destroyed

When I relock my bootloader I'm getting this message but after giving the command to fastboot oem unlock phone works fine with unlock bootloader can any one guide to lock bootloader
[Xiaomi Mi A2 Lite Guides, News, & Discussion] marcotech80:
Problem

Hi

I tried to follow the guide but i have a problem..

After the restar if i keep the volume down the smartphone enter again in fastboot mode, so i not see the mi logo.. Please could you add a video or explain when i could release the volume down botton? Thank and sorry for My terribile English.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] bedencic:
doesnt work anymore after november update
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ahmed Hady:
flash stock boot.img and relock the bootloader .. i think it should work and gcam will work too
[Xiaomi Mi A2 Lite Guides, News, & Discussion] guilamu:
In fact I just had to accep the SU request from SU on my phone (I did not saw it the first time).
[Xiaomi Mi A2 Lite Guides, News, & Discussion] policepooh:
thank you so much ill try when i go home
[Xiaomi Mi A2 Lite Guides, News, & Discussion] adakaya1994:
Yeah, i can confirm :(

Edit: I wasn't holding the volume button down when locking the BL so yeah now it works my mistake.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] kingars:
This tutorial, works fine in one Mi A2 Lite?

Regards
[Xiaomi Mi A2 Lite Guides, News, & Discussion] marcotech80:
Video tutorial

Hy guys, anyone can create a video tutorial? I have one problem, if i keep volume down during the restar After fastboot command the smartphone came back in fastboot mode so it not restar normale. So i heed to know the exactly operation for avoid the terminal reset.

Thank you and sorry for My terribile english
[Xiaomi Mi A2 Lite Guides, News, & Discussion] gianlucataldi:
Step 2

About the Step 2: have i to just download the patched_boot.img or following the entire guide?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] marstonpear:
Even though I didn't release the vol down button, the phone just erased all data lol :cowboy:
[Xiaomi Mi A2 Lite Guides, News, & Discussion] adakaya1994:
Yeah, takes several tries.. :rolleyes:
[Xiaomi Mi A2 Lite Guides, News, & Discussion] hmmmmmmmmmm:
Does this work with Mi A2 (non-lite version)?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] HeyImVitor:
no, because the boot.img is not similar
[Xiaomi Mi A2 Lite Guides, News, & Discussion] LHVieira:
Hi, please..whats means GIVE ADB PERMISSIONS in n.5

(5. connect the phone to your PC and give adb permissions to your PC.

It's my frist time trying
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Austinsmiht:
It still works, just did it. Even on the November security update. Didn't lose any data.

---------- Post added at 04:08 PM ---------- Previous post was at 04:08 PM ----------

In Developer options (on phone) – ensure USB debugging is enabled (which is technically adb), plug it in to your computer and you'll see a popup (on phone) similar to this https://goo.gl/86fxqu. Accept the message.

You have now given ADB Permissions to your PC. :)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] LHVieira:
Thank you so much foi your help!!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] testingtestingtesting:
Removing root?

How do you fully remove the "temporary" root, while keeping Camera2 API enabled, and allowing all OTA's to work? Thanks!

Edit 2: As Austinsmiht said in his reply below, as we're using "fastboot boot patched_boot.img" and not "fastboot flash boot patched_boot.img", we're not actually flashing the patched boot, we're just booting it. So, to fully remove the temporary root, fully returning to stock boot.img, simply reboot your device!

Edit, I found out how to remove the root:

In Magisk Manager, Uninstall, "restore stock" or "complete uninstall".

Or fastboot boot boot.img . (Edit 2: This wouldn't actually remove root if we had fully flashed root as it's not "fastboot flash boot boot.img").

Official stock firmware link that contains the boot.img: https://en.miui.com/download-354.html\
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Austinsmiht:
From my understanding the "patched_boot.img" holds the root. Since you're not flashing it, and only booting it – hence the command "fastboot boot patched_boot.img" (notice boot, not flash) – once you reboot you're back to your stock, non rooted boot image. Therefore there's no issue with OTA's or anything.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Sparker0i:
For me, it is stuck at fastboot boot patched_boot.img step. Phone is unlocked and fastboot is able to recognise the phone as well
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Batmany:
If I make a factory reset, camera2api is disabled? Or it keep enabled?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Batmany:
Camera2api persist after a factory reset?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] h3r0n:
Does this method still work after the Pie update?

In theory, no.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] gianlucataldi:
Step 8

After: fastboot oem unlock...

If i have Windows 7 and the folder on Desktop, what command have i exactly to do?

The guide says: fastboot boot patched_boot.img

But if the folder is just on the Desktop have i to replace the path? And if yes can anyone explain me the exact command please?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] hossman:
Patched boot should be placed in the folder with platform/adb tools. Then run that command, same path as you unlocked bootloader.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] gianlucataldi:
So i have to do: C:\Users\Desktop\folder\fastboot... for both the commands? I' m sorry if i haven't understood yet
[Xiaomi Mi A2 Lite Guides, News, & Discussion] hossman:
Yes
[Xiaomi Mi A2 Lite Guides, News, & Discussion] gianlucataldi:
In conclusion i have to do that:

Step 8

fastboot C:\Users\Desktop\folder\oem unlock

fastboot boot C:\Users\Desktop\folder\patched_boot.img

For unlocking

Step 10

without add any path

Step 13

fastboot C:\Users\Desktop\folder\oem lock

fastboot reboot

For locking

Is that right? I' m sorry if I became boring...
[Xiaomi Mi A2 Lite Guides, News, & Discussion] hossman:
I'm sorry I honestly don't think I can help, if you're not familiar flashing via fastboot. Using fastboot commands you need to be using command line prompt in that location.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] gianlucataldi:
I just would like to know what the words into the brackets means.

(on Windows fastboot boot C:\path\to\patched_boot.img and of course replace the path)

Because i have Windows 7 but i' ll try thanks anyway
[Xiaomi Mi A2 Lite Guides, News, & Discussion] hossman:
In your command prompt you need to navigate to the folder of adb, ex "CD c:\path\platform tools\where ever your tools are"

Then "fastboot flash/boot file.img"

Thats it
[Xiaomi Mi A2 Lite Guides, News, & Discussion] gianlucataldi:
Ok many thanks for the patience
[Xiaomi Mi A2 Lite Guides, News, & Discussion] redeleon:
With the pie update coming, do you think this'll work after that? Thanks!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] codlike:
Do ota still work ?

Can I ask (probably for me) a dumb question. This makes the camera2 api persist, but by changing the buildprop does that mean that you no longer get any OTA updates and would have to flash them manually or would they continue?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] redeleon:
I already did the steps and enabled camera 2 api.

Can anyone confirm if the OTA updates are working? Seems like im stuck with the November 1 patch.

I also uninstalled Magisk Manager is that okay?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Medo22:
Is this works for android p?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] lorderdo:
After the 8th step, the opening screen is waiting for a long time. I had to reboot . I installed the 9.Magisk manager application after it opened.

10. After entering the code is as follows.

Can you help me? thanks.

Microsoft Windows [Version 1e.e.17134.407] c) 2018 Microsoft Corporation.

C:\Program Files (x86) \Minimal ADB and Fastboot>adb devices

list of devices attached

3a9ddf18485 device

C:\Program Files (x86) \Minimal ADB and Fastboot>fastboot oem unlock

OKAY [ e.024s] Finished. total time .025s

C:\Program Files (x86) \Minimal ADB and Fastboot>fastboot boot patched_boot.img

<waiting for any device>

downloading 'boot.img'.. . OKAY e.985s] booting.. . OKAY Finished. total time 1.677s 0.686s]

C:\Program Files (x86) \Minimal ADB and Fastboot adb Shell

daisy_sprout: su

system/bin/sh: su: not found

1 27 | daisy_sprout: setprop persist.camera. HAL3.enabled 1

setprop: failed to set property 'persist.camera. HAL3.enabled to '1’

1 daisy_sprout: setprop persist.camera.eis.enabled 1

setprop: failed to set property persist.camera.eis.enabled' to '1 daisy sprout:/ $
[Xiaomi Mi A2 Lite Guides, News, & Discussion] gianlucataldi:
I am a common user and i haven't tried nothing anymore because i am waiting for my Xiaomi from gearbest but i noticed you have doing this:

system/bin/sh: su: not found

You pick a file from the bin and of course wasn't found (imho) i am not an expert
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Medo22:
Is it works for android p?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] vu3:
at point 13, it doesn't reboot! it stopped on "fastboot " :( any suggestions?

Thank you!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Luminoux:
It does for me. But make sure you're using the Pie's patched_boot.img.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] radioactiveAHM:
Hey. I enabled camera2 API and installed Gcam. All work fine. But I got a weirdo problem :|

my phone supports shutter speed up to 33 seconds but when I use manual mode with any camera (any camera that supports manual shutter speed) I set shutter speed at 2 or higher my camera takes pictures at 1 second! even when I set it on 33 seconds my camera take pictures with 1 second shutter speed . I don't know why it's not going higher than 1 second . Why ? How do I fix this ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Medo22:
Where can I find it?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Luminoux:
Here you go. Don't forget to unzip the file.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Medo22:
Thank you
[Xiaomi Mi A2 Lite Guides, News, & Discussion] daigohouse88:
help

hello, thanks for the guide, I am stuck at point n.10.

Code:

on

Code:

setprop persist.camera.HAL3.enabled 1

Code:

setprop persist.camera.eis.enabled 1

Putting the code SU

gives me an invalid command error

and so I can not proceed

I state that I do not have the root I have only unlocked the bootloader

and followed the guide step by step
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Medo22:
(on Windows fastboot boot C:\path\to\patched_boot.img and of course replace the path)

release the vol down button only after the phone starts to reboot

I can't understand what this stand for

I put the files I need in the adb folder so am I need this step?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] marstonpear:
I don't know how hard was it for you to come up with this guide but, people are confused. To skip erase after unlock/lock command you simply need to

-write the command

-as soon as you write the command and hit enter, unplug the phone and start holding vol - button

-phone will go to fastboot mode instead of erase mode

-then simply reboot

It's as simple as that but thanks to your explanation I had to recover all my data.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] gianlucataldi:
If I will got my brand new Xiaomi with Android 8.1 can I for first get the camera api2 and only after this Update it?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] yelladev:
Can you explain why we need to do the boot img bit if we only need the changes in setprop.

Is there something in the bootimage we need to use the Google Camera?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] legelek:
Hi!

After booting from "patched_boot.img" (8th point) the phone is not booting (stuck at "android one, unlocked" boot picture) . I have the newest fw (V9.6.16), while the newest patched boot img is for 9.6.11.

When I'm reloading of course "su" don't work.

Do you have newer patched boot.img? I think the problem is there. I couldn't downgrade my phone, i got message: "flash system b error".

Thanks!
[Xiaomi Mi A2 Lite Guides, News, & Discussion] LooieENG:
Yea this also got me and a few others it seems. Pretty confusing

All working now though, thanks for the guide
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Jadz.31:
I don't know how but worked for me on pie. Bit lost my data though i had back up. Thanks for the guide and i would like to know if we update gcam app will it work?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] rob.1:
Attn: Experts

Attn: Experts

This is a very helpful forum to get the camera on the A2Lite working to its full potential, however after going through all the pages it would appear the original instructions could be updated to include relevant suggestions, cautions and any corrections to increase the user success. If the original instruction post has been updated, perhaps a notice at the top on the update date.

There are 2 questions that several users have asked and not completely answered:

1. Will these instructions work with Oreo?

2. If so, will the Pie update overwrite the Camera2 API back to Camera1 API?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] leroi77:
Hi, just do it in Oreo 8.1 so this procedure works perfectly to enable camera2 api and so the google camera on Mi A2 lite :good:

but I do not know with Android Pie
[Xiaomi Mi A2 Lite Guides, News, & Discussion] IO13:
Hi to all, I've a question for you..

I've unlocked Bootloader, I've installed Magisk and Gcam (that's working perfectly)

If now i lock bootloader I lose my data ?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] redeleon:
Did this before and I upgraded to pie via the OTA update (not VPN) Gcam still works :)
[Xiaomi Mi A2 Lite Guides, News, & Discussion] xxmicahoo:
Can confirm Gcam persistent after Oreo to Pie Official OTA update in the USA.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] rob.1:
su... permission denied

Can't get it to work, always end up with permission denied after su command on step 10. Yesterday the phone updated to pie, and none of the patched_boot images on the linked site match the current V10.0.2.0 phone build number for pie. If I use an earlier one, which one? I tried several when I had Oreo without success. Do you release the volume the just after the rainbow stripe starts going back and forth or hold until it finishes the boot and starts lowering the volume? After both the steps in 8, I received confirmation. When it finishes the boot, should the Android OS be your normal looking system with all your apps installed? When you open Magisk, it wants to update to v18 and mount the patched_boot image file. Should Magisk be only installed or running? Maybe that is the issue I am doing wrong. Please help. I take a lot of low light photos and the stock phone app is mediocre at best.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] panduro:
Hello, what is the best guide to get the Gcam? Everything seems confusing...
[Xiaomi Mi A2 Lite Guides, News, & Discussion] rob.1:
Do these instructions only work on the Redmi 6 Pro or will they work on the stock Android on the global A2 Lite with Android One?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ciao ragazzi:
This works with A2 lite, if it's still on 8.1. Afterwards you can update to Pie and keep the required settings. But I had 4 fullwipes because I didn't manage to keep the vol down button pressed at the right moment.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] rob.1:
What is the "right" moment. What is the screen doing and about how long is the wait? Mine already updated to Pie yesterday. Every time I try, when it reboots it erasing everything and has yet to boot to the image file. Confirms the downloading the boot image, then booting. This is getting tiresome restoring all the apps and data every time. A video would sure help myself and others.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] panduro:
Does this guide works on Pie?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] Ciao ragazzi:
This one helped me to find the "right moment":

I used a patched boot image from https://xdaforums.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952

But there is none for Pie yet. Maybe follow the DIY instructions there.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] rob.1:
Thank you. I tried this as well without success.

On comment #83 there is a link to the patched boot image for pie.

Also, I found another link for a patched image for Pie and slightly different instructions for installing the patched boot image.

search root-xiaomi-mi-a2-a2-lite-android-pie-magisk

They first unlock the boot loader as a separate step, then restart again into fast boot to install the temp image with this adb command.

.\fastboot boot patched_boot.img

Perhaps this method will be easier to do, although I believe it wipes your data with the new image. If that is the case, can you reboot with fastboot oem lock and fastboot reboot to restoring the OEM image. Then reinstall your backup thru SDK or Google. I would think that Camera2 API would still be there.
[Xiaomi Mi A2 Lite Guides, News, & Discussion] evil89:
I already updated to Pie and the stock camera isn't giving me any still images (really blurry if an object is moving, even a person walking).

Is there a way to fix this?
[Xiaomi Mi A2 Lite Guides, News, & Discussion] rob.1:
Finally got it to work. Here are some hints to help others:

Most important, make sure you are using the exact boot image file version for your device (see about phone) for the patched_boot.img. If it is not correct, it will erase everything and boot to the original clean system, but still without the patched boot.

For Pie V10.0.2.0 PDLMIFJ there is a link from the search tcd "root-xiaomi-mi-a2-a2-lite-android-pie-magisk". This image file worked perfect. You can release the down volume after the rainbow stripe starts up, about 5 or so seconds after you initiate the "fastboot boot patched_boot.img" command.

(I believe that was my problem all along, with both Oreo and Pie. I think the download link on comment #83 is for Pie V10.0.1.0. It did not work on mine.)

Install the latest (v18, not v17) or Magisk, and do not update or run Magisk any further. Leave it on screen though when you start the "su" commands.

I basically followed the instructions from page 1, however after the final fastboot reboot command, the phone just hung on the fastboot mode without restarting. I finally released the down volume and still nothing. Holding the power button down for 5 or so seconds (hard restart) booted back into the normal OS with the camera2 still enabled. Uninstall Magisk, install the gcam app and you're good to go.

I hope this clarification helps others.