How to Enable Camera2 API Support on any Android?

If you want Google Camera on your Android phone, you need the Camera2 API installed. Gcam is a smartphone camera app developed by Google for Pixel smartphones. Its immense popularity has made the Google camera app one of the most downloaded apps on smartphones.

But the thing is, it is quite necessary to enable the camera2 API when downloading the Google camera port for your smartphone. Generally, these ports will improve the overall quality of your camera and render amazing images and videos quickly.

Furthermore, you then find out that your phone doesn’t support those camera APIs after checking the camera API function. In that case, no worries, here you can learn how to enable Camera2 API support on any Android without any problem. Keep reading!

How to Enable Camera2 API Support on any Android?
How to Enable Camera2 API

What is Camera2 API?

In Android, Camera2 API is an Application Programming Interface (API) that gives developers the ability to access certain features of the phone’s camera through the software. This API is available via the device’s instructions. Google introduced it for the first time in Android 5.0 Lollipop, to enhance camera quality by controlling shutter speed (ISO), autofocus, RAW capture, etc.

With this API, smartphone cameras are able to utilize the camera sensor to its full potential and access a number of features. This implies smartphones may be able to utilize technology such as HDR or other similar photography features. In addition to allowing finer control of the sensor, lens, and flash per individual frame, the Camera2 API is also customizable.

Pre-requisites:

  • Root access is generally required for all of the following methods.
  • Enable USB debugging from Developer Settings.
  • The PC/Laptop must have ADB drivers installed
  • Get the right version of TWRP custom recovery for your device.

Different ways to enable Camera2 API:

In some smartphones, such as Realme, you have the option to enable Camera HAL3 in the developer mode. This is used for third-party cameras.

It applies only to Realme phones running Android 11 or higher. However, most smartphones don’t work that way. Alternatively, you can follow up with the following steps:

Enable Camera2 API in Build. Prop

As a first step, you must have a root status on your Android smartphone in order to perform this method. If you want to root your smartphone and it is not rooted, please refer to the below section.

  • You will need a file manager application that can access the root folder of your system. X-plore is used in this example.
  • Navigate to the folder system/build.prop.
  • Tap on Build. Prop and edit.
  • You need to add the script persists. camera.HAL3.enabled = 1  at the very bottom
  • Ensure that the script is active by rebooting or restarting our smartphone.
  • That’s it.

Enable Camera2 API in Terminal Emulator (Root)

You can also use Terminal Emulator to enable Camera2 API. To get started, launch the terminal and type the following commands:

su
su persist.camera.HAL3.enabled 1
exit
exit

If your phone doesn’t work with Open Camera or Camera FV-5, reboot it and try a third-party camera app.

Enable Camera2 API Using Magisk (Root) Module

The advantages of rooting with magisk are numerous. The first is that we can install various modules to make it easier to modify an Android handset.

  • First download Module-Camera2API-Enabeler.zip
  • Using Magisk Manager, install the module.
  • Make sure the module is active on our Android smartphone by rebooting it.
  • Now you are done!

Flashing zip files with TWRP (Root or Non-Root)

  • First download the required Camera2API zip file. 
  • Start the custom recovery by booting the phone into TWRP.
  • Locate the zip file and click on it. 
  • Download and install Camera2API.zip. 
  • For results, reboot the device as usual.

Enable Camera2 API using ADB

For this method to work, you’ll need root access and an unlocked bootloader device – this is how you unlock the Android bootloader.

Firstly, download the ADB and fastboot drivers and install them on your PC. To proceed, download the Android SDK platform tools and the Patched_boot.img file. Put them on your computer and extract them.

RELATED  Download GCAM LEICA Version APK + XML Config File 2023

You can now activate the developer option by going to the settings of your Android smartphone, going to the about section, and tapping seven times on the build number. Make sure the USB debugging option and OEM unlocking options are enabled in the Developer option.

You will now need to connect your Android phone to your PC via a USB cable. Press the shift and right buttons to open the command window in the SDK platform-tools folder on your computer. Enter the following commands sequentially:

  • You can type the phrase ‘adb devices’ and press enter, which will prompt an Android phone to send a notification.
  • For 10 seconds, hold down the volume down and power keys on your device to enter Fastboot mode. Type ‘fastboot devices’ and hit enter to determine whether the device successfully booted into fastboot. A random number will appear.
  • Move the ‘patched_boot.img’ file to the fastboot folder and run ‘fastboot boot patched_boot.img’ in the command window.
  • Make sure your phone is turned on. Install the Magisk Manager app on your phone by downloading the most recent version from its official website. Remember, only ‘Magisk Manager’ needs to be installed.
  • The following commands should be entered simultaneously once the installation has been completed:

adb shell

su

setprop persist.camera.HAL3.enabled 1

setprop persist.camera.eis.enabled 1

  • Lastly, to complete the process of enabling camera2 API, reboot your Android.

There have been too many methods discussed to enable the camera 2 API. Don’t be afraid to try different methods if one doesn’t work. Any one of the methods will work without a problem.

What is the procedure to restore Camera2 API to its previous state?

  • Follow the same steps as when installing Camera2API.
  • Change the command to setprop persist. camera.HAL3.enable 1 to setprop persist. camera.HAL3.enable 0 to turn off Camera2API.
  • The command exit must be typed and then pressed enter.
  • Lastly, press Enter after typing adb reboot to get the phone back to normal.
  • Now you are done!

How to enable Camera2 API without root Samsung?

Go to Settings > About Phone > Tap on the “build number” seven times > Select Developer Options > Enable USB Debugging and you’re done. Once you’ve done that, you can edit the build in the next step. Enable camera2 API without root access by editing the prop file.

RELATED  Download LMC 8.4 R15 Scan 3D APK (For Android) 2024

Wrapping up!

Overall, Camera2api requires the phone to have an Unlocked Bootloader status in order to function. Moreover, rooted smartphones with TWRP installed are best for enabling Camera2api! Activating camera2api may result in problems with the default camera on some smartphones, which will require a flash file via Magisk or TWRP module to fix. But we hope this article helped you learn different methods to activate the Camera2 API. If you still have any doubts, let us know in the comment section below.

One Request?

I worked hard on this post to help the users. It would help me a lot if you consider sharing it on social media networks. Because Sharing Is Caring.. ♥️

Sharing Is Caring...

I am Shraboni Dey Dutta. I am a blogger and photography lover. I have used smartphones many years. So in this blog we will provide Google Camera for all smartphones.

1 thought on “How to Enable Camera2 API Support on any Android?”

  1. Ich entschuldige mich aufrichtig für diesen Kommentar! Aber ich teste einige Software zum Ruhm unseres Landes und ihr positives Ergebnis wird dazu beitragen, die Beziehungen Deutschlands im globalen Internet zu stärken. Ich möchte mich noch einmal aufrichtig entschuldigen und liebe Grüße 🙂

    Reply

Leave a Comment