How To Enable Camera2 API On Xiaomi Mi A1

508
0

Xiaomi provides one of the best smartphones in budget price. The company has grown into a giant within a span of 3 to 4 years. They have managed to achieve this by providing excellent value for money to its users. The Mi A1 is one and the only smartphone in Xiaomi’s arsenal which comes with Stock Android or you can say Vanilla Android. Xiaomi Mi A1 is equipped with a decent hardware and a dual-camera setup. However, stock Android doesn’t support dual-camera setup, therefore, Xiaomi had to throw in their own camera software. Dual-camera setup on Mi A1 performs extremely well, but you can still improve the camera on Mi A1 by enabling Camera2 API. In this Android Tutorial, we will tell you How To Enable Camera2 API On Xiaomi Mi A1.

Enable Camera2 API On Xiaomi Mi A1

We always try to keep the guide simple and detailed at the same time. However, still, the thing could go South and Android Tutorial wouldn’t take any responsibility if you damage your phone in the process.

Prerequisites

How To Enable Camera2 API On Xiaomi Mi A1

  • Go to the directory where you have Fastboot and ADB on Windows: Open Command Prompt (Shift + Right-click > Open Command Prompt).
  • Now type in adb shell and then On your phone, you may be asked to allow root access. Allow it.
  • You are now in the root shell and you can easily enable Camera2 API on Xiaomi Mi A1. To do it, type in the following command and press enter: setprop persist.camera.HAL3.enabled 1
  • After passing the above command, close command prompt, disconnect your phone from the PC and reboot

Camera2 API is now enabled on your Mi A1. Now it’s time unroot and lock the bootloader on Xiaomi Mi A1.

Lock Bootloader on Xiaomi Mi A1

  • If you have rooted your device with Magisk then launch the Magisk Manager click on Uninstall at the bottom of the page. Select COMPLETE UNINSTALLfrom the dialog box.
  • Or if you have rooted your device with SuperSU. Then you can unroot Xiaomi Mi A1 by launching SuperSU app and selecting
  • Once you have successfully unrooted your phone. Connect it to the PC and launch the ADB.
  • Now reboot your phone into fastboot mode by passing the following command: adb reboot-bootloader.
  • Once your phone is rebooted in fastboot mode, pass the following command to lock the bootloader on Xiamo Mi A1: fastboot oem lock

That’s it! Now you know how to Enable Camera2 API On Xiaomi Mi A1 and keep bootloader locked.