What Is Camera2 API And How To Enable It

What Is Camera2 API And How To Enable It

Camera2 API was introduced to Android Lollipop in 2015, a majority of phone manufacturers in 2017 have still not implemented the Camera2 API in their cellphones. Only a handful of premium devices have full Camera2 API support, despite the fact that Google has deprecated the legacy Camera API and urged developers to implement Camera2 since its release. It seems like manufacturers are using the features of Camera2 API.

what is an API? 

API stands for “Application programming interface“. An operating system uses APIs to give (third party) developers tools and access to certain parts of the system to use them for their application. 
In general terms, it is a set of clearly defined methods of communication between various software components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer.

What is Camera2 API?

Camera 2 API was introduced by Google with the Android Version 5. Before Camera 2 API, Up to version 4.4 (KitKat) of Android, the standard API to access the camera functions of any device was very limited. Camera app could just be used to preview and capture images and take a video. With Camera 2 API, Google gives camera developers options to do more with the camera. Control the shutter speed(ISO), focus, RAW capture etc. This helps third-party developers to include more features in their applications with the tools they are given through the API.

Different levels of Camera2 API

Implementation takes place in four different stages. Legacy, where features of Camera 1 API are only available, Limited, means some basic features of API 2 are made available, Full, where all the basic features of Camera 2 API are available to explore, Level 3, the premium version where some extra features like RAW capture etc. are included in the API. So, if you want to use advanced third-party apps for capturing and recording videos, you will have to at least have a device that has Full Camera 2 API support.

Depending on the level of implementation, you can use those features in an advanced image capturing apps – or not. An app like Filmic Pro can only be installed if the Camera2 support level is at least ‚Full‘ – otherwise, you can only install the less feature-packed Filmic Plus. Lumio Cam, on the other hand, can be installed on most devices but you can only activate the pro mode with manual exposure and focus if the support level is at least ‚Full‘ again. So if you’re interested in using advanced third-party apps for capturing photos or recording video with manual exposure controls etc. you want to have a device that at least has ‚Full‘ Camera2 API support.

What is RAW Format and Why Camera2 API?

RAW format will capture photos in completely lossless glory, meaning zero image compression (but much larger file sizes). These RAW images are much better for manipulating in image software – because just like the filetype name implies, they are completely RAW image data. If you compare a JPEG to a straight out of camera RAW photo side-by-side, the JPEG may appear to have brighter colors or other visual enhancements – this is because JPEGs are post-processed by the camera software and built into the image data.

How to check Camera 2 API support status for your smartphone

  1. All you need to do is download a simple app called Camera2 API probe from the Play Store. Download and install this app on your Android smartphone.
  2. Open the app, it will give you the details about your front and rear camera modules.
  3. It will show two sections: Camera ID: 0 and Camera ID: 1. The first one represents the rear camera and the second one represents the selfie camera.
Camera2 api Support ckeck

You can see all the information about your smartphone camera in this app. Now use the following keys to check if your device supports Camera 2 API or not.

Level-3: The manufacturer of the device has added some additional features to the camera hardware including YUV reprocessing, RAW image capture, and more.
Full: The smartphone fully supports all major capabilities of the Camera2 API.
Limited: The phone supports only some of the features of Camera2 API.
Legacy: Your phone only supports the Camera1 API features. So, no support for Camera2 API.

How To Enable Camera2 API?

Using Buld.prop file

  • Install ES File Explorer File Manager from Play Store.
  • Open the application and hit Menu, then tap “Settings”, this will bring you to the apps Settings Menu. Once in the Settings Menu, scroll all the way down to Root Settings. In Root Settings, “check” Root Explorer and Mount File System.
  • Once that is done, go back to the main part of the app that shows all the folders. 
  • Go to Device’s Internal Storage. And then navigate to System, there you will find build.prop file. Be aware that there is also a file named build.prop.bak, don’t touch that file.
  • In build.prop file, search for “persist.camera.HAL3.enabled=0” and Change its value from 0 to 1. “persist.camera.HAL3.enabled=1“.
  • Save and reboot the device.
  • That’s all You are all done!

Enable Camera2 API in Terminal Emulator

1. An alternative method to the above is to try and enable Camera2 API through Terminal Emulator. Simply launch the terminal and type the following commands: 

persist.camera.HAL3.enabled 1

2. Now reboot your phone to apply changes.   Now you can install apps which support manual controls like exposure ,focus etc. some are given below:



Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.