The Android support page for the Image Test Suite part of Compatibility Test Suite (CTS) says that Camera HAL3 support with the Camera2 API is strongly advised for certified devices having Android 9 or higher version.
To enable the API, some of them require either root to modify their ‘build.prop’ or just an unlocked bootloader to run vendor-specific Fastboot commands. More recently though, things have begun to change.
Join us on Telegram
Therefore, to know the status of the Camera2 API support on your device, choose one of the following methods.
Using ADB
Before getting started with this method, make sure that you have access to a PC/Mac with ADB and Fastboot installed.
- On your smartphone, turn on USB debugging from Developer options (after enabling the developer options)
- Connect your device to the PC/Mac.
- Open up a Command Prompt or PowerShell (Windows) or a terminal window (macOS or Linux).
- In case the location of the ADB binary isn’t defined in the global PATH settings, do change the working directory of the shell to the location where the ADB binary is located.
- Enter the following command:
adb shell "getprop | grep HAL3"
- If the result is one of the following:
[persist.camera.HAL3.enabled]: [1]
[persist.vendor.camera.HAL3.enabled]: [1]
it means your device has Camera HAL3 with full Camera2 API support.
Using a terminal emulator
You can use any terminal emulator app to check the status of the Camera2 API directly from your phone.
- Download a terminal emulator app of your choice. We have listed a few popular ones below.
- Open the app and enter the following command:
getprop | grep HAL3
- If the result is one of the following:
[persist.camera.HAL3.enabled]: [1]
[persist.vendor.camera.HAL3.enabled]: [1]
, it is showing that your device has Camera HAL3 with full Camera2 API support.
Using a third-party app – Camera2 API Probe
If you want to check in the simplest way, download ‘Camera2 API Probe‘. Once installed, the app will show two or more sections depending on the number of camera lenses your device has (e.g. “Camera ID: 0” represents the rear camera module).
Under each Camera ID, you can find a sub-category of various features and their support details. We are particularly interested in the category named “Hardware Support Level” which shows the Camera2 API support level on the device.
Wrapping up
So, these are the three ways to check your device’s Camera2 API support. We hope you can now instantly check whether Camera2 API is enabled or not on your device using the above-mentioned methods.