yashsingh1/xdaforums huggingface dataset:
[Desire HD Themes and Apps] SMN™:
DHD

with this rom and radio

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

it works with revolution rom version 3.1 but doesn't work with 4.0

how we can fix our problem without any software?? why other haven't any problem?!

I have this problem with this rom leedroid 1.20 arab

http://xdaforums.com/showthread.php?p=11603134

and this rom Cyanogen-mode 7

with android revolution version 3.1 i have to open this app after restart and recalibrate my proximity sensor and then use device it wont correct itself automatically after reboot

is there any kernel exist that have correct calibration?
[Desire HD Themes and Apps] iknow123:
hey i have a problem on my desire HD i configured the sensor but its always on far i'm using cm 7 rc2 so meaby thats the resson i hope someon can help ;)
[Desire HD Themes and Apps] leppie:
To you and those using Android 2.3.x. I suspect something has changed and will probably not work. Will look at this as soon as the HTC release version comes with the source code which could be a couple of months.

Sorry.
[Desire HD Themes and Apps] leppie:
All the newer kernels should have the HTC fix applied. According to Kali, CM7 also contains this fix from HTC.
[Desire HD Themes and Apps] SMN™:
before i say anything thanks for the new version .

how i can get this fix? have you got any link?!
[Desire HD Themes and Apps] leppie:
You would have to ask the 'authors'.

Buzz kernel from 1.3 onwards contains the fix. Also LeeDroid's from 2.2 I think.

CM7 should be from RC2 I think (would be better to consult changelogs).

If the behaviour is desirable on these kernels, there is no reason to run my app :)
[Desire HD Themes and Apps] SMN™:
is there any way to recalibrate it before install rom?

or recalibrate it for once ?
[Desire HD Themes and Apps] leppie:
Not really.

But if you have it installed and do not do a full wipe, it should still apply the values on boot.
[Desire HD Themes and Apps] paarry:
does this work with CM7 and MIUI? I flashed CM7 and my DHD screen never goes off during calls holding near my face. But when i keep my hand on the sensor the screen goes off. Anything can be done?

i tried this app in CM7 and lowered the values. It showed some error msg. I m unable 2 use this properly. i will be very thankful if any1 can give me a solution.
[Desire HD Themes and Apps] ricebus:
great tool!
[Desire HD Themes and Apps] paarry:
it would be great if u could provide a similar app for 2.3 gingerbread based ROMs. I have the proximity sensor issue even in the latest nightly builds of CM7 and the Sense Gingerbread leaks.
[Desire HD Themes and Apps] SMN™:
actually you can use this app on 2.3 but before that you have to change the permission of "ps_kadc" file located in /sys/devices/virtual/optical_sensors/proximity/ps_kadc

change the permission with root explorer to rwxrwxrwx and after that run the app and recalibrate the sensor

you have to do this task after every reboot.

i think developer should write a new app that use superuser permission to do this task automatically
[Desire HD Themes and Apps] Pay919:
Does this work with an Galaxy S4 with CM10.2?

If not can someone point me in the direction of an app that would help me reset the threshold of the proximity sensor?

Thanks!
[Desire HD Themes and Apps] tonylee000:
No its only for DHD. There is this issue across many phones and I havent actually heard of a re calibrater for any other model. [MENTION=1432288]leppie[/MENTION] maybe an opportunity if you are abke to.modify it for use on multiple handsets (if that even possible) and whack it in the play store for 50p or something lol
[Desire HD Themes and Apps] bilal.fanatic:
I have been experiencing proximity sensor problems since i bought this phone and today i found this and it worked like a charm.... :good::good:

Thanku very much dev....
[Desire HD Themes and Apps] Carist:
Thanks man! Helped me a lot!
[Desire HD Themes and Apps] Dunksterp:
Calibrator issues??

Does anyone know why I only seem to get a response from the calibrator when the low threshold is set to 0/1 and the high around 4 ish?

The screen then doesn't seem to want to wake up from calls etc.

I have had a look through the thread but couldn't find anything...

Cheers

BTW

DHD using Jellytime R11

JellyTime 4.2 R11

Kernel updated to 3.0.83

Synced with CM

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

Thanks again
[Desire HD Themes and Apps] tonylee000:
Try setting the values only 1 or 2 apart. The majority of people 4 low and 6 high work best but that all depends on how well the sensor is working. Try making sure it is properly clean
[Desire HD Themes and Apps] Dunksterp:
You are a diamond!!! Thank you :) Managed to get it working perfect at 2 low 4 high!!

No more garbled calender entries for me :)

Cheers!!!
[Desire HD Themes and Apps] fortismax:
this is salvation, thanks!:good::laugh:
[Desire HD Themes and Apps] alkemicar1:
Hi,if anyone knows dose it work for RB 4.4.2. taktik on dhd?
[Desire HD Themes and Apps] rjand:
I'm using it on Mustaavalkosta's unofficial CM11 and it's working great.
[Desire HD Themes and Apps] alkemicar1:
It's working great on 4.4.2 ,thanks a lot! :)
[Desire HD Themes and Apps] brtn:
I have installed today on 4.4.2 randomblame rom and works great... Thanks! ;)

Tapatalkato
[Desire HD Themes and Apps] admet615:
NOTHING

It doesnt work on mine,sorry dude.
[Desire HD Themes and Apps] witc:
+1, working fine for me
[Desire HD Themes and Apps] DjDyck:
don´t work
[Desire HD Themes and Apps] Sakuryu:
Anyway this can be ported to another device?
[Desire HD Themes and Apps] zened8:
Now it works very well also with cm 10.1.

Inviato dal mio LG-D802 utilizzando Tapatalk
[Desire HD Themes and Apps] xperiax8tester:
This is just easier solution but you can fix it without using any app!

Firs you need to dissasamble your phone and clean the speaker net (gray one on the case not board) from the inside and it will work as first day
[Desire HD Themes and Apps] Tao309:
On 4.4.2 working very good,

It's make me crazy when i talking, opening the calendar
[Desire HD Themes and Apps] vahiu:
Does it work and effective on roms with sense ?
[Desire HD Themes and Apps] tonylee000:
Yes, but you would have found out quicker by trying it ;)
[Desire HD Themes and Apps] romitfbs:
which one will work for Nexus 4 ?? I am using OMNI rom 4.4.2 . kernel version : 3.4.0-perf-gc50dcad jenkins@devbox.omnirom.org#1
[Desire HD Themes and Apps] tonylee000:
Non. These are for the HTC Desire HD only.

Try it anyway though.....
[Desire HD Themes and Apps] tonylee000:
Oh 1.10 works slightly different from the previous versions so try 1.9 and 1.10. I don't expect you to have any luck though :(
[Desire HD Themes and Apps] reelaax:
stil not works for me its doesnt open at all it shows an error and close

heeeeeeeeeeeeeeeeeeeeelp
[Desire HD Themes and Apps] tonylee000:
Factory reset
[Desire HD Themes and Apps] reelaax:
i did it when i bought it cause i'm not the first owner who tels mé when on foroyo every thing goes good only on ginger that comes this problem
[Desire HD Themes and Apps] tonylee000:
My DHD was born with froyo and upgraded to gingerbread. I did that with official stock though. There were various problems pre 1.10 but 1.10 solved them all :) give it another fa tory reset and instal the proximity app first to rule out everything else
[Desire HD Themes and Apps] reelaax:
factory rest from settings ??
[Desire HD Themes and Apps] tonylee000:
Yeah just a normal factory reset from either settings or recovery
[Desire HD Themes and Apps] MaCaLuBi:
No work in no1 s6.

kernel not suppoted " - ps_kadc not found " :crying:
[Desire HD Themes and Apps] SANBOR1991:
Simply works. Great job!
[Desire HD Themes and Apps] TRECON:
Very Satisfied

A very good job!

Nice app! I had a black screen every incoming call after I opened my hTC DHD for changing a volume button. And now, I am realized.

Thank you so much!
[Desire HD Themes and Apps] noctiz:
Sorry, don't works on my htc sensation xl with android version*

[ROM][AROMA] RUNNY-KITKAT 4.4.2_STABLE_M3 v17_SMOOTHE custom rom by onejay09

I can't find any fix for this sensor issue. (display is black during a call always)
[Desire HD Themes and Apps] shammiX10mini:
is there a working version of this app for X10 mini..
[Desire HD Themes and Apps] Fihlvein:
leppie, as you mentioned, this tool unfortunately is not working with CM7 RC2 (or actually I'm running latest nightlies).

It opens fine, but when trying to change a value, a "permission denied" message will show and changes are not saved.

*aww* :(
[Desire HD Themes and Apps] leppie:
The fix has been checked into the CM7 kernel tree. Will likely be working in the next nightly :)
[Desire HD Themes and Apps] Fihlvein:
Unfortunately it's not actually working. mad-murdock was able to get it to work somehow, but I just flashed the same build and still seeing permission denied messages. :(
[Desire HD Themes and Apps] Fihlvein:
Just to let everybody know, with RC3 and onwards this tool works again.

Thanks!
[Desire HD Themes and Apps] leppie:
Told ya ;)
[Desire HD Themes and Apps] moosefist:
I guess I am a little confused what the high, and low threshold are. I quit using CM7 becuase of proximity sensor issues and went back to sense (revolution b4). I don't like sense and CM was so much faster i switched back last night.

When on phonecalls I am muting people, hanging up, dialing numbers etc.. my low setting after installing the app is 15, high is 16. How do I adjust the settings to the ideal level?

I see this "For those whose screen does not turn off, it probably means the factory values are set too high.", but I am not sure if i am supposed to completely cover the sensor, hover my finger, what far / near mean, high/low threshold's etc are. A little better instructions would benefit me if anyone cares to help. thanks.
[Desire HD Themes and Apps] Fihlvein:
I would also like to see a better explanation of low/high values. At first I tried experimenting with 100+ values until I noticed the useful tweaking happened within very low values. Why show such high values, maybe I didn't notice something?

Also, I really didn't have a technical problem with the sensor but I want to tweak it to keep screen off as long sensor distance as possible (having phone like 5-10cm off from head), what would be the best settings for that? I have been only able to tweak it to maybe 1 or 2 extra centimeters.

Thanks in advance ;)
[Desire HD Themes and Apps] southadam:
thanks man.

you are the man!
[Desire HD Themes and Apps] cd993:
Hi there. I tried this last night with Coredroids gingerbread Rom and it returned an error, something along the lines of not being able to access something lol can this be configured to work in gingerbread?
[Desire HD Themes and Apps] cd993:
Bumpedy bump?

Sent from my HTC Desire HD
[Desire HD Themes and Apps] leppie:
Exact error please, else I cannot help.

BTW I have no idea if Gingerbread based Sense ROM will work till we get some source code for those kernels.

Also chances are slim you actually need it on the newer kernels.
[Desire HD Themes and Apps] Fihlvein:
Although the sensor works technically normally, this is a great tool to adjust the sensor otherwise to your liking. I've put the screen to stay off during call for maximum distance as possible, and my values are something like low 5, high 6.

I hope the sensor could be tweaked to even longer distances, but I'm guessing it cannot detect things for very long distances?
[Desire HD Themes and Apps] leppie:
The sensor is only rated up to 3 centimeters IIRC, will try find the datasheet again and find out.
[Desire HD Themes and Apps] cd993:
Ok thank you for your reply. I didnt note the exact error at the time but will be sure to post it when I get chance to try it again.

What I am going to attempt is to copy the proximity sensor value data from my current Rom to gingerbread and see if that works. Will let you know if it works!

