Jump to content
Reliance Jio & Reliance Mobile Discussion Forums
Sign in to follow this  

fix:proximity sensor for samsung phones

Recommended Posts

this solution is to fix the proximity sensor which goes bad sometimes and even after the call the screen stays black until the person on line cuts the phone or if you press the power button this happens due to dirt and dust accumulating over sensor.

so to check if your sensor is working properly do the below test

to check sensor dial *#0*# and select sensors(tested on note 2,s4,note 3)

when u put your hand on proximity sensor screen turns green with vibration and when u lift your hand it turns back to white but if it doesnt turn white after removing hand that means the sensor has a problem so we lower the value at which the sensor responds

note :-you need to be rooted to follow this procedure

open cmd

and change to your adb folder and type the following command

adb shell (you will get a notification on your phone screen accept it)

su (give root privilege in phone)
echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal


cat state # put your finger on the sensor and check the value (my came 255)
now remove your finger from sensor (it came 51)
cat state #

This returned 255 #finger on the sensor and 51 #blank value

and then do

cat /sys/devices/virtual/sensors/proximity_sensor/prox_cal
this returned 0,60 45.....so my offset was 0. Ths sum of offset and #blank value was 0 + 51 = 51 that is equal to 33 in HEX.
so i increased to 55 and hex value 37

echo -en $'\x37' > /efs/prox_cal the value 37 will change according to your phone do the above math
chown system:system /efs/prox_cal
chmod 644 /efs/prox_cal


now the sensor is working you can check again by dialing *#0*# and do the test again
Edited by nikme
  • Like 6

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this