Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,778,893 Members 42,718 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
dagentooboy
Old
(Last edited by dagentooboy; 4th June 2014 at 12:58 AM.)
#1  
dagentooboy's Avatar
Senior Member - OP
Thanks Meter 133
Posts: 516
Join Date: Feb 2008
Location: Kansas
Default [GUIDE] S4 Proximity Sensor Fix (Blank Screen During Calls)

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
S4 Proximity Sensor Calibration Guide here

Free Unlock For
Samsung Galaxy S variant here
Samsung Galaxy S 4G here
Galaxy Tab here

If you find my guide or advice helpful please donate

S4 Proximity Sensor Calibration App here

In a world without walls and fences who needs Windows and Gates?
The Following 8 Users Say Thank You to dagentooboy For This Useful Post: [ Click to Expand ]
 
PanchoPlanet
Old
#2  
PanchoPlanet's Avatar
Senior Member
Thanks Meter 626
Posts: 2,356
Join Date: Oct 2011
Location: Crooklyn

 
DONATE TO ME
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.
Sent from my Ginger infused Asus G73.
 
dagentooboy
Old
#3  
dagentooboy's Avatar
Senior Member - OP
Thanks Meter 133
Posts: 516
Join Date: Feb 2008
Location: 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
S4 Proximity Sensor Calibration Guide here

Free Unlock For
Samsung Galaxy S variant here
Samsung Galaxy S 4G here
Galaxy Tab here

If you find my guide or advice helpful please donate

S4 Proximity Sensor Calibration App here

In a world without walls and fences who needs Windows and Gates?
 
Armandopjr
Old
#4  
Member
Thanks Meter 13
Posts: 89
Join Date: Nov 2011
Location: Grand Prairie
This saved my phone! Thank you!

Sent from my SGH-M919 using Xparent Red Tapatalk 2
 
dagentooboy
Old
#5  
dagentooboy's Avatar
Senior Member - OP
Thanks Meter 133
Posts: 516
Join Date: Feb 2008
Location: Kansas
Quote:
Originally Posted by Armandopjr View Post
This saved my phone! Thank you!

Sent from my SGH-M919 using Xparent Red Tapatalk 2
Glad it worked for you!
S4 Proximity Sensor Calibration Guide here

Free Unlock For
Samsung Galaxy S variant here
Samsung Galaxy S 4G here
Galaxy Tab here

If you find my guide or advice helpful please donate

S4 Proximity Sensor Calibration App here

In a world without walls and fences who needs Windows and Gates?
 
Kriomag
Old
#6  
Kriomag's Avatar
Senior Member
Thanks Meter 69
Posts: 300
Join Date: Nov 2011
Location: Wrocław
Quote:
Originally Posted by dagentooboy View Post
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.
TXT-Blaster

Galaxy S4 I9505
 
nitinvaid
Old
#7  
nitinvaid's Avatar
Recognized Themer
Thanks Meter 4192
Posts: 4,352
Join Date: Mar 2011
Location: New Delhi

 
DONATE TO ME
I dont think its for CM11 also

Current Device: Google Nexus 5
Secondary : Galaxy S4 GT-I9500
 
fincan
Old
#8  
fincan's Avatar
Senior Member
Thanks Meter 78
Posts: 273
Join Date: Dec 2007
Location: around VA
FYI, this file (/efs/prox_cal) does not exist in Google Edition S4.
- Galaxy S4 Google Edition
- Nexus 7 FHD (2013)
 
Skipjacks
Old
#9  
Skipjacks's Avatar
Recognized Contributor
Thanks Meter 3816
Posts: 4,841
Join Date: Nov 2011
Location: Baltimore
Quote:
Originally Posted by fincan View Post
FYI, this file (/efs/prox_cal) does not exist in Google Edition S4.
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.
Do you want insanely better battery drain when your phone is idle? Check out this thread!
Have a question about the T Mobile Samsung Galaxy S4? Click here for the Help Thread!
 
djdivan
Old
#10  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Mar 2014
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.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes