How to enable Camera2 API on Xiaomi Mi A2/A2 Lite with Android Pie

In this simple tutorial, we will show, how to enable Camera2 API on Xiaomi Mi A2/A2 Lite running Android Pie without root. The stock Pie update for Xiaomi Mi A2/A2 Lite has been around for a while now and we know most of the users are already running Android Pie update on their device. Mostly you need to root your device before performing any system wide changes but if you are already running Android Pie on your device then you can easily enable Camera2 API on Xiaomi Mi A2/A2 Lite running Android Pie without root, just continue reading our guide to see the process to enable Camera2 API on Android Pie running Xiaomi Mi A2/A2 Lite without root.

See also: Camera2 Api enabled for Xiaomi Mi A1

What is Camera2 API?

Google introduced the Camera2 API in it’s OS that gives developers access to more advanced features of the camera app like manual exposure (ISO, shutter speed), focus, RAW capture and more. Despite the fact the Xiaomi Mi A2/A2 Lite is an Android One device and comes in pure stock Android UI but still it lacks the Camera2 API support. There is no denying that Android is one of the most versatile OS, allows you perform tweaks and customization of your choice. Since Xiaomi Mi A2/A2 Lite comes with stock Android UI so it is also a development friendly device. If you have already rooted Xiaomi Mi A2/A2 Lite in your hands, you can easily enable the Camera 2 API by making a changes in the few build.prop. But you can also do it without root, and that’s what we are going to show you how easily you can enable Camera2 API on Xiaomi Mi A2/A2 Lite running Android Pie.

How to enable the Camera2 API on Xiaomi Mi A2/A2 Lite without root running Android Pie

At first you need to get access to temporary root on your device by booting a Magisk Patched Boot Image via fastboot commands. Let us tell you that the temporary root will not affect the OTA blockage or anything you can expect from a rooted device. Once your device booted into OS, make a few changes in the Terminal Emulator to enable camera2api on Xiaomi Mi A2 and Mi A2 Lite.

Necessary downloads and Pre-requisites:

Here we have listed all the Android Pie patched boot images for Xiaomi Mi A2/A2 Lite along with the stock boot image files for the respective firmware.

Download Patched boot for Xiaomi Mi A2 (jasmine)

We have arranged the boot images specified for the firmware you are running. Just pick the one designed for your OS.

V10.0.2.0.PDIMIFJ Patched Boot Image: Link

V10.0.2.0.PDIMIFJ Stock Boot Image: Link

Download Patched boot for Mi A2 Lite (daisy)

V10.0.3.0.PDLMIXM: Patched Boot Image: Link | Stock Boot Image: Link

V10.0.2.0.PDLMIFJ Patched Boot Image: Link

V10.0.1.0.PDLMIFJ: Patched Boot Image: Link | Stock Boot Image: Link

Set up adb drivers on your PC, here is a guide to do that.

Once done with the above steps, now head to the process below to enable camera2 api on Xiaomi Mi A2/A2 Lite.

How to enable Camera2 API on Xiaomi Mi A2/A2 Lite without root

Just follow these steps carefully to avoid any issues during the process.

Download the Android Pie patched boot image for your device from the links above.

 

Now transfer the downloaded boot image file to the ADB folder where the ADB/Fastboot binaries are present by default it is in C:/username/ADB.

 

It’s the time to turn off your Xiaomi Mi A2/A2 Lite completely.

 

Now hold press and hold Volume Down + Power buttons together until you see fastboot mode on your device.

 

Connect your device to PC using USB data cable and let the drivers installed completely.

 

Now press and hold Shift key and right mouse click any empty space in the adb folder and choose ‘Open command window here’ (as shown above).

 

Enter in the following command in the command window to temporarily boot the Magisk patched boot image on your Mi A2 or A2 Lite.

fastboot boot boot-image-filename.img

 

Note: Remember to change the name of the file according to the firmware you are running on your device, for example, for V10.0.4.0, the command should be typed as fastboot boot patched_boot_V10.0.4.0.PDHMIXM.img

 

Upon the execution of the above command your Mi A2 should boot into the OS with temporary root.

 

Now install the terminal emulator app on your device and open the app when done.

 

In the Termux (terminal emulator) enter the following command. ‘SU’

 

Grant the necessary superuser permissions to Termux when prompted

 

Now type these final commands in the terminal emulator to enable camera2 api on xiaomi Mi A2.

setprop persist.camera.HAL3.enabled 1

setprop persist.vendor.camera.HAL3.enabled 1

setprop persist.camera.stats.test 5

setprop persist.vendor.camera.stats.test 5

 

That’s it! You have successfully enabled the Camera2 API on Xiaomi Mi A2/A2 Lite running Android Pie. Now you can just install the Google camera ported apk on the device and access the goodies of Nightsight feature that dramatically improves image quality. If you have any query let us know, you are free to ask. You can contact me directly on my gmail: [email protected]

Rate this post
GadgetsTwist
Logo