yashsingh1/xdaforums huggingface dataset:
[Desire HD Themes and Apps] polarbearmc:
Well it certainly works when doing the testing, ill see today how it works throughout the day and then try it on my girlfriends G2 and let you know. :-)
[Desire HD Themes and Apps] Captain Black:
Thanks Leppie. You are a (5) star
[Desire HD Themes and Apps] ledzep974:
Yeahhh 2 dollars a beer ! Tell the adress, it's good bar, beer is not expensive ! Cheerrsss !
[Desire HD Themes and Apps] Sniper33:
Hi! thank you very much!

thanks to your program I was able to confirm my doubts about the Proximity Sensor on my HTC HD2 (runing on Android). Other applications will only show the values of sensors, but values of this sensor did not changed.

in my case, your program show the value NEAR and didn't change.

I suggested that the symptoms described above are caused by the fact that the proximity sensor is blocked by something.

I've tried to shake and knock on the rear part of a phone, next to the camera in front of the sensors and tried again to check it - and voila - the sensor working again!

but I do not understand - how can I save the settings for your program? or I can only monitor the current values? After rebooting the operating system and run the program again - the settings are still -1
[Desire HD Themes and Apps] sj89:
i'll try it had problems since ages
[Desire HD Themes and Apps] DexterMorganNL:
works good, resolved the last irritating isue with custom roms.
[Desire HD Themes and Apps] leppie:
The values are set (and saved) in 'real-time'. Upon next boot, the saved values are applied automatically. You should see a Toast coming up.
[Desire HD Themes and Apps] fritzproject:
;(;(;(

waiting for reading!!!
[Desire HD Themes and Apps] leppie:
Keep your finger on top of the proximity sensor. And adjust the sliders.
[Desire HD Themes and Apps] bayerme:
Thanks leppie, a beer already sent for the awesome work, don't get drunk :). Whenever I reboot the device settings are gone, then I need to recalibrate the sensor, am I missing a point?
[Desire HD Themes and Apps] Nark.GA60:
Fantastic stuff! Thank you!
[Desire HD Themes and Apps] leppie:
It should be automatically applied on boot. You will get a toasty to say it was applied with the values you chose previously.

Some questions:

What phone/version/ROM?

Right after a reboot can you do: 'adb shell dmesg > k.log' and attach the log here so I can see if it got applied. Also note your preferred settings, so I can see if the real values got applied.

Thanks for the beer, gonna enjoy it in 15 minutes :)
[Desire HD Themes and Apps] samleighton87:
Awesome - works perfect!
[Desire HD Themes and Apps] bayerme:
I think the problem was occurring because of radio version, I updated and now it works, no problem at all, thanks again for the effort
[Desire HD Themes and Apps] leppie:
Nope. The calibration values are stored on the phone, not radio.

HTC has 'fixed' this in their kernels and given they finally released the source code to newer kernels, the workaround/fix is now available in custom kernels.

The HTC workaround is not so pretty though as it has to be generic and do a recalibration on the fly, so you can still use my app to prevent it from trying to work around the problem.
[Desire HD Themes and Apps] Ultraboss:
Hi, thx for your app but I've the same issue, my settings reset at "-1", I don't see any toasty and the cmd 'adb shell dmesg > k.log' doesn't work...
[Desire HD Themes and Apps] leppie:
Again, what phone/ROM/kernel?

How does the command not work? What is the error you get?
[Desire HD Themes and Apps] Ultraboss:
My phone is a HD2

I'm running the MCCM HD V4.0 [Desire HD] rom with gauner1986's kernel

And trying the adb cmd in Gscript says me "not found"
[Desire HD Themes and Apps] leppie:
adb is part of the Android platform tools.

As for the other, I cant really help. I can (and will) only support hardware I have access to.

If you provide me a link to the source code and config file the 'gauner1986' kernel, I can perhaps look if it is compatible, but ultimately I will need to have an entire boot log from 'adb shell dmesg' to see what hardware is detected.

Sorry :(
[Desire HD Themes and Apps] Stoffl_:
Just flashed 8.6.1 Ice Cold Sandwich after a superwipe, running Lords Kernel 10.0 - Problem persists.

I have to install, set values and uninstall this app after every reboot or else it will keep the phone from going to sleep.
[Desire HD Themes and Apps] Stoffl_:
Heres the catlog for 1.8 on BFS Kernel 10.0 and ICS 8.6.1.
[Desire HD Themes and Apps] mygamers:
What is this patch

Calibrator?
[Desire HD Themes and Apps] leppie:
Thanks for the logcat.

It appears you installed the app on the sd card.

It has been mentioned previously that this will cause issues.

To all having the same issue, move it back to the phone memory (it's only a few KB and does not take any space).

Regards

leppie
[Desire HD Themes and Apps] Stoffl_:
Thanks for responding so quickly. :)

No I didn't install/move the app to SD card, that's not the issue.

The APK from where I installed was on the SDCard..do you want me to move the APK to phone memory and install from there ?
[Desire HD Themes and Apps] Stoffl_:
logcat after installing the APK from root directory of phone memory...
[Desire HD Themes and Apps] leppie:
New version 1.9

Thanks. I installed the same ROM and managed to see what the problem was easily ;p

New version uploaded. See OP.
[Desire HD Themes and Apps] Roberto_Lim:
Thanks for version 1.9 :)
[Desire HD Themes and Apps] Stoffl_:
Wow, thank you!

Amazing support. :good:
[Desire HD Themes and Apps] daniello8:
It has now been the second time that I tried the recalibrator. Either it simply wont play well on my phone or it's my personal limatation but I never get the reaction I get from my sensor while using the sliders.

Is there a tutorial anywhere .. or are the some values that users find to work well in most situations.
[Desire HD Themes and Apps] tonylee000:
Low: 4

High: 6

Works well for me! If I change it by a single number it stops working :s used it across a number of rom's and works the same on all
[Desire HD Themes and Apps] daniello8:
That glues it down to "near" on my phone.
[Desire HD Themes and Apps] tonylee000:
Try keeping the values 2 apart and move them one by one till the value changes back to FAR. Bear in mind that its a case of ON or OFF with the DHD and doesn't have incremental values like other proximity sensors
[Desire HD Themes and Apps] daniello8:
What exactly may be achieved by calibration? Is it the distance from the sensor to differentiate near or far? How far is your switching point away from the phone?
[Desire HD Themes and Apps] tonylee000:
It changes from far to near at about 2mm distance from the sensor
[Desire HD Themes and Apps] daniello8:
and can you influence it to get say 4mm?
[Desire HD Themes and Apps] tonylee000:
Just had a play. 4/6 works at about 1mm. 3/5 works around 3 or 4mm. More or less and the results are worse. At 3/5 the result was snappier so I'm leaving it at that now
[Desire HD Themes and Apps] daniello8:
Thanks for taking your time. To be honest I cannot see much difference. Though it does appear to me that I nearly have to touch the sensor to get a near but varying the far settings makes the near last shorter/longer if I move away from the sensor. I will keep an eye on this. For the meantime I am going with 10/50.
[Desire HD Themes and Apps] leppie:
Pleasure :)

Let me know if there are other problems. I just had IceColdSandwich running for the day, but reverting back to CM7.2 due to issues with BT and GPS.
[Desire HD Themes and Apps] tonylee000:
You pretty.much do have to nearly touch the sensor, but that's the point for putting the phone against your ear, whichever setting gets it to change back to far as soon as you move your finger away from the sensor is the most ideal. With 4/6 it went to near straight away but stayed on near for a couple.of seconds awter living away, with 3/5 it changes back straight away, for me anyway!
[Desire HD Themes and Apps] Beackman:
Used this in miui 2.8.31 using CM10 kernel from 10-sep version 0.8.1 test4, works great, thx.
[Desire HD Themes and Apps] bogduke:
My values are 4 & 6, also, but in the previous version they were higher (6 & 8 I guess). Even so, the display plays tricks on me: doesn't turn off during calibration, or, if it does, doesn't turn back on. Strange. Anyway, better than without it.
[Desire HD Themes and Apps] Roberto_Lim:
Feature suggestion. An option to disable the auto-start function. For unsupported ROM's. Unless I am testing or upgrading, I do not reboot for weeks, so setting it once in awhile is no big deal.
[Desire HD Themes and Apps] leppie:
Wont make a difference. The app only applies settings on startup, does not actually run.
[Desire HD Themes and Apps] -SmOgER:
what if my sensor isnt working almost at all?

It is detected, but works like 1 time from 100, literally.

I just thought maybe it's caused by dust. is it hard to get there?
[Desire HD Themes and Apps] Roberto_Lim:
The proximity sensor is located in that small circle on the right of the earpiece/earphone. You can try blowing compressed air at it.

GL

Sent from my HTC Desire HD powered by Blackout ICS Incredible v.3.1.0
[Desire HD Themes and Apps] adchesney:
Dear Folks,

My proximity is damaged, this was spotted when the digitizer was replaced. Is there ANY WAY I can keep the screen active during calls?

It is impossible to use when calling voicemail, etc, where the keypad is needed, as I can't get the keypad up during a call.

I have HTC HD2 with Android 4.0.4 with 2.6.32-ics-tytung_HWA-r3

ANY HELP would be so much appreciated.

Regards

ANDREW
[Desire HD Themes and Apps] tonylee000:
Have you tried "wake lock powermanager" by darken. I haven't but it looks promising for wat you may need
[Desire HD Themes and Apps] BigJag:
Hi Everyone,

I am having an issue with my HTC DesireHD. The screen is not blanking off during a call. I've finished a call and found that my wallpaper has changed because of this. During a call it can cut out or decide to call someone else. due to the screen reacting to me face/cheek.

A little research had found that it seems to be an issue with the proximity sensor requiring calibration.

I've downloaded the app suggested by leppie to do this. However it won't run.

I get the message "Kernal not supported" "- ps_polling_ignore not found". Anyone know a solution?

I'm on Orange UK running Android version 2.3.5.

Unfortunately I am not allowed to post external links. Therefore the picture I wanted to post cannot be seen.

Thanks for any and all help.
[Desire HD Themes and Apps] madimar:
Great job! It solved my problems too, with ProjectX ics rom!

Really thanks,

M

Sent from my DesireHD.
[Desire HD Themes and Apps] Rikodu:
great man thanks a lot , it works better than it was on CM
[Desire HD Themes and Apps] Travelawyer:
Great, thanks a lot. This helped me a lot. I used to finish my phone calls by ear in the last couple of days until I discovered your tool.

Precious!
[Desire HD Themes and Apps] Roberto_Lim:
Sorry. Long time replying to this. It is not a big deal for me to set the Proximity Claibrator every time I decide to reboot. But when it auto starts I get a error message when I open it to set it up again. Than I get a 0-255 reading. So I exit it, than it reads something like 13-15 and than I set it up again.

If it did not autostart, I am thinking a few less steps?

Sent from my HTC Desire HD by Android Revolution HD 6.3.3
[Desire HD Themes and Apps] leppie:
What is the error you are getting?

It would be better to fix the problem ;p
[Desire HD Themes and Apps] Roberto_Lim:
Sorry, it has nothing to do with your app. Its the fault of the kernel not supporting your app (which support should be built in - a no brainer).

ARHD 6.3.3 RCMix Kernel - Cannot write on autostart

ARHD 6.3.3 Lord's Kernel - Works Great

Virtuous Infinity - Cannot write on autostart

Blackout ICS - Cannot write on autostart

Ice Cold Sandwich - Works Great

JellyTime - - Works Great

I can post a screenie... but its really a kernel issue.
[Desire HD Themes and Apps] leppie:
Thanks, will look into it over the weekend :)

