Camera2 API on Xiaomi: A Complete Guide to Activation and Configuration

If you’re into mobile photography or use a Xiaomi smartphone to shoot in specialized applications (like Google Camera or Open Camera), you’ve probably come across the term Camera2 API. This programming interface allows apps to gain advanced control over the camera module, allowing you to access manual settings, RAW format, and even improve the quality of images in low light conditions.

However, by default on many Xiaomi devices (especially budget and mid-range), the Camera2 API is disabled or running in a stripped-down mode. This limitation is associated with optimization of performance and stability, but for enthusiasts it becomes an obstacle. In this article, we will discuss what the Camera2 API is, how to check its support on your Xiaomi, and most importantly, how to activate a full mode without risk to the device.

It is worth noting that the procedure for turning on may vary depending on the model and version of MIUI. For example, on flagships like Xiaomi 13 Ultra or Redmi K60 Pro API is often activated out of the box, while on the Redmi Note 12 or POCO X5 may require manual tuning.

πŸ“Š You use third-party camera apps on Xiaomi?
Yes, Google Camera.
Yes, Open Camera or analogues
No, I'm getting enough stock app.
I tried it, but I didn't notice the difference.

What is the Camera2 API and why is it needed?

Camera2 API β€” It is a modern interface from Google that replaces the outdated. Camera1 API It gives developers advanced tools to work with the camera. API, supports:

  • πŸ“· Manual adjustment of exposure, ISO, White and Focus Balance (full manual mode).
  • πŸ–ΌοΈ Filming in format RAW (file.DNG), What's critical for post-processing.
  • πŸŒƒ Improved low light performance thanks to long shutter speed support.
  • πŸŽ₯ Capture video with high dynamic range (HDR) third-party.

In practice, this means that apps like Google Camera (GCam) or Adobe Lightroom Mobile will be able to harness the full potential of your Xiaomi camera, rather than being limited to β€œsimplified” settings. Without the Camera2 API, for example, you won’t be able to shoot in RAW or use night mode in GCam, even if the hardware of the device allows it.

There’s a nuance, however: Some Xiaomi models artificially limit the Camera2 API’s support level to β€œLEGACY” or β€œLIMITED,” which blocks key features.This is done for stability (especially on budget chipsets), but is often an unnecessary limitation.

How to check support for Camera2 API Xiaomi

Before you try to activate the Camera2 API, make sure your device supports it. There are two reliable ways to do this:

Method 1: Manual Camera Compatibility

  • πŸ“± Download the Google Play Manual Camera Compatibility app.
  • πŸ” Run it and wait for the analysis. In the results, pay attention to the Hardware Support Level bar.
  • βœ… Optimal values: FULL (full support) or LEVEL_3. If so, LEGACY or LIMITED β€” API slashed.

Method 2: ADB command (for advanced users)

Connect your smartphone to your PC, enable USB debugging in the developer settings and execute the command:

adb shell getprop persist.camera.HAL3.enabled

If 1 is API on, 0 is off. Use:

adb shell dumpsys media.camera | grep "hal_version"
What do the Camera2 API support levels mean?
FULL (LEVEL_3) β€” Maximum support for all functions, including RAW and manual settings. LIMITED (LEVEL_2) β€” partial support (for example, no RAW limit-exposure). LEGACY (LEVEL_1) β€” obsolete regime, in fact equivalent to Camera1 API. EXTERNAL β€” Used for external cameras (rarely found on smartphones).

Why Xiaomi is limiting the Camera2 API

The manufacturer often blocks full support for the Camera2 API for several reasons:

  • πŸ”‹ Battery savings: Advanced camera features consume more power.
  • πŸ“± Optimization for weak chipsets: on budget models (e.g. Redmi) 10A or POCO M5) full-fledged API may cause lag.
  • πŸ›‘οΈ Stability MIUI: Some users complain about bugs when using third-party camera apps.
  • πŸ“ˆ Marketing restrictions: on flagships (e.g. Xiaomi) 13T Pro) API Included β€œout of the box” to highlight their benefits.

However, the limitation is easy to get around β€” we’ll talk about it later. It’s important to understand that on some models (especially with MediaTek processors), forcing the Camera2 API to turn on can lead to artifacts in the photo or overheating.

πŸ’‘

Before activating the Camera2 API, back up your data via Settings β†’ About Phone β†’ Backup. This will help restore the system if there are crashes.

How to enable Camera2 API on Xiaomi: step-by-step instructions

There are three main ways to activate the Camera2 API on Xiaomi devices, and we’ll look at them from the simplest to the most complex.

Method 1: Engineering menu (for most models)

  1. Open the Phone app and enter the combination: ##36446337## (the code may not work on newer versions of MIUI).
  2. In the engineering menu, go to Camera (or Hardware Testing β†’ Camera).
  3. Find the Camera2 API and set the Enabled or Full value.
  4. Reset the device.

Method 2: A Universal Method (ADB)

This method works on 90% of Xiaomi devices, but requires PC and USB debugging.

Install ADB-PC drivers

Enable debugging over USB in the developer settings

Connect your smartphone to your PC and confirm your trusted device

Download ADB platform tools (e.g. from Google)

-->

Follow the commands in order:

adb shell


setprop persist.camera.HAL3.enabled 1




setprop persist.vendor.camera.HAL3.enabled 1




exit




adb reboot

Method 3: Edit build.prop (for advanced)

This is a riskier option, as it requires superuser rights (root). Open /system/build.prop file in any root-access file manager and add the following lines:

persist.camera.HAL3.enabled=1


persist.vendor.camera.HAL3.enabled=1

Save the changes and restart the device.

πŸ’‘

If the camera stopped working after activating the Camera2 API, reset the settings through Settings β†’ Apps β†’ Camera β†’ Storage β†’ Clear the data.

Problems After Incorporating Camera2 APIs and Solutions

In some cases, the Camera2 API may fail after activation, and here are the typical problems and ways to fix them:

Problem.Possible causeDecision
Camera's not starting.Stock software conflictClear the camera cache in the application settings
Artifacts in the photo (strips, noise)Incompatibility with the chipsetReverse changes or use GCam with a patch
Overheating during filmingExcessive load on the processorLimit the duration of sessions or disable RAW
Autofocus is not working.Failure in HAL settingsRestart the device or reset the camera settings

If the problems persist, return the original settings:

adb shell setprop persist.camera.HAL3.enabled 0

πŸ’‘

On devices with Qualcomm Snapdragon chipsets (such as the Xiaomi 12 Pro or POCO F5), the Camera2 API is usually more stable than on MediaTek (such as the Redmi Note 11).

Best Apps to Use Camera2 API on Xiaomi

After successfully activating the Camera2 API, you can install one of these applications for extended shooting:

  • πŸ“Έ Google Camera (GCam) is the best choice for the company HDR It requires you to match your model.
  • 🎞️ Open Camera – Open source software with support RAW manually.
  • πŸ–₯️ Footage – for professional video shooting with logarithmic profile.
  • πŸ“Š Manual Camera – a convenient interface for manual photography.

It is important to choose the right version for GCam (for example, for Xiaomi). 11T Pro is suitable for modification from BSG Or Wichaya. Download. APK only from trusted sources such as Celso Azevedo.

Setting up GCam for Xiaomi:

  1. Install APK and open the app.
  2. Import. XML-Configuration for your model (for example, Xiaomi_12_Pro_V3.xml).
  3. In the settings, enable the Camera2 API and RAW+JPEG.
  4. Calibrate the white balance manually for precise colors.
Where to find out. XML-GCam configuration?
Configuration files for specific Xiaomi models can be found on the XDA Developers forums or in telegram channels dedicated to GCam. For example, the Redmi Note 10 Pro popular configuration from the user Shamim with optimized HDR+ settings.

Camera2 API on new Xiaomi models (2023–2026)

In the latest Xiaomi devices (for example, Xiaomi 14, Redmi K70, POCO F6) support for the Camera2 API is implemented better, but there are nuances:

  • πŸ†• Xiaomi 13 Ultra and 14 Ultra API default-on FULL, but some functions (for example, 8K RAW) require manual activation.
  • ⚠️ On the Redmi Note 13 Pro+ MediaTek Dimensity 7200 Ultra may require a patch to keep GCam running.
  • πŸ”„ V MIUI 14/15 Added the option Improved camera mode in settings, which indirectly affects availability API.

For new models, we recommend checking support through Manual Camera Compatibility first, and then resorting to manual activation. If your device is released after 2023, the chances of successfully enabling the Camera2 API without failure are much higher.

πŸ’‘

On devices with HyperOS (the new firmware Xiaomi), the process of activating the Camera2 API may be different.

FAQ: Frequent questions about the Camera2 API on Xiaomi

❓ Can I include? Camera2 API rootless?
Yes, in most cases, there are enough ADB commands (method 2 from the instruction manual). Root is only required to edit build.prop.
❓ Why did the camera start to lay down after activation?
This is typical for budget models with MediaTek Helio or Snapdragon 4xx/6xx processors. Try disabling RAW or using lighter versions of GCam.
❓ How to check if it works Camera2 API GCam?
Open the Google Camera settings, go to About, and see the Camera API bar. Camera2 should be specified.
❓ Will reset before factory settings cancel changes?
Yes, the reset will return the original settings persist.camera.HAL3.enabled. After the reset, you will have to re-activate the API.
❓ Can I include? Camera2 API Xiaomi with a blocked bootloader?
Yes, the methods with ADB and engineering menu work without unlocking the bootloader. Root is not required.

πŸ’‘

If you use custom firmware (like LineageOS or Pixel Experience), the Camera2 API is usually enabled by default with the FULL level.

⚠️ Attention: On devices with MIUI Global Stable after major updates (e.g., with a MIUI 13 on MIUI 14) settings Camera2 API Check his status after the updates!

⚠️ Note: If you have activated Camera2 API, But Google Camera doesn’t support it. RAW or HDR+, The problem may be that a particular version of GCam is incompatible with your chipset!