yashsingh1/xdaforums huggingface dataset:
[HTC Sensation] dupsatou:
This suddenly happened to me while running ViperSs 1.0.1. I had been using this rom since it was released and never had a problem until the last few days. I was worried I busted my phone when I dropped it the other day. I tried the steps in the first post on my TMOUS Sensation 4G and flashed the Stock ICS ROM released, NOT the RUU, but the completely stock version that was flashable and released on here. It worked perfectly. Didn't have to change firmware or anything else.

Thanks!
[HTC Sensation] Sirgeekalot:
dont suppose you have a mirror of the file? the link to the file on android revolution is dead..
[HTC Sensation] dupsatou:
Providing a download to the ROM I flashed. I believe this was provided by Steve0007 originally as a leaked TMOUS ICS for our phones. I don't remember if it has root or not as I didn't hang out in it long enough to find out. For me though this didn't end up permanently solving my problem has it keeps occurring no matter which rom I change to. I might have a hardware issue myself now :-/

https://www.dropbox.com/sh/00azy1oo134smiv/NCZBkUces5

MD5 (Sensation_3.32.531.14.zip) = f8bce967a968cae1c9bb271c793e13ea
[HTC Sensation] craven667:
Mine locks up and wont work so i start playing with phone get it to work then it dose it again no clue whats doing it
[HTC Sensation] Neutrino22:
Proximity/Light Sensor

