How to Enable Camera2 API on Mi A2 [Without Root]

Mi A2 is one of the best budget Camera phones launched last year by Xiaomi. The OS is stock on this phone and provides an amazing experience. It includes a good stock camera but if you really want to take better pictures, then Google Camera is the best option. But first, you need to enable Camera2 API on your phone. Here’s the step by step guide to enable Camera2 API on Mi A2 without Root.

how to enable camera2 api on mi a2

In most of the Android phone, the Camera2 API is disabled by default, which restricts the manual controls of the camera. Enabling the Camera2 API will enable advanced controls like Manual exposure, Manual focus, RAW & HDR+ support, Manual shutter speed, Night Sight, Manual ISO and more. Google Camera is a very popular Android app which helps users to capture images which are better than Stock camera results. So if you want to get Google Camera on your phone with all the features working then you need to enable Camera2 API on your Mi A2.

Xiaomi Mi A2 – Details

Mi A2 is a Stock OS based Android One phone which runs on Android 8.1 Oreo and further upgradable to Android Pie. It has a 5.99-inch display of 1080×2160 pixels Resolution. The smartphone is powered with Qualcomm Snapdragon 660 AIE processor which is integrated with Adreno 512 GPU. It comes in two different RAM & Storage options which are 4GB + 64GB and 6GB + 128GB.

Talking about Camera it has a dual Camera setup at the back consisting 20-megapixel and 12-megapixel primary & secondary sensors. And at the front, it has a single 20-megapixel selfie camera with AI feature. The phone boasts a 3,010mAh battery with standard charging.

How to Enable Camera2 API on Mi A2

Mi A2 is different than other Xiaomi phones running on MIUI, but the process is nearly the same. Only the part which makes the process different is partition which is A/B for Mi A2. And to enable Camera2 API on Mi A2 we need to flash or boot into the temporary rooted system and then we will unroot the device.

I will explain the procedure step by step including the unlocking bootloader process. Make sure to exactly follow the exact same procedure. Below are the prerequisites to follow before going to steps.


Steps to Unlock Bootloader

  1. Open Settings on your Mi A2.
  2. Go to About Phone and tap 7 times on Build Number to enable Developer options.
  3. Go back to Settings and then go to System > Developer options.
  4. In Developer options, enable OEM Unlocking and USB Debugging.
  5. Connect your phone to PC using a USB Cable. how to enable camera2 api on mi a2
  6. Open Command window on PC and enter the below command to check the device is connected or not, it should return some ID
    • adb devices
  7. If you entering this command for the first time then it will ask for permission, so grant the permission. how to enable camera2 api on mi a2
  8. Now enter the below command to boot into Fastboot mode
    • adb reboot bootloader
  9. The phone will boot into Fastboot mode, now enter the below command to unlock the bootloader
    • fastboot oem unlock
  10. The above command will erase all the data and boot into the system. Skip the setup and again enable USB Debugging & OEM unlocking.
  11. Again boot the phone into Fastboot mode using the same command.
  12. Once you are in Fastboot mode, enter the below command
    • fastboot flashing unlock_critical
  13. Again skip the setup and enable USB Debugging & OEM Unlocking.

Steps to Enable Camera2 API

  1. Now that Bootloader is unlocked on your phone you can now enable camera2api on Mi A2.
  2. Extract the downloaded Platform tools zip file.
  3. Download the patched_boot.img and boot.img (Download Link). Check the version of the software from build number (eg if the build number is PKQ1.180904. then download files for
  4. Copy both the files to the extracted Platform tools folder. how to enable camera2 api on mi a2
  5. Make sure that USB Debugging & OEM Unlocking is enabled in Developer options.
  6. Connect your phone to PC using a USB cable.
  7. In Platform tools folder, press Shift + Right click on an empty area and select “Open PowerShell window here” or “Open Command window here”. how to enable camera2 api on mi a2
  8. Boot your phone into Fastboot mode, follow command in step 8 from unlock bootloader section.
  9. While in fastboot mode enter the below command to boot into the temporary booted system
    • fastboot boot patched_boot.img
  10. The phone will reboot, and Magisk Manager will be there if not then download the APK and install it. Open the App and close it (skip if it asks for further installation).
  11. Open Command window on PC and enter the below commands one by one (enter only first three commands for Oreo)
    • adb shell
    • su
      • this command will ask for root permission, so grant the access on phone
    • setprop 1
    • setprop 1
    • setprop 5
    • setprop 5
    • exit
    • exit
  12. Now open Magisk Manager App and click on uninstall > Full uninstall. The phone will reboot and boot into unrooted system.
  13. That’s it. You have successfully enabled Camera2 API on Mi A2 without root.

Now you will be able to use Google Camera and other Manual Cameras on your phone for capturing better pictures and images. If you don’t know how to install GCam on your phone then follow the given method.

How to Install Google Camera on Mi A2

  1. Download Google Camera APK (GCam 6.1 by Arnova).
  2. Install the APK (allow installation from Unknown source).
  3. Open the Google Camera app and give all the permissions.
  4. Tweak the settings according to your need and enjoy capturing amazing photos.

So there you have it the complete guide to enable camera2 api on Mi A2 and install working Google Camera. If you get any error makes sure to comment below and we will reply with the solution for the error.

Related Guides:

Explore Stories


Photo of author

Ashutosh singh

Computer Science graduate and tech enthusiast. Love testing new tech gadgets ever since my first windows phone from Samsung. Working as a technical writer for more than five years, and I believe I have also developed good SEO skills. In my spare time, I like watching movies, and playing games.

Leave a Comment