Sent from my HTC Desire HD
[Desire HD Themes and Apps] leppie:
You can't just paste the content back. It is not a physical file.

You need to echo values to it. The one in the 2.2 kernel expects 2 16bit values to be passed to it.

Eg: echo '0x1234 0x4567' > ps_kadc
[Desire HD Themes and Apps] niteowl360:
Hi Leppie

Thank you it seems to work great on getting phone back to life after sleep.

I have both Low Threshold and High Threshold set to 180.

Waking up from sleep is good now (always had a problem) but waking up from in call is approx 10 sec

I don't really understand the workings to get this perfect.

Which one do I change to correct waking up in call, or is each phone different?

Also usually get this error ps_kadc file not found when launching your app (not sure if an issue).

Certainly after brief testing the phone wakes up from sleep instantly :D

Thank you

MCCM HD v4.5

Andrid 2.2.1

HTC HD2
[Desire HD Themes and Apps] cd993:
Ahh right so do you think it would be possible to achieve what I'm trying to do with this method? I'll try using the app again later tonight and post the exact error it returns.

Sent from my HTC Desire HD
[Desire HD Themes and Apps] moosefist:
Leppie,

Do you think you could explain a little better for me? Thanks.
[Desire HD Themes and Apps] ColonelPan1c:
I'm running this on an HTC Aria (Liberty) with CyanogenMod7 RC4, and it keeps throwing some weird Java FileNotFountException. I'm pretty user it can't find my prximity sensor, as the file it says is not found is /sys/devices/virtual/optical_sensors/proximity/pa_kadc

Any hints or tips here?
[Desire HD Themes and Apps] leppie:
Besides buying a Desire HD, no.
[Desire HD Themes and Apps] ColonelPan1c:
Meh, figured it was some kind of difference in hardware, seeing as it was looking for a hardware device and couldn't find it. What threw me off, was that it did do the "Near" or "Far" thing, and actually detected my sensor, but the sliders wouldn't change the calibration of it. I'd love to post in the actual dev thread for CM7 on the Aria, but apparently having 10 posts magically give you skill that lets you participate in the dev threads, and I'm somewhat new (long time lurker).
[Desire HD Themes and Apps] cd993:
This is the error I receive when attempting to sort out my sensor on a gingerbread rom

Error when writing to ps_kadc

Any suggestions on how to get it to work?

Thanks

Ps I know of the location of the ps_kadc file. Is it just this one file in which I could edit the values manually? It contains:

(B_value, C_value, A_value, X_value, THL, THH) = (0x4e, 0x55, 0x14, 0xb, 0x4e, 0x51)

Which ones should I modify if so?
[Desire HD Themes and Apps] leppie:
Seems the file might be readonly.

What ROM are you using?
[Desire HD Themes and Apps] cd993:
Coredroid v5.1

But changing the permissions with root explorer to allow writing, worked!!

So anyone in gingerbread whos sensor doesnt work and this app fails to write, change the permissions and it works!

Many thanks, I can now use gingerbread without that annoying problem :)
[Desire HD Themes and Apps] cd993:
The file loses its permissions after a reboot, is there any way to make the changes to it permanent?
[Desire HD Themes and Apps] leppie:
Completely expected. It is not a physical file.

Best bet would be to edit/add a 'rc.d' file like most ROM's provide.
[Desire HD Themes and Apps] moosefist:
So my sensor works well in sense roms, but in CM7 I cannot for the life of me figure out how to use this tool to make my sensor work. It stays on and I have tried values all over the place, but no luck. Is the high threshold supposed to be 1 digit above the low threshold everytime
[Desire HD Themes and Apps] sarptecimer:
Works like magic leppie!!! I'll buy your beer next month (topped my credit card for now :) )

What are the values that you use? Or what should be the values for a standard user?

Phone: DHD - Rooted

Rom: CM7.0.0

Status: Lovin' it!!!
[Desire HD Themes and Apps] vriship:
having an issue,

i am using MDj's UD v1.4 rom

the proximity calibrator app manages to make the proximity sensor work for sometime after i set the values, but after some odd number of calls, i have to start the application again and redo the calibration procedure... any workaround for that would be greatly helpful
[Desire HD Themes and Apps] KillingSun:
Hi,

I LeeDroid v.2.4 on it and wanted to test the tool with me ....

But the fault is permanent "ps_kadc file not found".

Where does and what can I do?

It is a Desire. Now I have heard often of this path: "/ sys / devices / virtual / optical_sensors / proximity / ps_kadc"but for me, the file / optical_sensors / proximity / ps_kadc not available.

Read with root Explorer.
[Desire HD Themes and Apps] leppie:
This might be the kernel trying to do it's own calibration.

You have 2 choices:

1. Compile your own kernel with the older driver that does not do calibration.

2. Use an older kernel.
[Desire HD Themes and Apps] asuradaMobile:
I have a Tmobile G2 (US version) and It gave me the same problem as the above "Error when writing to ps_kadc" everytime I change the setting.

Do I need to buy Root Explorer and change the permission of that file? Btw, I cant locate that file.
[Desire HD Themes and Apps] drgx:
thanks for share :D

gonna try this :D
[Desire HD Themes and Apps] SMN™:
I have to recalibrate the sensor after and before any calls!

I haven't any problem with revolution roms with this app.

but now i have CM7 final and i have to recalibrate several times a day !!!!

is there any solution?!
[Desire HD Themes and Apps] madindehead:
I have that error on my current Gingerbread ROM too.

Edit: Just changed file permissions, and changed values, going to see if they stick on a reboot.

On GB there is no custom kernel, hence the problem I think...
[Desire HD Themes and Apps] Pliind:
If i could kiss you right now i would, a couple of beers will be coming your way after pay-day :D
[Desire HD Themes and Apps] viewdetails:
Hi, I tried to install the attached apk on a non-rooted, stock 2.1 X10i, and it fails, with a mystery message: "analyzing error" or what.

Does anybody have an idea?
[Desire HD Themes and Apps] Software Guru:
Works on my DHD, Thanks
[Desire HD Themes and Apps] leppie:
That's your problem.

The app is only useful on Desire HD.
[Desire HD Themes and Apps] flashmeat:
Worked for me on CM7 Gingerbread on HTC desire HD, GREAT JOB, thanks!!!
[Desire HD Themes and Apps] sugsamber:
Hi Leppie,

is it possible to use it on HTC Desire?(i keep getting the error that ps_kadc file is missing. actually the dir path is not there in Desire). is ther eany work around?

Thanx and regards,

amber
[Desire HD Themes and Apps] Georgfoc:
First, thank you for your work.

But I also have the problem, that i have to recalibrate after a few minutes.

I have tested it with diverent ROM, MODs, Kernels, etc. At the moment I'm on Stock ROM 1.32.405.6

For tips I would be thankfull
[Desire HD Themes and Apps] Ghaztehschmexeh:
Thanks for this, very useful!
[Desire HD Themes and Apps] madindehead:
@leppie

Do you have any plans to look into the write issues with GB ROMs? I don't mean to be rude, but I guess a lot of people use this and a GB ROM (like myself) :p
[Desire HD Themes and Apps] apwchan:
Huge Thx...

Works brilliantly... great app!
[Desire HD Themes and Apps] leppie:
I know the newer kernel source code have auto-calibration, but I have no idea how to turn it off. That could be causing it to change the values.

As soon as there is kernel source code from HTC for Gingerbread, and not some patched together kernel (that specifically uses the older proximity driver). No point at this time, sorry. I wont be long now I hope.
[Desire HD Themes and Apps] madindehead:
Cool. Thanks mate. No rush, like I said, not meaning to be rude :)

HTC are taking their pretty little time over releasing official GB, so guess we have to wait :p
[Desire HD Themes and Apps] sauron_xxx:
Desire S problem too

