[MOD] Enable Camera2Api in Mi4C

mjoach

Senior Member
Dec 9, 2012
464
164
63
Kyoto
Stock camera unable to use front cam. WhatsApp unable to use video call using front cam. I'm on latest LOS 14.1.
Careful how many exceptions you put in build.prop for HAL1, if there are more than 91 or so characters, the whole value gets ignored. That said, Messenger crashes for me when accessing camera even when in exceptions.
 
Jun 11, 2017
5
0
0
Thank you so much for responding. I have been waiting for this in a long time. Everyone was also having a problem with flipped camera when activating camera2 api without any fix and I had lost hope but I'm glad I stumbled upon this thread
 
Jun 11, 2017
5
0
0
Installed a bunch of versions from different devs of gcam port. Most of them are showing black screens and others are having green tint about 1/4 of the photo. Can't seem to find one that is working. I wanna have a working portrait mode and HDR+ even if its only on the back camera :(
 

savvas_p25

Member
Dec 27, 2014
46
11
0
kavala
Installed a bunch of versions from different devs of gcam port. Most of them are showing black screens and others are having green tint about 1/4 of the photo. Can't seem to find one that is working. I wanna have a working portrait mode and HDR+ even if its only on the back camera :(
https://www.celsoazevedo.com/files/android/google-camera/f/MGC_3.2.045_MiMAX2.apk
https://www.celsoazevedo.com/files/android/google-camera/f/MGC_5.1.018_v2e_tolyan009_v1.4.apk
 
Jun 11, 2017
5
0
0

savvas_p25

Member
Dec 27, 2014
46
11
0
kavala
Both shows black screen only. And also if I switch from photo to video and then photo again, it's stock on camera logo at the center. Stock camera and other camera apps seem to work well, except gcam port. BTW, thanks for taking the time answerkng my questions :)
Download camera2api probe and check if camera2api is working.
 

qtotter

Senior Member
Mar 13, 2006
698
66
48
Tokyo
Face Unlock does not work. The same in Instagram, can not start the front camera.
I use Facebook messenger, Face Unlock and Skype, so I added the following line at the end of /system/build.prop:

Code:
camera.hal1.packagelist=com.android.facelock,com.facebook.orca,com.skype.raider
Everything works fine. Check the package name of Instagram, and modify the line above according to your needs. This line needs to be less than/equal to 127 chars. Thx.

qt
 
  • Like
Reactions: Arman Yuzbashyan

qtotter

Senior Member
Mar 13, 2006
698
66
48
Tokyo
Which ROM though? Messenger and Hangouts wouldn't work for me despite the above.
i use the official LineageOS 14.1. My "camera.hal1.packagelist=" setting is only for Facebook messenger, Face Unlock and Skype. You need to add package names for Messenger and Hangouts yourself. The line cannot exceed 127 chars as I mentioned.
 
Our Apps
Get our official app!
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