How to Perform Proximity Sensor Calibration on any Samsung Phone [Fix]

Last year, Samsung unveiled their new flagship device Galaxy Note 3 along with a smart watch called ‘Galaxy Gear’. The device sports a powerful hardware and being a phablet series phone, it includes a S-Pen stylus as well. On software side, it runs on Android 4.3 on board. Samsung has provided a latest TouchWiz version and included several new features like smart pause, smart scroll it. One of the noticeable change (not for normal users) that they’ve implemented in Android 4.3 is a new KNOX bootloader. Just like ‘binary count’ on older Samsung devices, this new bootloader triggers the flag and sets KNOX count to 1 if any unofficial activity is performed on the device. But unlike binary count, developers still haven’t got any luck resetting the KNOX counter to 0. Therefore, users are afraid to try any unofficial stuff on their Android 4.3 running Samsung device (I feel really sorry for Note 3 users as it ships Android 4.3 on board).

Few weeks ago, Samsung started rolling out this update for their previous flagship devices including Galaxy S4, Galaxy Note 2 and Galaxy S3. And as expected, they implemented the same bootloader for these devices and thus, in other way restricted users to try out some unofficial things like root and all. For hardcore Android users, It was like – if you flash an official Android 4.3 firmware, you’re screwed up because if you perform any unofficial activity, your warranty gets void instantly. But thanks to those developers @XDA Forums that DeKnoxed the official firmware (removed the KNOX bootloader), recompiled it and made it available in the form of a Custom ROM.

I was also searching for this kind of stuff for my Galaxy Note 2 (since I’ve 2 months of warranty left for my phone and I didn’t want to lose it because of this crappy bootloader). I flashed those ROMs and observed some weird thing. I noticed that my proximity sensor was no longer functioning. It was working only for first time i.e. if I make a call, it was turning off the display but wasn’t turning it on again. I got tensed and thought that it might be caused by my phone’s screen (as I had dropped and cracked it earlier). I searched for this problem on the internet and saw that many people were having this bizarre problem after updating their phone to Android 4.3. Luckily, I found some working solutions on the famous XDA community, out of which few were temporary and one was permanent. In this article, I am going to share all those solutions with you. I hope you’ll find this guide helpful in calibration process of your device’s proximity sensor.

You’ll definitely need to follow this guide if your Samsung phone’s proximity sensor is not working anymore.


  • Rooted Android running Samsung smartphone / tablet.
  • USB Debugging must be enabled in your phone. To enable the same, navigate to – Settings –> Developers Options and tick the USB Debugging option. If you don’t find Developers Options in Settings then open About device option and tap build number 7 times. This is particularly required for Android 4.3 ROMs.
  • If you don’t want to use PC in the whole procedure then you’ll require an app called Terminal Emulator. It’s available for free on the Play Store.

Various Methods to Perform Proximity Sensor Calibration on any Samsung Phone

Normally, proximity calibration can be done using two main methods. Out of which one is temporary and another is permanent. Temporary method is short and easy as compared to the permanent one.

There is one more method which is quick simple as compared to these two. The method is – you’ve to blow the air in 3.5 mm headphone jack of your phone. This method may or may not work but you should at least give it a shot. Obviously, there is no need to follow other 2 methods if blowing air gets your job done in the first place.

Method 1

This is a short and quick method to calibrate the proximity sensor. But it doesn’t stick permanently as proximity sensor loses the calibration after rebooting the phone. And therefore you’ll have to apply this method upon each restart. It may not be handy in some cases but being a short method, it does the job pretty quick. So, lets begin!

  • Firstly, download ADB files on your computer. You can get them by clicking on the link mentioned below.
  1. ADB Package.
  • Now, as stated in Pre-Requisites, enable USB Debugging in your phone and then using a USB cable, connect it to the PC.
  • Extract on your PC and open the extracted folder.
  • Double click on runme.lnk file and type the following command –
adb devices

If your device is connected properly then command prompt will display some random numbers after entering the above command.

Note: Your computer may prompt for USB Debugging on a phone. In that case, select Ok and optionally tick ‘Always allow from this computer

USB Debugging Prompt

  • Now, type the following commands one by one and hit enter after each command.
adb shell
echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
  • Remove your phone from computer and make a call to check the proximity calibration. It should be working fine.

Note: This same process can be performed without using a computer. To do so, you’ll need to download and install Terminal Emulator App from Play Store. Open it and type “su” (without quotes) and hit the enter. Grant Superuser permission if required. Now, type those 2 echo commands (mentioned above) to calibrate the sensor.

Method 2

As stated above, if you use Method 1, it may or may not stick permanently as you’ll need to perform calibration on every restart (which is inconvenient). Now, with Method 2, you can calibrate the sensor permanently.

It’s bit a lengthy and little complicated process to follow but does the thing perfectly. Similar to Method 1, we’ll be using ADB shell method for the calibration. You may use terminal emulator app as well.

Note: Try to keep ambient as dark as possible. It may not work with bright surrounding.

  • At first, download ADB package on your PC and extract them in a folder.
  1. ADB Package for Android.
  • Enable USB Debugging in your phone (refer Pre-Requisites) and connect it to PC.
  • Open extracted folder on PC, you’ll find five files inside it. Right click on runme.lnk and select “Run as administrator”.
  • Generally, to calibrate the proximity sensor, we require two values namely ‘Offset’ and ‘Normal State’. We need to find these values individually & add them together. And then we’ll convert the output of an addition to its equivalent hexadecimal value. So, let us find Offset and Normal State values first.
  1. Finding Offset – To find the offset value, enter the following command in the command prompt (i.e. runme.lnk). Instead of typing the whole command, you can simply copy / paste it in the CMD.