Last week I bought new HTC Desire S and there is the same sensor issue !!! Any chance the utility will work on Desire S too (HTC Sense 2.1 + Android 2.3.3)
[Desire HD Themes and Apps] Prodelin:
I can't get the app to work with latest GB 2.3.3 official RUU.

When i start to adjust the sliders the app errors out with lots of errors on screen saying not having permission etc, any solution to this?
[Desire HD Themes and Apps] Liquid_Gamer:
Same errors arise at my ROM (Revolution 5.1.3). Seems it does not work with GB :(
[Desire HD Themes and Apps] theh0g:
Hmm, maybe it's just me and I didn't "try hard enough" but on 2.3.3 I tried playing with settings, on my DHD (ARHD 5.1.3 rom) it works only with values from 5 to 9 with high threshold being low treshold + 1 (ie. setting low to 5, high to 6). And now it works like it should, hope this helps anyone :)
[Desire HD Themes and Apps] Liquid_Gamer:
Will give it a shot while i get back home :-)
[Desire HD Themes and Apps] Prodelin:
How do I change these settings manually? what file?

I have LeeDroid latest installed so i have root access.
[Desire HD Themes and Apps] leppie:
Please read the thread. No support for GB Sense kernel till someone get the kernel source code out of HTC.

Please read the thread. No support for GB Sense kernel till someone get the kernel source code out of HTC.

Please read the thread. No support for GB Sense kernel till someone get the kernel source code out of HTC.
[Desire HD Themes and Apps] Prodelin:
Damn, thats sad news if we don't get the source code from HTC soon as i really need this to be fixed.

HTC tells me i need to send the DHD in for service but i told them if it was broke the sensor would not work at all, it worked great with this app and Froyo setting low values.
[Desire HD Themes and Apps] leppie:
Someone just need to pester HTC for the kernel source code. I did it last time, but I dont really feel like going thru that painful exercise again.

Someone just email them and ask for it, note their exactly reply. Then send the details to me, I'll take it further with GPL Violations from there. That normally gets them to release the source code within a few days, BUT we need to initial contact with HTC.
[Desire HD Themes and Apps] secret82:
Hi all, I can get this app to work if I mount R/W in Root Explorer. The values then chaage without any errors and work as they did with Froyo. But once I reboot the values are gone again.
[Desire HD Themes and Apps] leppie:
Is this on the stock GB Sense ROM with their kernel? If so, I can maybe try utilize 'superuser' access.

All custom kernels should already have the file available for writing by any user, if not, please ask your kernel provider to implement the changes.

There could be other issues too like the format the file accepts, etc.
[Desire HD Themes and Apps] secret82:
Hi leppie,

this worked on the as close to Stock Rom by seraphic here:-

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

I am now running Android Revoultion and also works as well but I believe that has a custom kernel...
[Desire HD Themes and Apps] Prodelin:
I need help with what values i shall write in the ps_kadc file?

When i used Froyo i had Low threshold 8 and High 9 with the app.

In the file ps_kadc there is:

( B_value, C_value, A_value, X_value, THL, THH) = ( 0x10, 0x25, 0x14, 0xb, 0x22, 0x23 )

THL must be THreshold Low right? and THH must be THreshold High? that is hex numbers, would i convert the decimals i want to hex and then put them in there? will it work after i rebooted the phone?

Any help would be appreciated?
[Desire HD Themes and Apps] Prodelin:
Success!!, i changed the hex values to 0x8 for low and 0x9 for high and rebooted the phone and the sensor works at great distance now works without the app.

Really great.
[Desire HD Themes and Apps] leppie:
Not quite dude ;p

It requires something along the lines of:

echo 0x12345678 0x12345678 > ps_kadc

Have a look in the source code of my app how it is constructed or search for some my older messages (just before I wrote this app) for an example.

Also, it wont persist over a reboot, the initial values are the factory calibrated ones that is passed to the kernel on boot as parameters. These are clearly wrong on many devices.