yashsingh1/xdaforums huggingface dataset:
[One (M8) Q&A, Help & Troubleshooting] Beukhof1:
No one :(
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Anybody with a green tinted OV4688 camera - this is how to fix it:

ROOT + S-OFF needed (some even have permission problems with this setup, if that's the case try custom kernel like Elementalx, setting superCID or installing busybox)

1. Grab the below awb cal file from M8:

https://www.dropbox.com/s/is96whezfpj5jz4/awb_cal

2. In ES file explorer enable root browsing, then set permissions of /sys folder and /sys/android_camera_awb_cal/awb_cal file to write

3. Replace the file (OVERWRITE, not delete and then paste) , force stop camera, clear data, cache and done!

Important: whenever you reboot this has to done as the file gets then overwritten by the kernel at boot

*UPDATE* There's a permanent fix available overcoming the reboot overwrite, you can find it later in this thread
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Sample shots before and after
[One (M7) Q&A, Help & Troubleshooting] b99721:
You get green tint only when using flash or at all times? I am seeing the green tint only with flash, and in certain light conditions - and the tint is not everywhere it seems but in certain parts of the pic (will upload comparisons soon). But replacing the calib file with the one you shared fixes it completely!

Plus the camera replacement is off center - from the back glass I can see the lens and even the flash module off towards the left side by about 1-2cm though it doesn't seem to impede clicking pics in anyway (just annoying to see it that ways).
[One (M7) Q&A, Help & Troubleshooting] tgeza:
I used to get it often, in sunlight, low light, cloudy days. Didn't try with flash as i dont use it much. Also had those tints in parts of the photo, so i think i know what you mean. Still there now sometimes but it's negligable.

My camera is also slightly misplaced, I dont care though as the shots are fine.

Glad it helped btw!
[One (M7) Q&A, Help & Troubleshooting] b99721:
Seems with original calib file, images without flash are awesome (like they should be, especially in low light - outdoor the images appear over exposed), but with flash there is a green hue.

And with the downloaded calib file, images without flash in low light are grainy woth lot of noise and poor quality, but with flash they surpaas the quality of images shot with the original calib file.

So maybe I need to choose when to use flash (and thus replace calib file) and when not to - though I prefer not to use flash :)

With original calib file, with flash

With downloaded calib file, with flash

With original calib file, without flash (img 1)

With downloaded calib file, without flash (img 1)

With original calib file, without flash (img 2)

With downloaded calib file, without flash (img 2)
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Whoa with the M8 awb I do get similar, though yellow tinted flash pics like you do with your *original* awb :) It seems ov4688s are not created equal and need their own calibration?

If you don't have overall green tints then in your case I'd just stick with the original awb!
[One (M7) Q&A, Help & Troubleshooting] Nightf0x_007:
i cant either backup my cal file or replace it with the new one .... my system is r/w
[One (M7) Q&A, Help & Troubleshooting] tgeza:
You have to set permissions of /sys/ and the file awb_cal to write in ES
[One (M7) Q&A, Help & Troubleshooting] Nightf0x_007:
yes i did
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Hmm do you have root browsing enabled?

Otherwise check out a post from a guy on page 451 of the below with more detailed instructions:

