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 etc.in 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.
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.
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.
- 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 ADB_Fastboot.zip on your PC and open the extracted folder.
- Double click on runme.lnk file and type the following command –
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‘
- Now, type the following commands one by one and hit enter after each command.
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.
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.
- 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.
- 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.
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.
- Finding Normal State – To find normal state, enter the following command
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.
Screenshot 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.