• XDA Forums have been migrated to XenForo. To discuss, report bugs and other issues, use this thread.

[HOW TO] Enable Camera2API and install GCam

santiagog242

New member
Sep 10, 2017
46
26
0
Hello everyone

UPDATE!!!

Now you can skip all the tutorial, and just install the magisk module:
"GCam enable for XiaomiMi8Lite", then you install the GCam.

Thanks to @ncandroid84

But if you want to do all the process manually:

I'm doing this post because no one knows how to do this and I have the solution so I want to share it with you.

First of all, I assume you are an advanced user and have rooted your device with the guides of xda forums, so don't ask about it, please.

Also I've seen that many people done magisk modules, scripts and blabla, but also many people said that those methods don't work, so this is the manual method.

So let's do this.

1. Install a build prop editor (search in play store) and add the following lines in "persist" part:


For Oreo:

persist.camera.HAL3.enabled=1
persist.camera.eis.enable=1
persist.vendor.camera.HAL3.enabled=1

For Pie:
For Pie you need the following settings in order to enable Camera2API correctly:

persist.vendor.camera.HAL3.enabled=1
persist.camera.HAL3.enabled=1
persist.camera.eis.enable=1

Now save and restart your device. Check with the app "Camera2 probe". You should see at hardware support level "LEVEL_3" checked and with green text.

If you see this, now you have Camera2 API enabled.

But... Front camera doesn't work anymore, with any app, so you have to replace a file.

2. Install a file manager with root that let you modify file permissions and access your root folder.

You should download the next file:

Oreo:
https://drive.google.com/file/d/1w2Qw34Pmy0dLmlXRYRSm8JyKgEb2mZ6u/view

Pie:
https://drive.google.com/file/d/1u7AREkr6_QKKdSZw2s_5itYk0xkKYTm2/view

-Copy the file.

-Now, go to to /vendor/lib and paste it. Replace the existing file.

-Now set the following permissions in the new file you pasted:


Owner: Read and write.
Group: Read.
Other: Read.

Or rw- r-- r-- for advanced users

Save and restart.


Now you see that front camera works fine with many apps except stock camera. This is when you install the gcam.

I'm using now the Arnova's Advanced 1.4 version downloadable at Celso Acevedo's page. (Google it).

Also, 4k recording doesn't work but you can use stock camera for this.

That's all and I hope I've helped you.
 
Last edited:

ugurmutlu21

New member
Apr 17, 2019
5
0
0
You need to download the libmmcamera_platina_imx576_sunny.so file posted above. Once you overwrite it, change the permissions and it should work.
Remember, after this fix the front camera won't work with the stock camera app, but it will work on all other apps, including gcam
yeah, I did, but no, it's not working.
 

aggelos1661

New member
Dec 27, 2015
16
0
0
Hello I have enable camera2api and installed gcam but my front camera doesn't work
my file explorer doesn't let me to paste and replace the fix file into root /vendor/lib i try to do it with other file explorer but i have the same problem.
 

GuGor

New member
Feb 20, 2019
49
19
0
Sometimes Gcam stops taking photos and i need to reboot the phone. It is normal? Any fix? I use latest Pixel Experience rom.
Do you have the same problem using Gcam in Miui?
 

J0K3RAS

New member
Mar 24, 2019
4
3
0
Sometimes Gcam stops taking photos and i need to reboot the phone. It is normal? Any fix? I use latest Pixel Experience rom.
Do you have the same problem using Gcam in Miui?
I am on pixel experience too. I have noticed that the camera doesnt take pictures not only on gcam, but on every app that uses the camera. I have tried both caf and aosp versions of PE and i had this issue
 

lapist

New member
Nov 21, 2009
263
105
0
How much better is quality of the photos from GCam over stock MIUI camera on this phone? Is it worth doing and loosing front camera in stock app (and have it just as 6 Mpx in other apps) over using just stock camera?
 
Our Apps
Get our official app! (coming soon)
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone