Proximity Sensor Bug Fixed, .Screen turns off during call.ISSUE FIXED

Search This thread

Ammar Saood

Senior Member
Jan 23, 2012
118
114
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.
NOTE: sometimes normal value is 0, its OK you do you math and convert 1st OFFSET into hex. using lower case for Hex values in steps below.
<<<<<<<<<<< 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, yout phone will Vibrate only when you put your finger on the sensors.

Manual method worked for me.
ENJOY.
NOTE: I am not a developer. i was just stuck with this problem for so long so now i found it from "mcelicalderon". who posted this method some where
 

Attachments

  • Calibrationjpg_Page1.jpg
    Calibrationjpg_Page1.jpg
    96.2 KB · Views: 25,729
  • Calibrationjpg_Page2.jpg
    Calibrationjpg_Page2.jpg
    32.8 KB · Views: 23,180
Last edited:

i_fain

Senior Member
Apr 18, 2011
59
23
Lahore
just the leak release from samsung 4.4.2 the last one 2 january 2014

Yes, I have that, please tell me if there is anything not working that you have noticed. One more thing did you wipe data or apps remains working after install?

Sent from my GT-I9505 using Tapatalk
 

EclipseX

Senior Member
May 29, 2007
3,058
281
Quinta do Conde
I came from 4.3 stock

Install via Odin without wipe.....after install I've wipe the dalvik cache

I have only one complain...the taskmanager don't work propretly

Everything else work like a charm

Yes, I have that, please tell me if there is anything not working that you have noticed. One more thing did you wipe data or apps remains working after install?

Sent from my GT-I9505 using Tapatalk
 
  • Like
Reactions: i_fain

0ptimus82

Senior Member
Oct 7, 2010
143
11
Cali
10 Million thanks for this!!!

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, yout phone will Vibrate only when you put your finger on the sensors.

Manual method worked for me.
ENJOY.
NOTE: I am not a developer. i was just stuck with this problem for so long so now i found it from "mcelicalderon". who posted this method some where

10 million thanks for this!!!, I´d say you were sent by an angel, I was looking for my opperator's stock ROM to flash it and ask for warranty because of this problem and I accidentally found your thread. The manual method worked perfectly.

Now one question: Is it necessary to follow this procedure each time I install a new rom?
 
  • Like
Reactions: rludlam1

Ammar Saood

Senior Member
Jan 23, 2012
118
114
10 million thanks for this!!!, I´d say you were sent by an angel, I was looking for my opperator's stock ROM to flash it and ask for warranty because of this problem and I accidentally found your thread. The manual method worked perfectly.

Now one question: Is it necessary to follow this procedure each time I install a new rom?


Thanks Dear.. it delighted me that it worked for your ..

nope ... i flashed 100 other roms .. and it stays the same .. and sensor works properly.. :
 
  • Like
Reactions: 0ptimus82

seamusph

Member
Apr 21, 2012
26
57
Thank for this. It has fixed my wifes samsung s3. A few things that might help others..

  • My problem stared when I replaced a cracked screen
  • The echo 0 & 1 worked, but didn't keep after a reboot
  • After putting the new calibration value in /efs/prox_cal, I forgot (read 'too lazy') to do the chown and chmod and it was lost when I rebooted. The next time I did the chown & chmod and the value was saved.
  • For me, after I did the echo 0 & 1, I could see that /efs/prox_cal had been updated (which was then lost on reboot)
  • I tried doing a echo 0 & 1 (which updated /efs/prox_cal) and then I did the chown & chmod. This permanently saved the values for me.

Summary - If echo'ing 0 & 1 into prox_cal is lost after a reboot, try the following before going to the effort to calculate the calibration value
Code:
$ su
$ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
YMMV
 

slofmb

Member
Jul 15, 2012
32
4
Thank for this. It has fixed my wifes samsung s3. A few things that might help others..

  • My problem stared when I replaced a cracked screen
  • The echo 0 & 1 worked, but didn't keep after a reboot
  • After putting the new calibration value in /efs/prox_cal, I forgot (read 'too lazy') to do the chown and chmod and it was lost when I rebooted. The next time I did the chown & chmod and the value was saved.
  • For me, after I did the echo 0 & 1, I could see that /efs/prox_cal had been updated (which was then lost on reboot)
  • I tried doing a echo 0 & 1 (which updated /efs/prox_cal) and then I did the chown & chmod. This permanently saved the values for me.

Summary - If echo'ing 0 & 1 into prox_cal is lost after a reboot, try the following before going to the effort to calculate the calibration value
Code:
$ su
$ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
YMMV


Just want to say that just performing these steps has fixed the problem. (which was that the sensor would turn the screen off and then would be stuck at " near possition" until the process using it was terminated and restared e.g a phone call)
 

edduart

Senior Member
Dec 22, 2012
81
16
São Luís
I'm still watching on, but looks like it really works... in my case, my values were different and based on it I still had the problem, then I tried input 45 as in OP and it solved. Thank you very much for sharing!

Enviado de meu GT-I9500 usando Tapatalk
 

trueking7

Senior Member
Jul 24, 2012
392
171
When I try this it says ussd code running..... Unable to process request.

Any idea why I can't access that menu?

Sent from my GT-I9505G using Tapatalk
 

smep

Senior Member
Jul 30, 2013
219
34
i changed the digitizer like twice.... then i start to have this issue when calling.... and i couldn't end the call because the screen won't turn on.... blowing air amazingly worked for me

Sent from dish washer
 

Top Liked Posts

  • There are no posts matching your filters.
  • 74
    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.
    NOTE: sometimes normal value is 0, its OK you do you math and convert 1st OFFSET into hex. using lower case for Hex values in steps below.
    <<<<<<<<<<< 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, yout phone will Vibrate only when you put your finger on the sensors.

    Manual method worked for me.
    ENJOY.
    NOTE: I am not a developer. i was just stuck with this problem for so long so now i found it from "mcelicalderon". who posted this method some where
    9
    Thank for this. It has fixed my wifes samsung s3. A few things that might help others..

    • My problem stared when I replaced a cracked screen
    • The echo 0 & 1 worked, but didn't keep after a reboot
    • After putting the new calibration value in /efs/prox_cal, I forgot (read 'too lazy') to do the chown and chmod and it was lost when I rebooted. The next time I did the chown & chmod and the value was saved.
    • For me, after I did the echo 0 & 1, I could see that /efs/prox_cal had been updated (which was then lost on reboot)
    • I tried doing a echo 0 & 1 (which updated /efs/prox_cal) and then I did the chown & chmod. This permanently saved the values for me.

    Summary - If echo'ing 0 & 1 into prox_cal is lost after a reboot, try the following before going to the effort to calculate the calibration value
    Code:
    $ su
    $ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
    $ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
    $ chown system:system /efs/prox_cal
    $ chmod 644 /efs/prox_cal
    $ sync
    YMMV
    3
    Works

    [...]
    Code:
    $ su
    $ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
    $ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
    $ chown system:system /efs/prox_cal
    $ chmod 644 /efs/prox_cal
    $ sync
    Just want to say that just performing these steps has fixed the problem. (which was that the sensor would turn the screen off and then would be stuck at " near possition" until the process using it was terminated and restared e.g a phone call)

    It also worked for me - stock KitKat from Google running GT-I9505G. Quick root - terminal - above lines. All good. THANKS!
    2
    THANKS

    Manual Method worked for me,

    ps there is no SPACE after $ sign e.g. $'\x0a'
    2
    no needed for 4.4.2 :p

    Manual Method worked for me,

    ps there is no SPACE after $ sign e.g. $'\x0a'
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone