Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,460 Members 40,196 Now Online
XDA Developers Android and Mobile Development Forum

My Proximity Sensor woes

Tip us?
 
EpicMango
Old
(Last edited by EpicMango; 15th January 2014 at 02:54 AM.)
#1  
Senior Member - OP
Thanks Meter 24
Posts: 168
Join Date: May 2013
Default My Proximity Sensor woes

I had to flash back to GoldenEye 4.3 to get my dialer back! After I flashed ASOP (or any non touchwiz based ROMs) I had a bug where I couldn't turn my screen back on during a call...

It was extremely annoying but the ROM's that I were running were so good that I tolerated it. Well today I decided I couldn't let my phone not be a phone. I have this problem with

Kangakat 5 Stock Kernel
KangaKat 6 Stock Kernel AND Ktoonsez's kernel
CM11 with stock kernel
CM10.2 with stock kernel
Danvdh's ASOP 4.4.2 ROM with stock kernel

None of these work. Its still the same call bug.

I've tried proximity sensor recalibration. Didn't work. I've tried compressed air. Didn't work. Nothing has worked.

Finally I HAD to go back to debloated TW GoldenEye 4.3 which I am on right now, and it doesn't work. Proximity sensor is enabled in settings but when I pull my phone away from my head the screen doesn't turn on! However I can atleast access my dialer so atleast I can use my phone as a freaking phone!!!!

I typed *#0*# and went to the test area and went under sensor and my proximity sensor will have a value of 69 until something gets in its way and then quickly max out at 255...but I noticed also that the farther my finger goes the lower the number gets so it seems like its doing its job correctly. However the screen is always green and always vibrating. It never stops...

Guys. I can't stand 4.3 debloated. Once you've run KitKat you can't go back. Do you guys have ANY last ditch efforts on how I can fix this? Maybe even just disable the proximity sensor when I flash a ROM? I just hate Touchwiz. Been flashing 300MB ROM's and had to flash a 1.4GB ROM today which is just stupid...

please please help..
 
saj222
Old
#2  
saj222's Avatar
Senior Member
Thanks Meter 126
Posts: 612
Join Date: Apr 2010
Location: Greater Vancouver Area, British Columbia
Quote:
Originally Posted by EpicMango View Post

I've tried proximity sensor recalibration. Didn't work. I've tried compressed air. Didn't work. Nothing has worked.
Do you still have a warranty? Go back to stock and make a claim.
Current: Samsung Galaxy S4
Current: Sony Xperia Tablet Z (32 GB)
Old: Samsung Galaxy S3, HTC Hero
 
azuziel
Old
#3  
Senior Member
Thanks Meter 71
Posts: 250
Join Date: Nov 2013
Quote:
Originally Posted by EpicMango View Post
I had to flash back to GoldenEye 4.3 to get my dialer back! After I flashed ASOP (or any non touchwiz based ROMs) I had a bug where I couldn't turn my screen back on during a call...

It was extremely annoying but the ROM's that I were running were so good that I tolerated it. Well today I decided I couldn't let my phone not be a phone. I have this problem with

Kangakat 5 Stock Kernel
KangaKat 6 Stock Kernel AND Ktoonsez's kernel
CM11 with stock kernel
CM10.2 with stock kernel
Danvdh's ASOP 4.4.2 ROM with stock kernel

None of these work. Its still the same call bug.

I've tried proximity sensor recalibration. Didn't work. I've tried compressed air. Didn't work. Nothing has worked.

Finally I HAD to go back to debloated TW GoldenEye 4.3 which I am on right now, and it doesn't work. Proximity sensor is enabled in settings but when I pull my phone away from my head the screen doesn't turn on! However I can atleast access my dialer so atleast I can use my phone as a freaking phone!!!!

I typed *#0*# and went to the test area and went under sensor and my proximity sensor will have a value of 69 until something gets in its way and then quickly max out at 255...but I noticed also that the farther my finger goes the lower the number gets so it seems like its doing its job correctly. However the screen is always green and always vibrating. It never stops...

Guys. I can't stand 4.3 debloated. Once you've run KitKat you can't go back. Do you guys have ANY last ditch efforts on how I can fix this? Maybe even just disable the proximity sensor when I flash a ROM? I just hate Touchwiz. Been flashing 300MB ROM's and had to flash a 1.4GB ROM today which is just stupid...

please please help..
I had the same bug. Have you wiped? I ran kitkat, and after many bugs like the one you're describing, wifi disconnects and app errors I went back to 4.3 stock. Debloated, and run nova prime with kiatkat theme. Looks like kitkat, feels like kitkat, but I don't have any bugs.
 
EpicMango
Old
#4  
Senior Member - OP
Thanks Meter 24
Posts: 168
Join Date: May 2013
I should've update this thread...I FOUND A SOLUTION! It basically forces a new value for the sensor to pick stuff up on!

I'm now back on optimized 4.4 KK with GravityBox and I hold the perfect phone in my hand ATM

Here is the solution

http://forum.xda-developers.com/show...2045569&page=4

Quote:
Methods that worked for me.
Method 1.
Blow Air it will solve your prob hopefully.

Method 2.
go to samsung code *#0*#. then SENSORS and Read your Proximity sensor values.

<<< DECISION >>>>>
####Calibration isnot needed if ####
.
your phone doesnt vibrate in normal but does so when u physically put your finger on the Sensor.

#### Calibration needed if ####
.
your phone is vibrating in this menu no matter what, you put your finger on the sensor or not
Follow these steps
1. download Android Terminal from store
2. type these commands to calibrate automatically
$ su
# echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
# echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal

Reboot and see if it works.go to *#0*# and check if it continuously vibrating or only does so when you put your finger on the SENSOR.

<<<< IF Continuously Vibrating Follow these steps>>>>

you need to manually put values in ur /efs/prox_cal.it Reads Hexadecimal value. so you have to convert your decimal values into HEX.

##### FIND YOUR Decimal Values and pushing them into /efs/prox_cal ######

Method : finding two values for calibration . offset + normal value.
##.. FINDING OFFSET ######
cat /sys/devices/virtual/sensors/proximity_sensor/prox_cal

note down the values it returns.. mine is 5,64,100.. you only need the 1st value which is 5.
### FINDING NORMAL STATE ######

cat /sys/devices/virtual/sensors/proximity_sensor/state
note down the value if returns. mine is 64

now ADD OFFSET value + Normal Value
5 + 64 = 69
Convert in Hexadecimal which is 45.

<<<<<<<<<<< Pushing the value in /efs/prox_cal >>>>>>>>>>>>>>

# echo -en $ '\x45' > /efs/prox_cal

then
# chown system:system /efs/prox_cal
# chmod 644 /efs/prox_cal
# sync
# Reboot

All done. after that go to *#0*# then SENSORS and move your finger on the sensor, your phone will Vibrate only when you put your finger on the sensors.

Manual method worked for me.
ENJOY.

Those instructions will sound confusing to you, but if you read the entire thread and get an idea of what they are talking about then you'll understand! It worked for me! And I'm positive it will work for you to!!

It turned out that my proximity sensor was always on! If you type in *#0*# into the stock dialer you'll bring up diagnostics. Go to sensor. What should happen is when you wave your hand near the sensor the screen should turn green and vibrate. If you are always vibrating regardless (my situation) that means your proximity sensor is always on and you have to hard calibrate it.

I'm thinking of doing a full writeup for this so others can fix this issue! I have no problems now!!! So Happy to report this!
The Following User Says Thank You to EpicMango For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes