[FIX] Camera green tint HTC One

Search This thread

tgeza

Senior Member
Apr 1, 2014
97
25
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...

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

Sent from my HTC One using XDA Free mobile app
 

MaRcIuPT

Senior Member
Apr 9, 2011
363
27
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.
 

karibe66

New member
Jun 13, 2014
2
0
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

Sent from my HTC One using XDA Free mobile app


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
 

deeevan

Senior Member
Mar 22, 2013
583
196
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
 

Attachments

  • 99awb_cal.txt
    259 bytes · Views: 1,711

tgeza

Senior Member
Apr 1, 2014
97
25
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

Awesome, thanks!

Sent from my HTC One using XDA Free mobile app
 

deeevan

Senior Member
Mar 22, 2013
583
196
Would it be possbile to implement this fix directly into a rom ?

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?
 

ondris

Senior Member
Sep 24, 2008
169
42
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?

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 ?
 
Last edited:

deeevan

Senior Member
Mar 22, 2013
583
196
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 ?

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.
 

tgeza

Senior Member
Apr 1, 2014
97
25
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.

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!

Sent from my HTC One using XDA Free mobile app
 

cobrax2

Senior Member
Aug 17, 2007
986
126
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
 

gustav30

Senior Member
Jul 20, 2010
1,163
259
LG G8X ThinQ
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

Do you have busy box installed? Are you using es file explorer? That was the only app that replaced it for me.

Sent from my HTC One using Tapatalk
 

cobrax2

Senior Member
Aug 17, 2007
986
126
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

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 :(
 

deeevan

Senior Member
Mar 22, 2013
583
196
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 :(

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
 
  • Like
Reactions: cobrax2

cobrax2

Senior Member
Aug 17, 2007
986
126
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

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 :(
 
Last edited:

tgeza

Senior Member
Apr 1, 2014
97
25
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 :(

Check file date and remember that whenever you reboot you get the original awb back

Sent from my HTC One using XDA Free mobile app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    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

    Sent from my HTC One using XDA Free mobile app
    8
    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
    3
    Possibly it will be 4.4.3, as far as I know HTC will skip the 4.4.4 update and will implement any fixes in the 4.4.3. However I'm waiting for an official word on the tint issue before I announce it here.
    2
    Ok guys it's official. HTC Greece just informed me they are aware of the green tint issue in omnivision sensors, it is indeed a software/calibration issue and they plan to fix it with an upcoming software update. They weren't specific enough to mention if it will be a simple OTA patch or if it will be implemented in the 4.4.3 update but the point is this: they know about it and they are going to fix it soon :)
    2
    Ok guys it's official. HTC Greece just informed me they are aware of the green tint issue in omnivision sensors, it is indeed a software/calibration issue and they plan to fix it with an upcoming software update. They weren't specific enough to mention if it will be a simple OTA patch or if it will be implemented in the 4.4.3 update but the point is this: they know about it and they are going to fix it soon :)

    The 4.4.3 update seemed to slightly fix the Green tint issue. From my eyes, i noticed that green tinting is not as prominent but comparing to the XDA fix of using AWB_CAL file from M8, I still think the XDA fix works much better, the white is more accurate comparing to this update which has a colder tone.