[GUIDE] S4 Proximity Sensor Fix (Blank Screen During Calls)

Search This thread

dagentooboy

Senior Member
Feb 16, 2008
544
156
Kansas
Please note the same information used to develop the app is in the guide for free... the app just makes it easier
You can find the app here

CALIBRATION REQUIRES ROOT... PLEASE GO GET ROOT ON YOUR PHONE AND THEN COME BACK.

Oh and BTW... I cannot be held responsible for anything that happens to your phone.... EVER!


use "adb shell" or a terminal emulator to get a terminal prompt and run the following commands

Step 1. - Save old calibration value (Optional)

Code:
su
mkdir /sdcard/S4data/
cat  /efs/prox_cal >> /sdcard/S4data/prox_cal


Step 2. - Edit calibration value and update permissions
Grab the current value with everything clear of the proximity sensor.
Code:
cat  /sys/devices/virtual/sensors/proximity_sensor/state
The value on mine was between 45 and 55. If you a lot higher then there might be something wrong with your phone. I used 150 for my value. You can use whatever you want but 150 is working great for me.

Convert your calibration value to hex (The windows calculator works great for this... use programmer mode). Put your calibration value in place of the 96 in the command below.
Code:
su
echo -en $'\x96' > /efs/prox_cal
chown system:system /efs/prox_cal
chmod 644 /efs/prox_cal
sync

Now reboot and your proximity sensor should be working.

Big thanks to greaty for his post here
 
Last edited:

PanchoPlanet

Senior Member
Oct 15, 2011
3,896
984
Crooklyn
Does this app remove dirt/lint from your proximity sensor?

Pp.

Sent from my Touchwiz device that never forgets gapps and everything works the way its supposed to.
 

dagentooboy

Senior Member
Feb 16, 2008
544
156
Kansas
I took my phone all the way apart and cleaned the sensor and it still had the issue. It seems that the sensor reads about 50 all the time and that is where they have the trip point set. This guide and the app just move that trip point.

Sent from my GT-I9505G using XDA Free mobile app
 

Kriomag

Senior Member
Nov 22, 2011
414
114
Poznań
I took my phone all the way apart and cleaned the sensor and it still had the issue. It seems that the sensor reads about 50 all the time and that is where they have the trip point set. This guide and the app just move that trip point.

Sent from my GT-I9505G using XDA Free mobile app

because you dont know how to clean... i had 46 all the time and now i have 11-12 for month or two and it is not increasing anymore because i shielded it with silicone/rubber and no more dust come inside - thats the only permanent way to fix this.
 
  • Like
Reactions: PanchoPlanet

djdivan

Member
Mar 8, 2014
7
0
This guide solve my problem.
I noticed about the problem when flashed AOSP based Rom. So, thinked it was a rom bug.
Then, flashed stock again and find the issue was still there.
After trying whit compressed air, and nothing changes, rooted my phone (again) and follow this guide, and proximity sensor is working again.
Thanks.
 

dagentooboy

Senior Member
Feb 16, 2008
544
156
Kansas
This guide solve my problem.
I noticed about the problem when flashed AOSP based Rom. So, thinked it was a rom bug.
Then, flashed stock again and find the issue was still there.
After trying whit compressed air, and nothing changes, rooted my phone (again) and follow this guide, and proximity sensor is working again.
Thanks.

I am glad it worked for you. I have heard that this is a huge issue for the S4. Not sure about other models.
 
  • Like
Reactions: djdivan

parrotheadmjb

Senior Member
Feb 21, 2009
140
13
I believe it's only in TouchWiz roms.

Cleaning the dirt out of the sensor is the only long term solution to fix it. But even then it's not permanent. It will eventually get dirty again.

I'm using an AOSP ROM (http://xdaforums.com/showthread.php?t=2643031) and worked for me.

But the point of my post (and I have the Verizon edition BTW) is to say THANK YOU! I got to the point where every time I made a phone call I knew almost certainly my screen wouldn't turn on and even half the time hitting the home button wouldn't do the trick. I know the issue is my otter box defender series, which never caused this problem until about a month or two ago. But I need the otter box and this fixed my problem... Thank you thank you! No more random voice mails from me because my screen won't turn on haha

Edit: For those on AOSP, if you type the value in the calculator, swipe left and hit HEX, it will give you the hexadecimal value you need :D
 
Last edited:

red_five_1976

Member
Jun 27, 2013
12
2
Kingsport, TN
Ever since I flashed any custom ROM on my tmo S4, the proximity sensor hasn't worked right. Screen would never wake after a call ended, even the app I use to keep the screen off in my pocket (Gravity Screen, pretty cool app) wasn't working. I used the little app referenced in the OP, and it all works again! Thanks! :good: :highfive: :cool: :victory:
 
Last edited:

fincan

Senior Member
Dec 9, 2007
282
92
around VA
FYI, this file (/efs/prox_cal) does not exist in Google Edition S4.

Previously I wrote that that file and value does not exist in S4 GPE (Google Play Edition), but just for the heck of it I gave it a shot and created the file, and what do you know, it works. Since you saved my sanity and also my phone from being smashed with a hammer, I purchased the app to show my support. Thank you dagentooboy.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    Please note the same information used to develop the app is in the guide for free... the app just makes it easier
    You can find the app here

    CALIBRATION REQUIRES ROOT... PLEASE GO GET ROOT ON YOUR PHONE AND THEN COME BACK.

    Oh and BTW... I cannot be held responsible for anything that happens to your phone.... EVER!


    use "adb shell" or a terminal emulator to get a terminal prompt and run the following commands

    Step 1. - Save old calibration value (Optional)

    Code:
    su
    mkdir /sdcard/S4data/
    cat  /efs/prox_cal >> /sdcard/S4data/prox_cal


    Step 2. - Edit calibration value and update permissions
    Grab the current value with everything clear of the proximity sensor.
    Code:
    cat  /sys/devices/virtual/sensors/proximity_sensor/state
    The value on mine was between 45 and 55. If you a lot higher then there might be something wrong with your phone. I used 150 for my value. You can use whatever you want but 150 is working great for me.

    Convert your calibration value to hex (The windows calculator works great for this... use programmer mode). Put your calibration value in place of the 96 in the command below.
    Code:
    su
    echo -en $'\x96' > /efs/prox_cal
    chown system:system /efs/prox_cal
    chmod 644 /efs/prox_cal
    sync

    Now reboot and your proximity sensor should be working.

    Big thanks to greaty for his post here
    1
    I took my phone all the way apart and cleaned the sensor and it still had the issue. It seems that the sensor reads about 50 all the time and that is where they have the trip point set. This guide and the app just move that trip point.

    Sent from my GT-I9505G using XDA Free mobile app

    because you dont know how to clean... i had 46 all the time and now i have 11-12 for month or two and it is not increasing anymore because i shielded it with silicone/rubber and no more dust come inside - thats the only permanent way to fix this.
    1
    This guide solve my problem.
    I noticed about the problem when flashed AOSP based Rom. So, thinked it was a rom bug.
    Then, flashed stock again and find the issue was still there.
    After trying whit compressed air, and nothing changes, rooted my phone (again) and follow this guide, and proximity sensor is working again.
    Thanks.

    I am glad it worked for you. I have heard that this is a huge issue for the S4. Not sure about other models.
    1
    Thanks for the guide!!! Manual process worked for me.

    Btw, Anybody knows how to disable the prximity sensor completely?

    Sent from my GT-I9500 using XDA Free mobile app
    There is an Xposed module that will do it