Will also look at a way to make sure to app exits in all possible cases, so it does not get cached like Android likes to do.
[Desire HD Themes and Apps] leppie:
Just to confirm,

If you are getting the file ps_polling_ignore not found error, this app will NOT work, the kernel's polling mechanism will try to recalibrate it every time it thinks its value is off. There is a small chance that your phone falls outside this value, as the calibration values surely will change if the 'polling of the sensor' is active. HTC might have disabled this mechanism for some 'more than normal' values.
[Desire HD Themes and Apps] tonylee000:
It's not a kernel issue. It's a permissions issue. I had it working fine on blackout but had the cannot write problem. use root explorer to change the permissions for the file //sys/devices/virtual/optical_sensors/proximity/ps_kadc and tick all the read and write boxes.

Hope this helps.
[Desire HD Themes and Apps] Roberto_Lim:
Thanks. On ARHD 6.3.3 now with the RCMix Kernel. Checked the file with /sys/devices/virtual/optical_sensors/proximity/ps_kadc and all the read and write boxes were already ticked.

This is the error I get:

Great tip though for when I go back to the Blackout ROM.
[Desire HD Themes and Apps] tonylee000:
Dunno if.it'll make any difference but I have my Su to auto allow all apps but was denying some for some reason! When I set it to Prompt, and then clicked the 'always' tick box and allow each time it asked about a new app, things started working properly again. I see it was granted permission, but I wonder if it was granted quick enough as it appears to have been granted after the app errored . Maybe I'm just talking rubbish but worth a try imo
[Desire HD Themes and Apps] leppie:
If that is the case, the app should call SU and fix the permissions.