Proximity/Light Sensor not working for me either.:(

Hboot 1.27

HTC Sensation

Cyanogen 9

Unlocked via HTCdev method
[HTC Sensation] Sirgeekalot:
i've been reading through a few threads, specifically one on the One X section Here about how their Hboot versions may have crippled the Device?

i'm curerntly on 1.29, but have tried going back to 1.18 and may try several others.. Would HTC Cripple the device on purpose if we went S-OFF and changed Hboots?
[HTC Sensation] Wagedroid:
I had a problem with these sensors also. Here's what I discovered over the months...

With root explorer go to sys/devices/virtual and you should see a folder called "optical sensors" these are the proximity and light sensor values.. you can edit them here but they should already be working if the folder is there. Now here is where it gets a bit weird. If the folder optical sensors isn't there, chances are you don't have a working proximity. Here's a trick that's always worked for me.

Turn sensation off completely. With thumb or finger cover the proximity and light sensor (top left corner of screen) and boot phone. Keep the sensors covered till phone completely boots. Sensors should be active now. If you didn't have the optical sensors folder, you do now. I know its weird but it always worked for me and I never had to flash, also fixing permissions help. There's also a script, just google proximity sensor fix script and you'll find the init.d script. Which sets custom values to set every boot.

Seems that when you boot the sensation in a dark "room" the sensors are active and "look" for light.

Works for me, hope this helps.. I was at this for monthhhhsssss and saw this thread now so just thought I'd add my findings.

Edit: I've had this problem with any ROM sense or no sense ever since the official ICS update. This is what always fixed it for me.
[HTC Sensation] pepetrovski:
Problem not only with custom ROMs

Hi guys!

I had the HTC working on the factory default rom, just being updated with the newest versions (up till 4.0.1 or .3). It was working even on the newest, up until few weeks ago.

I thought it was a software problem/interference with the MX Player, because the older versions of it started to have a problem with the sensitive buttons' light. It wasn't able to turn them off.

However the screen itself was working fine with the ambient sensor, just one problem was when the camera was on and I tapped on Gallery, the screen's light was going to the lowest level. I almost couldn't see anything.

So I thought that it would be nice for the speed and overall work of the phone to have a custom ROM installed, instead of factory reset. This however didn't fix the issue, the screen is still on while talking/dialing.

So are there any fixes that will work for sure and forever?

Thanks in advance!
[HTC Sensation] kgs1992:
Sorry, ignore this post.
[HTC Sensation] sweetsteal:
OK so I'm no expert and pretty much can never contribute significantly to the forum. However, I found the solution to my problem and although it is kind of obvious maybe one or two of you have my issue to...

So I was always cleaning my sensor from the outside and noticing slight improvement to my sensor. Then I realized that our phone has an inner case... so I took my phone out of its shell and tested my sensor...it immediately worked! I then proceeded to clean the inside of the shell and all areas of phone while I was at it with q-tips and a little rubbing alcohol..... my sensors work awesome!!!! Please let me know if my simple fix help you out....I realize our phone is unique in its design perhaps that's why we are having more issues the. Everyone else.
[HTC Sensation] pepetrovski:
I thought this will help also, and I started cleaning it after it failed with the roms. Cleaned with alcohol, blew into it, nothing helped.

As with one of the newer custom and stock ROMs it didn't work, I started to read around so I can downgrade my phone.

Using the link:

http://xdaforums.com/showthread.php?t=1672425 (I hit thanks btw :))

I started setting up my phone for the stock ROM.

First I found out that the CID is HTC__032 and I looked for RUUs on:

http://www.persianhtc.net/index.php?dir=Sensation(Pyramid)/rom/original/

and:

http://www.shipped-roms.com/index.php?category=android&model=Pyramid

.

Started with RUU_Pyramid_HTC_Europe_1.27.401.3_Radio_10.42.9007.00P_10.11.9007.15_M_release_192183_signed. It worked just fine, started the system and the screen was turning off while calling again! :highfive:

- Android version 2.3.x

- Sense version 3.0

* Tried to make software update from the phone's manu, nothing was found.

Then I downloaded the RUU_Pyramid_HTC_Europe_1.50.401.1_Radio_10.56.9035.00U_10.14.9035.01_M_release_223042_signed. It also worked just fine! :D

- Android version 2.3.4

- Sense version 3.0

* Tried to do software update, found the 4.0 version.

I installed it, doesn't work anymore. Downgraded, made super wipe, installed diff. roms, still it is not working properly. In the end I decided to return it back as its under warranty and as I tried several settings/reboots I found out that in some cases after a reboot the sensors work, then reboot it again - doesn't work. It goes like this with each reboot, sometimes work, sometimes not. So I don't know now if returning it can help, as they may say that it is working.

So for now it is on the stock ROM, with S-ON, and I plan to go to the shop these days. This is really frustrating. Why HTC didn't produce any fix for this? It looks like it is a software fault.

Anyone any news or tricks for this?

Thanks again!
[HTC Sensation] Keioboy:
Can someone make a script to create optical_sensors folder in sys/devices/virtual that we can flash in recovery? The absense of that folder is a main problem. When i try to create a folder in "virtual" directory it doesn't allow. Please devs help us.
[HTC Sensation] DennisBold:
Using an init.d script to create the directory and files does not solve the problem. It simply deals with the symptoms; the absence of the needed directories and files. I'll hack together an init.d script for you to test when I get home, but I can't guarantee it'll solve your problem.

Also, just 'cause. Can you tell me your HBOOT version and firmware?

Sent from my HTC
[HTC Sensation] Keioboy:
First of all thanx. I think we need to copy optical_sensors folder and do not allow android to erase it. My firmware is 3.33 and hboot is 1.27.1100. Thanx in advance.
[HTC Sensation] berilslv:
can some1 give us working optical_sensors map ? and which one i need to replace ? TY

Faithfully ,Berils.
[HTC Sensation] DennisBold:
I don't think android is creating the folders and files to begin with.

You'll need to remove the file extension as XDA doesn't allow me to upload a file without one. You can use the commands below to do it.

Also, I can't guarantee these will even work, grab a logcat on reboot.

adb root
adb push 01proximity.txt /system/etc/init.d/
adb push 02light.txt /system/etc/init.d/
adb shell
mv /system/etc/init.d/01proximity.txt /system/etc/init.d/01proximity
mv /system/etc/init.d/01light /system/etc/init.d/02light
exit
[HTC Sensation] Keioboy:
Copied both files into init.d folder and after reboot there aren't optical_sensors directory :(. How can I get a logcat?. I think android doesn't allow data be written in "virtual" forlder. May be it can be done through recovery?
[HTC Sensation] DennisBold:
It's probably not letting it write as you said.

Android creates the /sys/ directory on boot. It's the bridge between the kernel and the Android OS.

Try taking off the back cover and cleaning away any dust on the sensor. Then booting with your hand or finger covering the sensor. Also make sure you've got the appropriate Google Apps package flashed (directly after flashing the ROM) as setupwizard.apk plays a large role.

Sent from my HTC
[HTC Sensation] Keioboy:
Nothing helps. Nor covering sensors, nor cleaning them :(. Anyway thanx for help bro.
[HTC Sensation] DennisBold:
Worth a try. I am collecting some data so can I get your CID and MID?

Sent from my HTC
[HTC Sensation] Eezay:
Hi guys,

my light and/or proximity sensor doesn't seem to work. Nor does the screen turn off when calling neither does auto brightness work correctly...

I have cleaned my device but still no change :(
[HTC Sensation] DennisBold:
Can I have your HBOOT, Firmware, CID and MID?
[HTC Sensation] Keioboy:
I's S-OFF, boot is unlocked, latest firmware 3.33 and radio is 11.29A.3504.18M, HBOOT - 1.27.1100. My CID is SuperCID and my MID is PG5812000. Waiting good news :)
[HTC Sensation] Eezay:
HBOOT 1.27

Firmware 3.33

CID HTC_102

MID PG5813000

and of course S-Off and unlocked bootloader

I hope i'm right with MID... i've used CID getter to display it.
[HTC Sensation] DennisBold:
I think I've got an idea of what's causing it.

If you're both S-OFF and don't mind changing your CID, downgrading and then updating firmware again. Can you try the following.

1. First change the CID, from within the ROM with USB debugging enabled write this:

adb reboot bootloader
fastboot oem writecid HTC__001

2. Find and download a Gingerbread RUU for HTC Europe such as:

http://www.androidfiles.org/ruu/get...00U_10.14.9035.01_M_release_223042_signed.exe

3. While still in fastboot [MAKE SURE YOU'RE S-OFF] run the RUU and let it flash the stock Gingerbread HBOOT and ROM.

4. You should be completely stock now with HBOOT 1.18. We're not going to S-ON.

5. Turn off the phone and hold down Volume Minus and Power together to reboot into bootloader. Use the volume buttons to highlight fastboot and press power to select it.

6. I've attached 4EXT recovery. Extract it and place the file in your ADB folder. Then run the following;

fastboot flash recovery recovery.img

7. Update HBOOT and firmware using this: http://d-h.st/SuC

8. Flash ROM of your choice.

9. Check '/sys/devices/virtual/optical_sensors/'

10. Report back
[HTC Sensation] Eezay:
[MENTION=1989838]Keioboy[/MENTION]: Can you try this first? :p

haha joking, I'm downloading Ruu now...

Will report later...

What do you mean by "check /sys/virtual/optical_sensors/"?

Shall I write down the files that folder conatins?
[HTC Sensation] Keioboy:
I'll try and report tomorrow guys. It's late night already here. :)
[HTC Sensation] DennisBold:
Tell me if it's there and what folders are inside. You should see proximity and lightsensor.
[HTC Sensation] Eezay:
I've done everything you said. There is no "sys/virtual/" folder

Edit: My screen now turns off when calling! :)
[HTC Sensation] DennisBold:
I may have gotten the path wrong.

Try, /sys/devices/virtual/optical_sensors/

The files should definitely be there if your proximity sensor is working.

I recommend downloading Root Browser Lite from the Play Store as its the best app for directory browsing and simple file manipulation.

Sent from my HTC
[HTC Sensation] Eezay:
ES File Explorer is included in the rom I use. It works fine for me as I'm not manipulating files so often...

THAT folder indeed exists. It contains two other folders "lightsensor" and "proximity". Both contain two folders and several files. Do you want me to upload screenshots?

All sensors seem to work now. Big thanks man!
[HTC Sensation] DennisBold:
Nope. I just needed you to verify the folders exist. Congrats! You've just fixed your proximity and light sensor.

I'm used to giving instructions on editing files via Root Browser Lite, I always ask friends to download it. I guess it's an old habit I have to kill. Anyway, glad to hear it worked out.

Sent from my HTC
[HTC Sensation] Eezay:
Just rebooted and the sensors don't work anymore and the "optical_sensors" folder has gone...
[HTC Sensation] DennisBold:
What ROM are you using?

Sent from my HTC
[HTC Sensation] Eezay:
Inspiration Rom 1.0.1 as stated in my signature. Without any mods.

But this problem also occured with several aosp roms
[HTC Sensation] DennisBold:
Are you flashing a custom kernel or using the kernel provided with the ROM?

Also, can you wipe data, dalvik and cache. Then check if the files are there?

Sent from my HTC
[HTC Sensation] Eezay:
This time i'm using the kernel provided by the rom. It's bricked v1.4. I tried Sultan Kernel in earlier Version and in combination with ViperS 1.6.3 rom and had the same problem
[HTC Sensation] DennisBold:
Can you reflash the ROM but this time avoid installing any applications?

Sent from my HTC
[HTC Sensation] Eezay:
Do you mean apps from google play? Sure
[HTC Sensation] DennisBold:
Thanks. I have the same firmware, model id and HBOOT; both sensors work fine for me so I can only put it down to something on the ROM, cached Android files or hardware failure.

Sent from my HTC
[HTC Sensation] Eezay:
So i did a full wipe and flashed the rom again. No apps installed, no reboots, even no google account connected. Sensors don't work and no "optical_sensors" folder
[HTC Sensation] DennisBold:
Makes very little sense to me. Try flashing 3.32 firmware?

Sent from my HTC
[HTC Sensation] Eezay:
Maybe it's because i selected some apps to not install in Aroma?
[HTC Sensation] DennisBold:
I doubt it would make much difference, but it's something to try. What apps did you remove?

Sent from my HTC
[HTC Sensation] Eezay:
I removed Flick, Twitter, Picasa, Google News, HTC -Location, -Watch, -Notes, -Mail, -Task, -Stocks, -Skydrive, -Hub and Sim Tool Kit.

Now flashing without removing any.

If this doesn't help I'll flash 3.32 firmware. But I remember having working sensors weeks after flashing 3.33 firmware
[HTC Sensation] DennisBold:
None of those should cause any problems.

Can you try a completely clean install of a CyanogenMod or Jellybean 4.2.2 ROM with Google Apps. That means wipe SD Card if you're willing to, and all partitions. 3.33 should work fine. Can I ask how you achieved S-OFF? And if you can post the result of

fastboot getvar carrier

Sent from my HTC
[HTC Sensation] Eezay:
fastboot getvar carrier failed (unknown command)

I got S-Off long time ago. Hboot 1.27 has been new to that day and there was only one way to s-off the device. Something like Jopunutbeat
[HTC Sensation] DennisBold:
Thanks, I'm trying to find a common link.

Try a complete wipe (SDCard, All partitions, file system check via 4EXT and so on), and an AOSP based ROM with Google Apps.

I'm sorry but I need to leave right now, so I'll check back later. Let me know how it goes!

Sent from my HTC
[HTC Sensation] Eezay:
Have done everything. Formatted everything, installed cm 10.1 with gapps. But no "optical_sensors" folder and no working sensors.

Edit: lol, rebooted the device, changed brightness and now sensors work and folder was created:silly:

Edit2: And sensors are again not working -.-

No reboot, just didn't touch the device overnight
[HTC Sensation] Keioboy:
I think it's time to throw away our devices. :)
[HTC Sensation] Eezay:
nooooooo only two more months till my contract expires and I can finally get an htc one. Don't die senny, not yet :silly:
[HTC Sensation] DennisBold:
Gah! Can you give me your proximity and light sensor vendors?

Open Kernel Tuner, click 'Sys. Info', click 'Sensors' and scroll down to Light and Proximity.

For instance, mine is:

CM3602 Light Sensor
Version: 1
Vendor: Capella Microsystems
Type: TYPE_LIGHT
MaxRange: 10240.0
Resolution: 1.00000
Power: 0.5mA

CM3602 Proximity Sensor
Version: 1
Vendor: Capella Microsystems
MaxRange: 9.0
Resolution: 9.00000
Power: 0.5mA

:rolleyes: Trade in sounds better. I'm still intrigued by it, so I hope I find something useful.
[HTC Sensation] Keioboy:
I've checked them. They're same as yours.

LIGHT

CM3602 Light Sensor

Version: 1

Vendor: Capella Microsystems

Type: TYPE_LIGHT

MaxRange: 10240.0

Resolution: 1.00000

Power: 0.5mA

PROXIMITY

CM3602 Proximity Sensor

Version: 1

Vendor: Capella Microsystems

Type: TYPE_PROXIMITY

MaxRange: 9.0

Resolution: 9.00000

Power: 0.5mA
[HTC Sensation] DennisBold:
Can you flash the latest ICS RUU and 4EXT recovery ?
[HTC Sensation] Keioboy:
OK. I have RUU_PYRAMID_LE_ICS_35_S_HTC_Europe_3.33.401.153_Radio_11.76A.3504.00U_11.24A.3504.31_M_release_281004_signed.exe. Give me about 30 min.
[HTC Sensation] Eezay:
Mine are exactly the same
[HTC Sensation] DennisBold:
Thanks, if it doesn't work it's mostly likely a hardware problem.

Although, I'd like to believe it's firmware.
[HTC Sensation] Keioboy:
Just reinstalled a system both sensors working till now.
[HTC Sensation] DennisBold:
Just to clarify.

Working till now; so was working but stopped working?
[HTC Sensation] Eezay:
I think he means still working.

Try rebooting and look if sensors still work.

If they work I'll try it out, too.

What Rom have you flashed?
[HTC Sensation] Keioboy:
Just stopped working right now. I think it's hardware problem.
[HTC Sensation] DennisBold:
An RUU:

RUU_PYRAMID_LE_ICS_35_S_HTC_Europe_3.33.401.153_Ra dio_11.76A.3504.00U_11.24A.3504.31_M_release_28100 4_signed.exe

You can flash the same if you're using an XE model, else you might want to look for an RUU without LE in the name.
[HTC Sensation] Eezay:
:(

why the **** do they act like that every time?

this can't be a hardware issue if they work at the beginning :eek:. Maybe we should change permissions to that "optical_sensors" folder so that the rom can't delete it by itself? Is this possible? I mean to force them to work
[HTC Sensation] DennisBold:
I agree that it can't be hardware. The ROM creates and changes owner on the files at boot, blocking permissions will work until reboot when the phones recreates the directory or, doesn't recreate the directory.

With kernel tuner, can you tell me the status of the sensors?
[HTC Sensation] Wagedroid:
I've said this before. The sensors go missing on a reboot. This is not a ROM related problem. Whenever you boot your phone just cover the sensors with your thumb so they are active. Weird and unorthodox but it works.

Edit : this has been a problem on sensation since upgrading to ICS.
[HTC Sensation] DennisBold:
That doesn't work for everyone.

To be honest, I'm more interested in why it happens and what causes it. Treating the symptoms doesn't cure the problem; or simply put if you reboot without covering the sensor, it won't work.
[HTC Sensation] Wagedroid:
Absolutely. I'm only giving a remedy for users, this is no way a fix. To know what's really causing it would help to find a fix but honestly, I think its HTC related. The folders will not be included at boot if the sensors aren't active. I did months of research before finally contacting HTC for them to tell me "sorry, there's nothing we can do about it if its not hardware related"
[HTC Sensation] Eezay:
doesn't work for me... :(
[HTC Sensation] Wagedroid:
It always works for me. When the bootanimation gives that haptic vibration I uncover the sensors and I can see it glowing red meaning its active.

I've become so accustomed to the proximity sensor being faulty that I use the power button to shut the screen off for calls. Sucks.
[HTC Sensation] Eezay:
No chance... do you have quickstart enabled and auto brightness on when you reboot your device?
[HTC Sensation] Wagedroid:
You mean fastboot? I use aosp.

I use the notification slider. Auto brightness kills my battery
[HTC Sensation] Eezay:
ah ok. Have covered them like you said but they don't want to work. cm brightness control is a cool feature which my rom apparently hasn't...
[HTC Sensation] Wagedroid:
Try doing the opposite. I know it sounds foolish but its worth a shot. Turn off fast boot and try again if you did that then try booting with a light shining on the sensors
[HTC Sensation] Eezay:
doesn't change anything
[HTC Sensation] Wagedroid:
Is pocket mode and fast boot disabled?
[HTC Sensation] Eezay:
Fastboot is off and pocket mode is on.

Rebooting again with pocket mode off

Edit: same result
[HTC Sensation] Wagedroid:
Turn pocket mode off. Power down and pull battery. Wait 30 seconds then power back on. Report back please

---------- Post added at 01:04 PM ---------- Previous post was at 01:01 PM ----------

If all else fails then just flash this .

http://db.tt/LPykRBuC
[HTC Sensation] DennisBold:
Yeah I wouldn't bother contacting them unless it's for repairs; even then they're less than helpful. HTC are useless with updates and support. I'm rebuilding proprietary libs from dumped assembly code, it's a lot more useful and a helluva lot more friendly than HTC are.

I've ruled out a few things and I'm leaning towards kernel now. I need dmesgs and logcats from devices with the issue.

---------- Post added at 06:10 PM ---------- Previous post was at 06:09 PM ----------

Glowing red?
[HTC Sensation] Eezay:
Did that, Put my thumb on sensors at boot. Still the same problem
[HTC Sensation] Wagedroid:
Yes the sensor gives a red glow when its working.
[HTC Sensation] Keioboy:
Nothing helps. Tried everything. Will try to flash your fix. Will it work on sense rom?
[HTC Sensation] Wagedroid:
Did you flash the zip?
[HTC Sensation] DennisBold:
Can you restart while running this command?

adb shell dmesg > dmesg.txt

And upload dmesg.txt?
[HTC Sensation] Wagedroid:
In terminal emulator :

su

echo 0x0a0f 0x140b6050 > /sys/devices/virtual/optical_sensors/proximity/ps_kadc

That's the command to calibrate proximity .. Figured it would be helpful if you want log cats of when it actually fails. Best of luck.
[HTC Sensation] DennisBold:
On the Sensation? No. It doesn't.

---------- Post added at 06:23 PM ---------- Previous post was at 06:18 PM ----------

Thanks, tried including it as an init.d script on my ROM a few builds back as someone was having proximity issues (which is why I'm trying to figure this out). It didn't work. I haven't had issues on my phone which is why I'm looking for a common cause between variations of the phone.
[HTC Sensation] Wagedroid:
When my sensor is active the left top corner above the HTC logo glows red.
[HTC Sensation] DennisBold:
Some builds blink the LED once to show a successful boot (ViperS 3). Doesn't indicate anything to do with the proximity sensor I'm afraid.

A quick way to test is to enable auto brightness and cover the proximity sensor with your finger. Place your phone under a lamp or a bright light and remove your finger. If the screen goes from dim to bright, you have a working proximity sensor and light sensor. If not, they're malfunctioning.
[HTC Sensation] Wagedroid:
Sorry but that's not what I'm referring to. I know what you're talking about though because even cm blinks the LED but the led is behind the speaker grill. I'm sure I know the difference. I also test the proximity by calling my voicemail and hovering my hand over the sensor.
[HTC Sensation] DennisBold:
The light/proximity sensor doesn't glow at all. It shouldn't glow. My proximity sensor works, and it definitely doesn't glow during boot.
[HTC Sensation] Eezay:
sure
[HTC Sensation] Wagedroid:
Yeah it does. Its common with lots of phones and I'm not the only one

http://xdaforums.com/showthread.php?t=1577786
[HTC Sensation] Eezay:
What zip do you mean?