adb shell
cat /sys/devices/virtual/sensors/proximity_sensor/prox_cal

Note down the values it returns. For e.g. if you get 5, 64, 100 then 5 is your offset value. You can ignore the other two.

  1. Finding Normal State – To find normal state, enter the following command
cat /sys/devices/virtual/sensors/proximity_sensor/state

Entering the above command will return a single value. Note it down. For e.g. if it returns 64 then it’s your Normal State value.

  • Now, we need add Offset and Normal State values together. In my case offset and normal state values are 5 and 64 respectively. Therefore, addition of 5 and 64 becomes 69. Next step is to convert 69 into its equivalent hexadecimal value.
  • After converting 69 into hex, we get 45. You may get different values like 4A, 6B, 2C etc.
  • Now, by using ADB shell, we’ll write 45 in /efs/prox_cal. To do so, one by one, enter each given command in the same command prompt window.
echo -en $ '\x45' > /efs/prox_cal
chown system:system /efs/prox_cal
chmod 644 /efs/prox_cal

While typing the third command, replace 45 with your own hexadecimal value.

  • Wait for phone to reboot. By this time, you have successfully calibrated the proximity sensor of your Samsung smartphone. To check the calibration, open dialer app and dial ‘*#0*#’. As soon as you type this, menu with several options will get opened. Select Sensor option from that.
  • Now, hover you hand above the proximity sensor, it should turn your screen into the green color & as soon as you remove your hand, it should return back to normal state.

Samsung Sensor Test MenuScreenshot showing Sensor Testing Menu

Tip – The same method can be done using a Terminal Emulator app.

Congratulations! You’ve successfully performed the proximity sensor calibration on your phone. Now, reboot your phone as many times as you want because now you need to not worry about the calibration thing again and again. Method 2 will stick permanently no matter what you do with your phone.

Let us know if you face any difficulties while performing the procedure mentioned above. To contact us, simply drop a comment below and we’ll get in touch with you.

Comments (85)
  1. Martin Köll September 2, 2017
  2. Markus July 25, 2017
  3. Markus May 22, 2017
  4. Jacque January 25, 2017
  5. santosh October 5, 2016
  6. Ionut September 12, 2016
  7. Beto September 8, 2016
  8. gazukie March 2, 2015
  9. biswas February 12, 2015
  10. Jesse N October 11, 2014
  11. Carl October 5, 2014
    • ishaq February 8, 2017
  12. Cris October 1, 2014
  13. aboubakkar September 30, 2014
  14. raghavkanoria September 26, 2014
  15. Khaled Homouda September 17, 2014
  16. Zach September 10, 2014
  17. limz September 7, 2014
  18. Tahir September 2, 2014
  19. Tahir September 2, 2014
  20. Nav September 2, 2014
  21. Frank Zane August 28, 2014
  22. Hawkeye August 26, 2014
  23. angel August 25, 2014
  24. Alan August 22, 2014
  25. Avash August 22, 2014
    • Viraj Kshatriya August 23, 2014
  26. Alan August 21, 2014
  27. Cosmin August 3, 2014
  28. tricki July 30, 2014
    • Viraj SK July 30, 2014
  29. Haroon Ahmed July 27, 2014
  30. rye July 25, 2014
    • Eltee February 18, 2015
      • ishaq February 8, 2017
  31. christiansp2 July 24, 2014
  32. Jon July 15, 2014
  33. me who July 8, 2014
  34. Derek July 7, 2014
    • fegato July 20, 2014
    • antonis September 16, 2014
  35. Shifty McCool July 5, 2014
    • Viraj SK July 6, 2014
  36. Michael Campbell June 27, 2014
  37. Ramadurai Ramamurthy June 21, 2014
    • Viraj SK June 21, 2014
      • Ramadurai Ramamurthy June 21, 2014
        • Viraj SK June 22, 2014
        • Aurifier October 8, 2014
  38. Viraj SK June 18, 2014
  39. SY0H June 18, 2014
    • Viraj SK June 18, 2014
      • rye July 25, 2014
    • Eltee February 18, 2015
    • Eltee February 18, 2015
  40. Don June 17, 2014
  41. Viraj SK June 12, 2014
  42. amit.dhatrak95 May 18, 2014
    • Viraj SK May 19, 2014
  43. Hllywd May 1, 2014
    • Viraj SK May 1, 2014
  44. Derag April 28, 2014
    • Viraj SK April 28, 2014
      • Derag April 28, 2014
        • Viraj SK April 28, 2014
  45. Nikhil April 27, 2014
    • Viraj SK April 27, 2014
  46. Brandon Wright April 20, 2014
    • Viraj SK April 20, 2014
  47. nikhil March 24, 2014
  48. Viraj SK March 21, 2014
  49. amir March 20, 2014
    • Viraj SK March 20, 2014
  50. steve March 14, 2014
  51. Sharran March 11, 2014
    • Viraj SK March 11, 2014
      • Sharran March 12, 2014
        • Viraj SK March 12, 2014
  52. Jim Galford March 11, 2014
  53. Zincsmith March 4, 2014
  54. catalincre February 22, 2014
    • Viraj SK February 22, 2014
      • Denis February 26, 2014
        • Viraj SK February 26, 2014

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.