[HOW TO] Enable Camera2API and install GCam

JoacoO1905

New member
Oct 6, 2018
1
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
Wich apk use to change the permissions?
 

Oshmar

Senior Member
Aug 19, 2016
539
198
0
Rio de Janeiro
Hello everyone

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:



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.
I do all the described procedure, but does not enable the api in level 3, just in legacy, any suggestions?
 

santiagog242

Member
Sep 10, 2017
46
26
0
Gcam now fixed front cam resolution, until lib switching it shows 24mpx. After lib is changwd it goes back to showing 6mpx any chance you can fix that?
Nope! It is the real resolution of the sensor, the thing is, the imx576 is a quad Bayer sensor, and the interpolation results in a 6.2 MP image. That's all. Something similar that happens with the 48 MP sensor of the redmi note 7.
 

virtualself

Member
Mar 11, 2018
9
2
0
Has anyone tried the manual process without root?

I've edited the build.prop with adb in TWRP and now camera2 is enabled, but I can't fix the front camera with the 'lib.so'

TWRP
Mount /system /vendor
Code:
adb push 'lib path' /vendor/lib/
adb shell
#chmod 644 /vendor/lib/'lib name.so'
#exit
Am I doing something wrong?
 

TrueMS

Senior Member
Nov 17, 2013
735
120
73
Honestly, I did not see that difference, so, no, definitely not worth it.
Google camera has real and more accurate colours and has much better night mode, however talking about pictures in pure daylight - sometimes I cant see any difference. Speaking of front camera, MIUI is better.
 

Julio Cost4

New member
Nov 20, 2019
1
0
0
Boa noite. Atualizei meu mi 8 lite . Miui 11 . Não estou conseguindo habilitar API 2. E não sei editar abrir o arquivo pra colar esses . Podem fazer um vídeo ?