[Desire HD Themes and Apps] krzych:
Below a fragment from logcat - does this mean that my proximity sensor pisses on your app's request? Why app does not report it back to me?

I/DHD Proximity Recalibrator( 2159): loading values: 5 6

I/DHD Proximity Recalibrator( 2159): Calibration: applying: 5 6

I/DHD Proximity Recalibrator( 2159): Writing to ps_kadc: 0x50530506 0xfeff0506

E/DHD Proximity Recalibrator( 2159): Error when writing to ps_kadc

E/DHD Proximity Recalibrator( 2159): java.io.FileNotFoundException: /sys/devices/virtual/optical_sensors/proximity/ps_kadc (Permission denied)

E/DHD Proximity Recalibrator( 2159): at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)

E/DHD Proximity Recalibrator( 2159): at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)

E/DHD Proximity Recalibrator( 2159): at java.io.FileOutputStream.<init>(FileOutputStream.java:94)

E/DHD Proximity Recalibrator( 2159): at java.io.FileOutputStream.<init>(FileOutputStream.java:66)

E/DHD Proximity Recalibrator( 2159): at java.io.FileWriter.<init>(FileWriter.java:80)

E/DHD Proximity Recalibrator( 2159): at com.leppie.dhd.Calibration.apply(PSCalibrator.java:84)

E/DHD Proximity Recalibrator( 2159): at com.leppie.dhd.Calibration.applyAndNotify(PSCalibrator.java:101)

E/DHD Proximity Recalibrator( 2159): at com.leppie.dhd.Calibration.applySaved(PSCalibrator.java:115)

E/DHD Proximity Recalibrator( 2159): at com.leppie.dhd.Receiver.onReceive(Receiver.java:22)

E/DHD Proximity Recalibrator( 2159): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2103)

E/DHD Proximity Recalibrator( 2159): at android.app.ActivityThread.access$2400(ActivityThread.java:135)

E/DHD Proximity Recalibrator( 2159): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1114)

E/DHD Proximity Recalibrator( 2159): at android.os.Handler.dispatchMessage(Handler.java:99)

E/DHD Proximity Recalibrator( 2159): at android.os.Looper.loop(Looper.java:150)

E/DHD Proximity Recalibrator( 2159): at android.app.ActivityThread.main(ActivityThread.java:4389)

E/DHD Proximity Recalibrator( 2159): at java.lang.reflect.Method.invokeNative(Native Method)

E/DHD Proximity Recalibrator( 2159): at java.lang.reflect.Method.invoke(Method.java:507)

E/DHD Proximity Recalibrator( 2159): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)

E/DHD Proximity Recalibrator( 2159): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)

E/DHD Proximity Recalibrator( 2159): at dalvik.system.NativeStart.main(Native Method)

The file is like:

# ls -a -l /sys/devices/virtual/optical_sensors/proximity/ps_kadc

-rw-rw-r-- system system 4096 2012-05-27 16:30 ps_kadc

#

See no point for permission denied, root granted.

[edit]

Or maybe not - it seems Superuser apk "forgot" the setting (sigh!), but still, app should report this, as a notification probably

[edit]

After explicit superuser rights granting and reboot, message still present. What's goin on?

[edit - last]

Confirmed - everytime I reboot the phone, application does NOT set the proximity. I can detect this entering the GUI where app says 0-255 instead of 5-6. Then when set it to 5-6 adn exit the app, entering again gives 5-6, so then it's set.

Seems like service has not root privileges and app itself has. Tell me what to do to help you with debug.