How To Enable Camera2 API: With/Without Root

Prerequisites

Before getting started, make sure you’ve got the basics covered:

  • Check Compatibility: Make sure your phone is running Android 5.0 (Lollipop) or higher. Older Android versions don’t support Camera2 API.
  • Rooting: Some of these methods require your phone to be rooted.
  • Backup Your Data: It’s always a good idea to back up your data before making any changes, just to be safe.

Using Build.Prop to Enable Camera2 API on Rooted Phones

If your phone is already rooted, you can enable Camera2 API by making a few changes to the build.prop file.

Install a Build.Prop Editor

You’ll need a Build.Prop editor app, which you can easily find on the Play Store. This app will allow you to edit important system files on your phone.

Edit the Build.Prop File

Open the editor and add these lines to the bottom of the persist section:

    • For Android Oreo:
    persist.camera.HAL3.enabled=1
    persist.camera.eis.enable=1
    persist.vendor.camera.HAL3.enabled=1
    • For Android Pie:
    persist.vendor.camera.HAL3.enabled=1
    persist.camera.HAL3.enabled=1
    persist.camera.eis.enable=1

After making these changes, save the file and restart your phone.

Check if It Worked

To check if Camera2 API is enabled, download the Camera2 API Probe app. If you see “LEVEL_3” in green, it means Camera2 API is active.

If the front camera stops working, you might need to replace a file in /vendor/lib. Use the appropriate file for your Android version:

Make sure to set the file permissions to rw-r–r–.

Using Magisk Module to Enable Camera2 API on Rooted Phones

For those using Magisk, you can enable Camera2 API with just a few clicks.

Download and Install the Magisk Module

Download the Camera2 API Magisk Module.

Open Magisk Manager, go to the Modules section, and install the module by selecting Install from Storage. After the installation is done, reboot your phone.

Now, Camera2 API should be enabled, and you can enjoy more control over your camera.

Using TWRP Recovery to Enable Camera2 API on Rooted and Unrooted Phones

If you have TWRP installed, you can use it to enable Camera2 API, whether your phone is rooted or not.

Download the Camera2 API ZIP

Download the Camera2 API Enabler ZIP and save it to your phone.

Boot into TWRP Recovery

To boot into TWRP, turn off your phone. Then, press and hold the Power and Volume Down buttons together until the TWRP logo appears.

Flash the ZIP File

In TWRP, tap Install, find the ZIP file you downloaded, and swipe to flash it. Once it’s done, restart your phone.

Camera2 API should now be active.

Using ADB Commands to Enable Camera2 API on Unrooted Phones

Even if your phone isn’t rooted, you can still enable Camera2 API using ADB commands. This method is a bit more technical but doesn’t require rooting.

Enable Developer Options and USB Debugging

Go to Settings > About Phone and tap Build Number seven times to unlock Developer Options. Then, go to Developer Options and enable USB Debugging.

Install ADB on Your PC

You’ll need ADB Drivers, and you can download Minimal ADB and Fastboot from here.

Run ADB Commands

Connect your phone to your PC with a USB cable. Open the command prompt on your PC and type the following commands:

adb devices
adb shell
setprop persist.camera.HAL3.enabled 1
exit
adb reboot

Once your phone restarts, Camera2 API should be enabled. You can verify this by using the Camera2 API Probe app.

Checking Camera2 API Status

After using any of the methods above, verify that Camera2 API is active by using the Camera2 API Probe app. The app will show if LEVEL_3 is enabled, confirming that Camera2 API is successfully turned on.

And there you have it! With Camera2 API enabled on your phone, you’ll have access to advanced camera settings and apps like Google Camera, allowing you to take higher-quality photos. Start exploring your new camera controls and see how much better your photos can get!

Leave a Reply

Your email address will not be published. Required fields are marked *