Perhaps you did not give the app root permission in SU/SuperSU?

Thanks :)

At least I know where to look ;p
[Desire HD Themes and Apps] tonylee000:
Wholly possible. Like I said, denying some app for some reason out of the blue, so could well have been one that got denied when.it was set to auto allow :S I had a problem with a Rom a few months ago where the rom appeared to not give root access. Didn't check Su as id set it to auto allow and notifications off as I always do but I'm thinking Su was playing tricks on me now lol
[Desire HD Themes and Apps] vaskopes:
When I first installed this app everything was great. I have set it to 4/6 and even I have restarted the device it was again back to 4/6 (checked before on few different ROMs).

Now every time I restart the device it getting back to 30/32 or something like that and I must re-set it again and again to 4/6 (no matter on which ROM I'm) :(

Please help, I'm on Nik v4.1 ROM now - but how I have said before, from some point of time I have this behavior on every ROM
[Desire HD Themes and Apps] tonylee000:
First check that it's still being granted superuser permissions!
[Desire HD Themes and Apps] vaskopes:
Checked! :)
[Desire HD Themes and Apps] Roberto_Lim:
I will give it a try :)

Sent from my HTC Desire HD powered by Blackout ICS Incredible v.3.1.0

---------- Post added 22nd September 2012 at 12:10 AM ---------- Previous post was 21st September 2012 at 11:15 PM ----------