http://xdaforums.com/showthread.php?p=52615200
[One (M7) Q&A, Help & Troubleshooting] Nightf0x_007:
yes im rooted using viperone
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Root browsing you need to separately enable in ES explorer, even if you're rooted. Otherwise im out of ideas
[One (M7) Q&A, Help & Troubleshooting] Nightf0x_007:
yes i enabled it , but dont know why its doing this
[One (M7) Q&A, Help & Troubleshooting] sloaxleak:
Hello, I've a question. This is functional to purple-tint issue also? thanks.
[One (M7) Q&A, Help & Troubleshooting] ericiidx:
No. The purple tint issue is a result of heat soak; the original camera sensor used in M7 production between roughly Feb - Sept '13 was either improperly insulated or susceptible to overheating, or both. It's purely a hardware issue that cannot be properly fixed through software (outside of forcing ISO 100 in all of your shots, which severely limits any advertised low light performance, and still likely doesn't fix the problem entirely.) If you have a valid warranty, the repair is free via HTC. Otherwise, HTC charges $90 for the part and service.
[One (M7) Q&A, Help & Troubleshooting] b99721:
I upgraded to sense 6 without backin up my original awb calib file and now I hv grainy pics in low light. Tried restoring nandroid to get back the sense 5.5 file but that didnt work. Can you (or someone else here) please upload the original awb calib file from sense 5.5 rom for the OV4688 sensor. Need it badly.
[One (M7) Q&A, Help & Troubleshooting] tgeza:
They must have added the one from the M8.

This is mine from 5.5, although i guess you'll get a lot of tint:

https://www.dropbox.com/s/iqauqzl0l5llyhw/awb_cal55

In low light I also get a lot of grain btw, to remove it just switch to night mode
[One (M7) Q&A, Help & Troubleshooting] gustav30:
After getting the official Sense 6 build over the weekend, and I have the Omni ov sensor, I feel like green tint is worse, even in daylight now. Anyone experience the same? Just taking pics of trees, grass, green seems over abundant than on 5.5. Thoughts?
[One (M7) Q&A, Help & Troubleshooting] tgeza:
I didn't get Sense 6 yet but I had the daytime green tint in 5.5 - the M8 awb solved it though. Did you try that already?
[One (M7) Q&A, Help & Troubleshooting] gustav30:
Thanks.

Gonna give it a shot today. I've set write permissions on the sys folder and the file, but no luck copying yet. First I want to make a backup of my existing file. Can you post a screenshot of the permissions you've set on the folder and file?
[One (M7) Q&A, Help & Troubleshooting] tgeza:
See below attached.

No need for backup as the kernel will flash the one coming from the ROM automatically at reboot!
[One (M7) Q&A, Help & Troubleshooting] gustav30:
Weird. No matter how I try to set permissions on the /sys folder, and the awb_cal file, I can't copy it or paste over it. I've tried via ES Explorer and Root explorer. No luck. I've set full permissions on the /sys folder, the android_camera_awb_cal folder as well. No luck.

I can copy and paste to my heart's content in other folders like /system/app etc; but just not the /sys/ folder itself.

I did have luck when I was back on Sense 5.5.

Weird that i can set permissions on the folders and files but can't copy/paste.
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Is root browsing enabled in ES? Others also had this before, no idea why. Check also if superSU is working fine
[One (M7) Q&A, Help & Troubleshooting] gustav30:
Yeah, Root browsing enabled and superSU looks fine. No problem copying in other areas. Strange.

Just frustrating that HTC can't get this right for us when have the same OV sensor as M8 users. All I can do I guess is lower saturation a bit.
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Hmm is the camera app stopped? If so then as last try check in superSU if ES file explorer has 'Grant' permission.

My suspicion btw is that they have a mess with handling different builds across regions - some come with right awb, others not (mine is xx.401.x for example)

Edit: S-Off may also be needed (mine is that + using Elementalx kernel)
[One (M7) Q&A, Help & Troubleshooting] gustav30:
I think at least right now I may have over-reacted to green tint in Sense 6 being worse.....I think its a combination of new software on new phone AND it just being Spring out finally outside. There is so much green out now as opposed to 2 or 3 weeks ago that taking photos outside, green tends to dominate landscape scenes now. I think that was part of the issue. I just went for a walk around the block taking some quick pics to see things were. (these were litterly point and shoot and not meant to capture any photographic scene).

We on XDA or me can be a bit overly sensitive from time to time. Ironically indoor pics in decent light (not attached) show no green tint. However, when lighting gets bad inside it does still show up.

Couple of pics attached of outside.
[One (M7) Q&A, Help & Troubleshooting] mattey94:
I have exactly the same problem, and i'm on sense 5.5. I understand that on sense 6 you can overwrite file without any problems?

Do you guys have any ideas what's wrong. I did everything. SuperSU works good (i have the newewst version), root is done... I don't understand why. Do you think that changing rom will help?
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Do you have S-OFF? I think that is also needed - I woudn't have thought (mine is that and rooted by default, i didnt test with S-ON and root)
[One (M7) Q&A, Help & Troubleshooting] Ba7rani:
you may need to change room :p, "double o"

Take a look here : )

http://xdaforums.com/showpost.php?p=52725950&postcount=78011
[One (M7) Q&A, Help & Troubleshooting] rainero84:
My M7 camera used to be fine when used during the day, but had the purple tint issue in low light conditions. I managed to get it exchanged for a new One, which was fine in low light conditions, but horrible during the day if it is slightly cloudy (green tint issue). The M8 awb_cal fixed this. Thanks! :victory:
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Hehe nice to hear
[One (M7) Q&A, Help & Troubleshooting] j1po:
is it possible to copy m8 awb_cal file using script and place it in init.d folder ??

just my taught
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Im sure, that would be very useful. Im not a dev though
[One (M7) Q&A, Help & Troubleshooting] gustav30:
Finally got the m8 awb_cal file to copy over today. Think it was because I'm using the latest Elemental kernel. So much better in low light. Green virtually gone.

Has anyone successfully copied the file over on stock kernel?
[One (M7) Q&A, Help & Troubleshooting] tgeza:
For me it always worked on stock, be it GPE or Sense - are you S-OFF?
[One (M7) Q&A, Help & Troubleshooting] gustav30:
Yeah, have always been s-off. Only thing in the past to, is being on complete but stock rooted rom.
[One (M7) Q&A, Help & Troubleshooting] mattey94:
Is there any way to change the file without s-off? Any special ROM's or something? I tried everything to make S-OFF. EVERYTHING. Every one of way, on xda, and other sites, was ended with failure, and tried every1 on both Windows and Linux. I even tried to change the file through some recovery explorer, but only1 and i still have green tint. Any ideas?

My HTC:

**** TAMPERED ****

**** UNLOCKED ****

M7_UL PVT SHIP S-ON RH

Hboot-1.56.0000

OS-4.19.401.11
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Hmm strange, maybe then because you were on a special US carrier variant build, with /system edit disabled kernel. Either way it works now at least :)
[One (M7) Q&A, Help & Troubleshooting] tgeza:
The thing is that i was rooted and S-OFF when replacing the awb, so i couldnt test with root+S-ON. Maybe try flashing a custom kernel like elementalx and then replace.

Otherwise for S-OFF check your hboot version - many procedures dont work with the latest version (im guessing you have one which came with the sense 6 OTA, 1.58 maybe)
[One (M7) Q&A, Help & Troubleshooting] karibe66:
No way to succed....

Hey, It is almost a week a try to patch awb cal file to fix green tint of sensor OV4688 in my Htc one.

I'm S Off root phone Viper 6.2 firmware.

I tryed so many times with root explorer or Es explorer ( superuser granted...) but no way to have permission to overwrite file awb_cal

I can do anything in directory System but when I try with directory sys no way....

I changed permissione rights but nothing to do.

Then I tryed to change kernel ( I read someone succed changing kernel) but Elementalx kernel don't solve my problem; Android Revolution rom don't work too for me.

I don't know what try again.... my sensor makes terrible green photo, (ov4688) it was changed by Htc assistance because the sensor installed before made pink photo.

Now my situation is worse than before....

Any suggestion will be appreciate..

Thank you and sorry for my poor English...
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Sorry to hear, no idea why people have different result with the same setup. Maybe try changing you CID to superCID, 11111111. I think root+S-OFF+custom kernel is the fartherst you can go.

Alternarively a dev could be asked to somehow modify init.d to replace the awb file everytime at startup
[One (M7) Q&A, Help & Troubleshooting] MaRcIuPT:
I'm on stock kernel rooted and couldn't overwrite the file but after Install busybox and rebooted I can replace the file but only with es explorer.
[One (M7) Q&A, Help & Troubleshooting] karibe66:
Thanks a lot Tgeza!!!

Changing to Supercid allow me to replace awb_cal file!!

Photos are really better, not perfect but really better.

(no luck with busybox I had already installed)

Bye
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Hehe great!:thumbup:
[One (M7) Q&A, Help & Troubleshooting] gustav30:
Interesting on CID. I would never have thought of that.

Good to know for future.
[One (M7) Q&A, Help & Troubleshooting] deeevan:
Thanks! Attached is my init.d script that copies it over on boot.

1. In the last line, change the location of the M8 awb_cal file from /system/etc/awb_cal to wherever you put it

2. Remove the .txt extension from the filename and place it in the /system/etc/init.d folder

Optional steps

3. Script permissions should be rwxr-xr-x. In ARHD, this is automatically done on boot

4. I didn't need to set permissions on /sys, but remove the # at the front of the third last line if you need to

Things to note:

- I am running S-OFF, ARHD 71.1 and ElementalX, which means I have busybox installed and who knows what else write permissions

- The script just automates the manual steps and performs it at boot. If the manual steps aren't working for you, I don't know if this script will help

- I'm utterly confused why going SuperCID would solve the permission problem, but OK
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Awesome, thanks!
[One (M7) Q&A, Help & Troubleshooting] ondris:
Would it be possbile to implement this fix directly into a rom ?
[One (M7) Q&A, Help & Troubleshooting] deeevan:
It could be. But this doesn't seem to be a universal problem, and I'm not sure what the update auto white balance file (I assume this is what awb stands for) would do on unaffected cameras? Overcompensate and cause a red tint?
[One (M7) Q&A, Help & Troubleshooting] ondris:
Saying i would like to modify a custom rom (or even official one) before flashing it, what is the way to include the fixed awb file ?
[One (M7) Q&A, Help & Troubleshooting] deeevan:
That's beyond me. I looked on the phone and ROM zip and couldn't figure out where the awb file was coming from. All I found was some Google code from froyo online. I suspect you'd need to go into ROM/kernel source code to figure it out, then compile your own.
[One (M7) Q&A, Help & Troubleshooting] tgeza:
The original awb is coming from the kernel itself - that would need to be modified somehow for the rom one currently uses. No idea how to do that though!
[One (M7) Q&A, Help & Troubleshooting] cobrax2:
i cant replace it no matter what i do. it says always task failed". soff supercid root

any suggestions?

tried even the boot script, still doesnt work. elemental kernel
[One (M7) Q&A, Help & Troubleshooting] gustav30:
Do you have busy box installed? Are you using es file explorer? That was the only app that replaced it for me.
[One (M7) Q&A, Help & Troubleshooting] cobrax2:
yes :(
[One (M7) Q&A, Help & Troubleshooting] deeevan:
What's the actual error message say? For example, if the file is r--r----- (read only) the copy task fails with 'Permission denied'. It's the last line in the error dialog box in ES, just above the Cancel and Retry buttons
[One (M7) Q&A, Help & Troubleshooting] cobrax2:
it says "task failed"

tried deleting it even from adb shell. there it says "operation not permited"

checked the permissions for the file, parent foler, sys folder, everything

checked mount type, its rw

changed kernel from elemental to tbalden's and back

same thing :(
[One (M7) Q&A, Help & Troubleshooting] deeevan:
I get operation not permitted too when trying to delete, I think you can only overwrite not remove. Why don't you paste in the adb shell output for ls -l and cp commands? Maybe we can spot the difference
[One (M7) Q&A, Help & Troubleshooting] cobrax2:
omg it worked i think! it seems ok, will check again later when i get home to be sure it's ok in some weird conditions

thank you!

but i can't understand how come i cant erase/rename the old file, but i can replace it. very weird...

l.e.

im home, in these lighting conditions thinks havent changed. will test more

l.l.e:

neah

it didnt copy anuthing. it just told me it did. i checked the file and it has the same content as before.

so, still waiting on a solution :(
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Check file date and remember that whenever you reboot you get the original awb back
[One (M7) Q&A, Help & Troubleshooting] cobrax2:
the file date is correct, but the content of the file is not

my guess is that it doesnt get overwritten. others should try checking theirs too. i dont think my one is so special :)
[One (M7) Q&A, Help & Troubleshooting] Osama Zabin:
I'm also getting message that file has been successfully overwritten, but i see no change in green tint, also no change in last modified time!

really strange.

Edit:

Last modified time is showing change, but green tint is still there.
[One (M7) Q&A, Help & Troubleshooting] tgeza:
Green tint depends on the build you're running as well, some have better awb, some much worse - mine was really bad if you check the second post in this thread. The mild cases this doesn't seem to help.
[One (M7) Q&A, Help & Troubleshooting] Osama Zabin:
I'm running ARHD 71.0

KK 4.4.2

Firmware 5.11.401.10

ElemetalX 14.12
[One (M7) Q&A, Help & Troubleshooting] tgeza:
I also had a xx.401.x build and tried the GPE ROM too - all the same. Probably not all OV sensors are created equal then
[One (M7) Q&A, Help & Troubleshooting] akpe:
Hello all,

Please forgive me if my findings are already well-known, I just want to share my experience.

I also noticed the green tint (sensor is ov ov4688 4M) and I tried the fix but I couldn't get the file to overwrite. However while going mental with testing, I discovered something interesting.

I took a test photo on the one location where the green tint is more obvious, my brown desk. The low-light conditions, the type of the light plus with the color of my desk were ideal for testing since they seem to produce the tint more easily, so I used my HOX+ as a model, set every setting at default, disabled flash, and this was the result.

But, notice what happens when the HOX+ screen turns on!

That's without changing a single thing! HOX+ screen just went on when I received a text and immediately the green tint disappeared from the viewfinder!

I also noticed that pointing the camera elsewhere and letting it focus, preferably somewhere brighter, and then pointing it back to the same spot will fix the green tint at least 3 out of the 5 times I tried. Apart from that, I also discovered that setting ISO to 400 and/or generally playing with the settings (exposure, contrast, saturation etc) diminishes the issue. Not completely, depends on many things, but enough to be barely noticeable.

So, if and when you get a green tint in real life conditions, you can also try to:

a) point and focus somewhere else (where you get no tint in the viewfinder) and then point focus back on your object

b) lower the ISO to 400 or even lower, might give darker pictures but much less green tint

c) play around with the settings (in my room I tried exposure +2, contrast -1, saturation -1, got much less tint but YMMV)

Let me know how and if those things worked for you who still can't copy the file :)
[One (M7) Q&A, Help & Troubleshooting] Galactus:
Green tint only goes for me if I clear the Camera apps cache and data. If i just force close and clear cache then green tint remains
[One (M7) Q&A, Help & Troubleshooting] Thepho3nix:
Green tint here also! It's present so much under artificial light last night I was in a park and was full of m light bulbs and the green tint was excessively too much!

Replacing the quoted file will remove that tint?
[One (M7) Q&A, Help & Troubleshooting] Osama Zabin:
For many guys it DID remove the green tint,you have to try it yourself.

For some it didn't work, but changing camera to Night Mode would significantly reduce it, or even eliminate it.
[One (M7) Q&A, Help & Troubleshooting] akpe:
Also you can try play to around with white balance settings. Setting white balance to Incandescent or Fluorescent (depending on what kind of lightbulbs you have) could also significantly reduce or eliminate green tint, at least that happens in my room :)
[One (M7) Q&A, Help & Troubleshooting] gelo01:
i don't know what am i missing but i still can't make it stick after rebooting, it always reverts to the old awb_cal with green tint. :/

i'm on ARHD 71.1, s-off, supercid, with busybox installed, all requirements stated in the OP..

i also tried with the # sign in front of the third line, reverted back after reboot.

tried WITHOUT the # sign, reverted back after reboot.

please help guys.. :(
[One (M7) Q&A, Help & Troubleshooting] Galactus:
I mentioned on the previous page that the only way it works is if you clear cache and data for the camera app
[One (M7) Q&A, Help & Troubleshooting] °Dexter°:
I've tried many times this fix, but even if it gets overwritten (or I hope so, I used the script too) I see no great difference in pictures.

Is there any alternative calibration file to try? I have ov sensor, of course
[One (M7) Q&A, Help & Troubleshooting] gelo01:
i've already done that.. :( it works perfectly fine. the awb_cal really calibrates the green tint, what my problem really is every time i reboot, the old awb_cal get replaced. the init.d script that was posted pages back doesn't work for me no matter how i tried. :( and yes, i tried different methods as well like removing the # sign on the front of the 3rd line of the script, placing the awb_cal file in different places (/system/etc/, /sdcard/, /storage/emulated/0/, and several more). i also did all the steps in the OP and in the init.d script post. i am s-off, supercid, elementalX 14.1, ARHD 71.1..

i really don't know what am i missing here. :( the green tint really annoys me..
[One (M7) Q&A, Help & Troubleshooting] deeevan:
You're not alone. I just noticed my init.d script has stopped working. Funny thing is that I haven't flashed anything in ages, I can't even remember the last time I went into recovery. Could it have been a Play Store HTC/Google update? I'll see what I can do
[One (M7) Q&A, Help & Troubleshooting] CRACING:
Hello guys,

Can anyone please let me know how to check which camera sensor my HTC ONE has got? I have bought a used sprint HTC One recently and fortunately there is no pink tint issue. I would like to see whether the device has carried out RMA to fix camera issue or problem was already solved when its manufactured. Its built in 2013, but no idea about month.

however, there is green tint issue only when flash is turned on. Slight green pictures in low light and fully green when camera is covered/blocked.

Running ViperOne 6.2.1 with kangaroo Kernel.

Thanks...

Best Regards
[One (M7) Q&A, Help & Troubleshooting] Osama Zabin:
I'm pretty sure you have the OV sensor because you face the green tint.

The sensor type location is:

/sys/android_camera/sensor

To check exact manufacturing date, use below thread:

http://xdaforums.com/showthread.php?t=2209277