Google Camera pink tint fix for Omnivision sensors(MIDO)

DiogoSilva48

Senior Member
Feb 19, 2016
808
236
0
Oporto
Pixel Experience ROM 06/02/2018 build fixes OmniVision pink tint and crash in brightlight.

It still uses the old libs but at least it’s much more stable now.
Are you going to release another version of your modded Google camera for omnivision ? It was the one that was working better for me.
 

Element24

Senior Member
Nov 25, 2015
277
108
0
A few days ago I was browsing reddit r/Xiaomi section and commented on this thread: https://www.reddit.com/r/Xiaomi/comments/77p2va/i_have_a_note_4x_with_an_omnivision_sensor/dot4b9e/ about the pink tint issue that we are experiencing on Omnivision sensors. To make it short, a redditor (GeorgeKiarie) asked to post samples of the pink tint issue.

I was providing him samples of photos with pink tint and basically running some tests for him. Right off the bat when he saw the photo with pink tint, he came to a conclusion that the black levels in the camera libraries are incorrect. According to GeorgeKiarie, the default black levels was 16 16 on the Omnivision camera libs which is incorrect as it should have been 64 16.

The fix: GeorgeKiarie has modified libmmcamera_ov13855_qtech.so and change the black levels from 16 16 to 64 16.

Requirements:
- TWRP Recovery
- Root(to enable camera2 api obviously)
- Camera2 API
- GCAM version 4.0(attached)

Disclaimer: I have not done extensive testing on this fix. I have only tested this on my device (16/3gb RAM variant) so I cannot guarantee that this will also work for you. I am not responsible for any kind of damage (if any) that it may cause once you've flashed the fix but I will provide a flashable zip to revert back to default just in case. As usual, flash at your on risk.

I've also NOT tested the fix on other GCAM versions besides the one I've attached and the latest GCAM 5.1 but in theory, it should work on all GCAM ports for mido. Take note that most of my tests were done with gcam 4.0. I've also tested it on gcam 5.1 and it seems to work fine but I've only took a few shots with it.

Steps:
1. Download the attachment "Pink Tint Fix.zip"
2. Reboot to recovery and flash zip.
3. Download and install Gcam 4.0 from here: https://drive.google.com/open?id=0B6OCKwxBBePEQmowWm5mRUR3Tk0
4. Enable HDR+ and enjoy good quality low light photos

Bugs:
- Camera crashes after taking photos in good lighting conditions but only when HDR+ is enabled.
- Random camera crashes even in low light conditions
- Camera stuck in "processing" when taking a photo under good lighting conditions
- Shutter button is greyed out and/or not responding when taking a photo under good lighting conditions
- All other bugs present in Google Cam 4.0 port.

All the above mentioned bugs only happens when HDR+ is enabled. It seems that HDR+ does not work when enabled under good lighting conditions. Please do not ask me to fix it as I am no developer. I only helped in testing. Hopefully someone smarter than me can fix these bugs. Please feel free to post fixes If you've found one and I'd include it in the OP.

All credits go to redditor GeorgeKiarie. I only helped in testing the fix and creating a flashable zip. If you wanna thank him, just visit the reddit link above and message him or something.

PS: As mentioned above, I am not a developer so all these has been written the way I've understood the issue and how it was fixed, I'm just relaying the information provided to me. Please feel free to correct me if you see something wrong and I'd gladly edit my post.
Can someone make magisk module of this fix? For some reason arnova's gcam v6 beta 3 does not have the fix included, but v5 has it...
 

hon2838

Senior Member
Oct 26, 2014
134
43
48

Termintor

Member
Dec 19, 2016
39
3
0
Hello,

Thank you for job.

Photosphere and Panorama work with this string in your build.prop: camera.hal1.packagelist=com.google.android.GCMod5,com.google.android.GoogleCamera,com.skype.raider
Maximum three packages in the string.
Which patched camera driver do you recommend?

P.S. Portrait Mode doesn't work on front camera with "Flash On".
sorry to bother you, mate, is the string you mentioned is for omnivision sensor on any version gcam? I am using omni version without photosphere and panaroma and i love them very much, I want to know if your string will work on my device, thank you.
 