Still no go. No biggie.
[Desire HD Themes and Apps] tonylee000:
Rubbish! I've gone back to blackout, - restored from a full phone backup - so all *should* be the same but now its playing up, its letting me change vvalues, so by need to do the permissions thing but when I reboot, it will pop up saying its recalibrated to 4/6, but hasn't, still stays at 12/15 in the app. I can change it manually and it sticks, but only till I reboot which is dissapointing as I reboot 3 or 4 times a day because of how much I use te phone!

Don't get why it was working before but not now when supposedly nothing's changed.

I've check SU and its all good there. Have the latest busybox installed.
[Desire HD Themes and Apps] vaskopes:
I have the same problem and have reported but without help till now :mad:

Sent from my HTC Desire HD
[Desire HD Themes and Apps] Roberto_Lim:
Setting it up after boot is not a big deal. Unless I am testing a lot of settings I don't reboot my phone for weeks or months.

I figure if it did not autostart, it would even retain your settings and all you would have to do is open the app and close it.

Another solution, I am not sure if it is possible, is to time delay the start. Guessing the app tries to write values too early.

Sent from my HTC Desire HD powered by Virtuous Infinity 1.35
[Desire HD Themes and Apps] tonylee000:
Ok it sticks! But only if I power off the phone properly. Push the power button and choose the 'power off' option. When I turn it back on its stuck! Hooray! (i let the phone fully load before checking)

