[Android Q&A, Help & Troubleshooting] pallzoltan:
Hello fellow Androiders.

I have an HTC Desire for about a year and a half, and over the weekend, during snowboarding it got wet in my pocket (found a snowball in there, next to it!). I checked it, it was switched off. After returning home, i dried it and switched it back on, but it wouldn't boot the system, so i reflashed it (with sandvold.as' ICS). Seemed to work fine after formatting all mounts, except for one thing: the screen wouldn't switch off:

When i pressed the power button, the screen would switch off for much less than a second and instantly pop back with the lock screen, as if i hit the power button again. If i disable the lockscreen, it jumps back to the previous activity and instantly acts as if the volume down button was pressed.

So i started looking for what the problem could be, found a tip to play around with /system/usr/keylayout/bravo-keypad.kl

It seemed to help after i removed the WAKE from next to the volume keys, but instead of switching back on straight away, it reboots after one second (i can see the charging LED stops shining after 1 sec).

Despite of installing new ROM, this behavior stayed. I am now running the latest Oxygen.

I did an "adb logcat" (through adbWireless) and here's the output, with comments:

D/jdwp ( 273): adbd disconnected
D/jdwp ( 638): adbd disconnected
D/su ( 716): 10045 siir.es.adbWireless executing 0 /system/bin/sh using shell /system/bin/sh :
sh
D/jdwp ( 321): adbd disconnected
D/jdwp ( 220): adbd disconnected
D/jdwp ( 610): adbd disconnected
W/InputManagerService( 140): Window already focused, ignoring focus gain of: com.android.internal.v
iew.IInputMethodClient$Stub$Proxy@408916e0
D/dalvikvm( 623): GC_EXPLICIT freed 338K, 50% free 2855K/5639K, external 1690K/2137K, paused 47ms
I/power ( 140): *** set_screen_state 0
I/power ( 140): *** set_screen_state 1
D/dalvikvm( 140): GC_EXTERNAL_ALLOC freed 1021K, 42% free 5357K/9223K, external 5185K/5259K, paused
62ms
D/SurfaceFlinger( 140): About to give-up screen, flinger = 0x8ec90
D/SurfaceFlinger( 140): Screen about to return, flinger = 0x8ec90
D/AK8973 ( 120): Compass CLOSE [COLOR="Red"]// At this point somewhere the screen turned off, and instantly comes back on. I find the compass CLOSE/Start statechange a little weird. This causing the problem would make sense, since it could have been physically damaged[/COLOR]
D/AK8973 ( 120): Compass Start
W/InputManagerService( 140): Starting input on non-focused client android.view.inputmethod.InputMet
hodManager$1@405a7128 (uid=1000 pid=140)
I/power ( 140): *** set_screen_state 0
D/SurfaceFlinger( 140): About to give-up screen, flinger = 0x8ec90
D/AK8973 ( 120): Compass CLOSE [COLOR="red"]// Here i hit the power button again. This time the screen stays black and doesn't come back on. Pressing the power button again (in hope of bringing the screen back), restarts the device after one second. This is the end of output[/COLOR]

Does anyone have any idea what to do next? :) Easiest would be to move on, get a new device, but there's something I love about bringing back a device from the dead. I appreciate any ideas.

Thanks,

Z.

PS: does anyone know if i could disable the compass on low-level? I suppose that would require a new kernel (?)