Termintor

Member
Dec 19, 2016
39
3
0
LineageOS 14.1 Mido 20170626 UNOFFICIAL
Link:androidfilehost.com/?fid=961840155545577636
HDR+ - Working
Panorama - Working!
Photo sphere - Working!!

But after I upgrade to lineage-14.1-20171207-nightly-mido
HDR+ - Working
Panorama - Blank viewfinder
Photo sphere - Blank viewfinder

So I tried some previous LineageOS builds and found that builds which are after 20170626 will have a blank viewfinder.
But Panorama ,stock HDR and Photo sphere function properly on those builds before 20170626.
I also tried other modded camera apps, same as above.

May be there is a bug hiding in rom itself??
Sorry for my poor English.:):)
Hi, I just searched to get your post, I can't use photo sphere either and my sensor is omni. I want to know whether there is any method to enable photosphere on my device on treble Los15.1?
 

HitFan

Senior Member
Aug 5, 2013
515
104
0
Bytom
Hello! I am using xiaomi.eu stable MIUI 9.5 based on Android 7.0. I have OV sensor. I've heard that there's already fix for pink tint and bright light FC, but I can't find it. In OP there's only fix for pink tint but still crashes on bright light. Can somebody share it? And is there fix to have panorama / spheric working on Mido OV?
 

MrFoxNos

Member
Jun 16, 2015
27
3
0
I've been looking for a solution on how to stop the gcamera to stop crashing under good lighting conditions for a long time now. The only fix I found was the Luis version of the gcam but I find the quality of the pictures very bad and blurry. Could someone tell me if there's a fix yet and if so, what are the steps I have to follow? Thanks in advance.
 
Last edited:

goodybags

Senior Member
Jul 12, 2014
202
25
48
I've been looking for a solution on how to stop the gcamera to stop crashing under good lighting conditions for a long time now. The only fix I found was the Luis version of the gcam but I find the quality of the pictures very bad and blurry. Could someone tell me if there's a fix yet and if so, what are the steps I have to follow? Thanks in advance.
The newer versions (5.1, 5.2) always have a time where it crashes in bright light for me. Only the older GCam version (3.2 i think) doesnt crash but it doesnt have portrait mode or ZSL, as well as slightly worse dynamic range but it is really stable
 

coolpixs4

Senior Member
Mar 7, 2011
520
139
73
Originally Posted by dekarsun
Hello,

Thank you for job.

Photosphere and Panorama work with this string in your build.prop: camera.hal1.packagelist=com.google.android.GCMod5, com.google.android.GoogleCamera,com.skype.raider
Maximum three packages in the string.
Which patched camera driver do you recommend?

P.S. Portrait Mode doesn't work on front camera with "Flash On".

sorry to bother you, mate, is the string you mentioned is for omnivision sensor on any version gcam? I am using omni version without photosphere and panaroma and i love them very much, I want to know if your string will work on my device, thank you.
same question,
my camera is ov sensor, and I also cannot use photo sphere and panorama mode on gcam, it was fc after calibarte
 

coolpixs4

Senior Member
Mar 7, 2011
520
139
73
sorry to bother you, mate, is the string you mentioned is for omnivision sensor on any version gcam? I am using omni version without photosphere and panaroma and i love them very much, I want to know if your string will work on my device, thank you.
Edit build.prop - add line: camera.hal1.packagelist="you package name app" ,PS/panorama/blur, working for me on OV
it doesn't work on my phone
MIUI 9 developer v8.2.1, with omnivision sensor
photo sphere and panorama mode force close application
 

markoscekic

Member
May 24, 2018
32
3
0
Why is this thread died off, anyway did someone find a solution for google camera 6.1 on our mido with omnivision sensor 'cuz everybody who tried to open it gets FC
 

AboodaBasher

Member
Jun 10, 2017
49
21
0
please, any one can provide me with working link for the fix
as its broken
my back cam have the bank tint
front is perfect
using urikill version which is made for mido