But if I just whip the battery out or choose the 'restart' option in the power menu then it doesn't stick. Boo!

I hope this can shed some light of the issues the app is having and can anybody else with the problem of it not sticking confirm these steps are the same for you please?

Might be worth noting also that the proximity app takes three times longer to load after restarting or whipping the battery out than it does after properly turning off.

I'm guessing it having trouble accessing the file and then the file is replaced or reset to original setting before it can opened, expplaining.the extra time rt open the app and why the value are not stuck.
[Desire HD Themes and Apps] leppie:
OK, for me to solve this, I need to know what ROM you get this on. Is this the same list as provided earlier?

Edit: DOH, I just noticed all the 'BlackOut' logo's ;p
[Desire HD Themes and Apps] Roberto_Lim:
If you just power off the phone, it does not qualify as sticking. The OS does not restart so there is no need for the Proximity Recalibrator to write new entries.

Sent from my HTC Desire HD powered by Virtuous Infinity 1.35
[Desire HD Themes and Apps] tonylee000:
So there is a difference between properly shutting down phone and doing a restart, not just the shell but the device?

...which would also confirm why when properly shutting down the phone, and turning back on, the values stick but properly shutting down, waiting enough time to be fully off, removing battery and replacing, and rebooting the values do not stick :$

@leppie Yep blackout 3.1.0 but when I first installed this Rom I had it working properly :S
[Desire HD Themes and Apps] leppie:
It sounds like the kernel might be doing something funny. The only value that really can happen is if the kernel tried to recalibrate the sensor, or you have some other startup script doing it too :cyclops:
[Desire HD Themes and Apps] tonylee000:
Seems to be a Rom or Su issue then. If start root explorer straight away it isn't granted root yet unroll half a minute late which would be the problem with the calibrator sending the values but doesn't have access yet?

Only have your calibrator, no other items making changes, proximity wise that is
[Desire HD Themes and Apps] leppie:
Installing as we speak :)
[Desire HD Themes and Apps] tonylee000:
Wiped cache

Wiped dalvik

Wiped dalvik cache

No luck

Formatted data - oops - full restore lol

In the //sys/devices/virtual/optical_sensors/proximity/ there's a folder called subsystem which when hit opens the parants parant folder optical_sensors but classes it as a sub folder and keeps doing that as a loop, pic attached for an example. Is this correct or a sign of some corrupt data/file structure?
[Desire HD Themes and Apps] leppie:
New version out. See OP.

There were 2 issues:

1. Big oopsie by me, I never fixed the permissions when applying values on a reboot. Thanks all for making this clear :D

2. The android process manager does seem to take a while to load so the broadcast receiver was timing out (10 second limit). Had to add a service now, that will deal with this delay, and quit when done.
[Desire HD Themes and Apps] vaskopes:
Thank you! Problem solved with fixing the values after restart :D

Sent from my HTC Desire HD
[Desire HD Themes and Apps] tonylee000:
Awesome man, your a legend!
[Desire HD Themes and Apps] Roberto_Lim:
I am very happy to reply that Proximity Recalibrator 1.10 works perfectly with Virtuous Infinity, 1.35.

Sent from my HTC Desire HD powered by Virtuous Infinity 1.35
[Desire HD Themes and Apps] manu69:
Great works!!!

The version 1.10 is perfect with Nik Project X

Many Thanks
[Desire HD Themes and Apps] tonylee000:
Massive thanks and an epic well done to Leppie for making the 'perfect app' you should be hired by HTC!
[Desire HD Themes and Apps] Roberto_Lim:
Confirmed working with Blackout ICS 3.1.0 :D

Sent from my HTC Desire HD powered by Blackout ICS Incredible v.3.1.0
[Desire HD Themes and Apps] essi_baba:
thanks man ,new version work well,in Virtuous Affinity v2.05.0 :good::laugh:
[Desire HD Themes and Apps] avemt1:
does this work with the current stable CM 7.2.0?
[Desire HD Themes and Apps] tonylee000:
To hazard a guess, I would say yes, but why dont you try it and tell us? :)
[Desire HD Themes and Apps] leppie:
Yes, I run it with CM7.2 RC1.
[Desire HD Themes and Apps] pwraggcan:
This works on jellytime r13 perfectly.

Sent from my harmonica in A.
[Desire HD Themes and Apps] avemt1:
Yes the 1.10 version works great with stable 7.2cm7
[Desire HD Themes and Apps] galiato:
Great job!

Simply works. Great job!
[Desire HD Themes and Apps] Frank1604:
Simple but effective. Great job man!
[Desire HD Themes and Apps] Roberto_Lim:
1.10 works with Ice Cold Sandwich 8.7. I guess with all the reports, it is fair to say it probably works with every DHD ROM.

Sent from my HTC Desire HD powered by Ice Cold Sandwich 8.7
[Desire HD Themes and Apps] Mspeker38:
Thanky

Great. Now I can phone again normally. Thank you a lot...
[Desire HD Themes and Apps] mcrabb:
Many thanks for this great app
[Desire HD Themes and Apps] kizzoalfa:
Error parsing the file

Hi,

I tried to install your application into my Motorola MB525 but had the follwoing message: Error parsing tha package. I have found that lot of people have the same problem. I tried 1.10, 1.9, but same error.

Can you help me what did I wrong? I am running Android 2.2

Thank you.

Zoltan
[Desire HD Themes and Apps] Roberto_Lim:
This app is only designed to work with rooted HTC Desire HD's.

Sent from my HTC Desire HD powered by Ice Cold Sandwich 8.7
[Desire HD Themes and Apps] kizzoalfa:
This is interesting information. On many places on the internet they are offering it also for Motorola phones. My phone is also in the supported devices list.

Does it possible in the next release to get it work on Motorola MB525?

Thanks,

Zoltan
[Desire HD Themes and Apps] leppie:
Then it is some other app, not this one. This one will only support Desire HD ever.
[Desire HD Themes and Apps] kizzoalfa:
Hi,

I am not a programmer so may my question is not realistic but does it possible to get MB525 supported?

Thanks,

Zoltan
[Desire HD Themes and Apps] tonylee000:
When an app works as awesomely as this one does its going to cause envy amongst other handsets users, but alas to quote his highness @lepppie "This one will only support Desire HD ever!" ;)

Edit: on the otherhand, Leppie may find interest in creating such an app if he found himself with a complimentary device for testing ;)
[Desire HD Themes and Apps] adchesney:
I can't get this (V1.10) to run on my HTC HD2 with ICS, it comes up with the error "- ps_kadc not found".

My sensor is damaged I know this, I am just trying to keep the screen on all the time when making calls.

Any solution will most definitely deserve a beer!

ANDREW
[Desire HD Themes and Apps] tonylee000:
1, is your device rooted?

2, is your device a Desire HD?

3, I needn't go on...
[Desire HD Themes and Apps] galiato:
thank you!

The problem with the proximity sensor was very annoying. Now is OK. :)

:good:
[Desire HD Themes and Apps] magisterial:
I tried to read all comments but couldn't see any answer to this post.

Same problem here, any ideas??
[Desire HD Themes and Apps] Roberto_Lim:
What version are you using? Try v1.10.

Sent from my HTC Desire HD
[Desire HD Themes and Apps] magisterial:
I'm trying the latest version 1.10