Fix/Re-calibration for Proximity Sensor/Miscellaneous fixes

Karanchopra

Senior Member
Oct 11, 2010
91
0
26
New Delhi
please make nandroid backup..just in case anything goes wrong
for those wanted to run as script (i haven try as i no longer own note 2)
*create a file, copy the syntax below and put it in extSdCard, use script manager to run as SU and at Boot

#!/system/bin/sh
echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
This method was working previously but now it returns number -127 when executing the script. .what might be the reason?
Please help...
 

xcxa23

Senior Member
Oct 10, 2010
688
247
0
do I have to root my note 2 to perform this?
opps.. sorry for the late reply.
yes u need to be rooted to use this command.

using terminal type
su
echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
 

minzaw

Senior Member
Mar 17, 2014
59
7
0
Please please help .....me

I am beginner so please explain me I using with Terminal emulator and type on terminal emulator
Su
echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
and than I don't know how to continue...?? so please explain step by step or screen recorder
Send from N7100 Dn3 v5
 
  • Like
Reactions: TIM13

TIM13

Member
Oct 1, 2009
25
0
0
I am beginner so please explain me I using with Terminal emulator and type on terminal emulator
Su
echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
and than I don't know how to continue...?? so please explain step by step or screen recorder
Send from N7100 Dn3 v5
As I amalso beginner when I do input the first ''echo 0 > /sys/class/sensors/proximity_sensor/prox_cal'' it says no such file or directory exist...something like that...I am on omegadroid 28...
Any solution folks...?
 

khudko83

Member
May 31, 2014
29
1
0
i9100 proximity sensor doesn't work

Hi to all!
I have the issue with proximity sensor and didn't manage to find a solution in other similar threads!
The matter is that it is always stay as Released.
In the same time in test screen (*#0*#) there are changing reading for PROXIMITY parameter from 2 up to 240 with no ADC parameter at all. Please look for screenshots. PROXIMITY parameter changes its value when I move my finger in front of the sensor, but as I can understand Android doesn't recognize it because of ADC absence.
Moreover I tried to change proximity sensor for working one (from another phone), but it shows the same as mine (with no ADC readings).
After all I think it is software problem, but I don't know how to solve it. I flashed different firmwares (now it is XWMSE NeatROM v.6.4), but nothing helped.
Please assist! Thanks!
 
Last edited:

ironclad1911

Senior Member
Jun 22, 2014
142
58
0
26
the first thing i notice after updated to the latest firmware, dme6 or dmf2 is either efs corrupted or in my case is the proximity sensor not working well.

during in-call, the screen off but when move away from face, the screen would remain off.
so i poke around in the system file and found some solution after few days of testing
and now its work very well

the only method works for me is re-calibration via terminal/adb shell
u need to type 'su' without the quotation mark and then follow by the code
Code:
echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
by echoing it 0, it force the sensor to reset

Code:
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
by echoing to 1, its actually force the sensor to re-calibrate

my guess is, the calibration value are stored in efs so if there are chances for it to corrupted, there's small chance that the sensor goes haywire, well it happen to me. so i hoping this helps some user that facing proximity sensor.
*ps : okay, so i did some experiment and found that for it to recalibrate properly, it is recommend to do it under a bright environment
So, i decided to put in solution/fixes for those problem that occur on GT-N7100(Galaxy Note II International) that i cant find the solution.
the solution is based on my experience so i DID manage to fix it

**update : another method which i found online, forgotten from where, give a hard blow on the earpiece. i remember saw some user (not from xda) posted that this helps the problem

as reported from user, only working in SAMSUNG stock rom


for those having problem for the fix to stick


for those wanted to run as script (i haven try as i no longer own note 2)
*create a file, copy the syntax below and put it in extSdCard, use script manager to run as SU and at Boot



1. After flashing a ROM, you booted it and when you long press the home button, suddenly the system ui force close, but you DID FLASH the rom ACCORDINGLY to the OP's instruction ;
Im currently running cm11 and have this problem but this solution works only on stock rom.......can you try and fix it on custom roms???...….......
 

iffiscb

Senior Member
Nov 5, 2013
169
13
48
Lahore
Simply install this apk proximity fix

the first thing i notice after updated to the latest firmware, dme6 or dmf2 is either efs corrupted or in my case is the proximity sensor not working well.

during in-call, the screen off but when move away from face, the screen would remain off.
so i poke around in the system file and found some solution after few days of testing
and now its work very well

the only method works for me is re-calibration via terminal/adb shell
u need to type 'su' without the quotation mark and then follow by the code
Code:
echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
by echoing it 0, it force the sensor to reset

Code:
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
by echoing to 1, its actually force the sensor to re-calibrate

my guess is, the calibration value are stored in efs so if there are chances for it to corrupted, there's small chance that the sensor goes haywire, well it happen to me. so i hoping this helps some user that facing proximity sensor.
*ps : okay, so i did some experiment and found that for it to recalibrate properly, it is recommend to do it under a bright environment
So, i decided to put in solution/fixes for those problem that occur on GT-N7100(Galaxy Note II International) that i cant find the solution.
the solution is based on my experience so i DID manage to fix it

**update : another method which i found online, forgotten from where, give a hard blow on the earpiece. i remember saw some user (not from xda) posted that this helps the problem

as reported from user, only working in SAMSUNG stock rom


for those having problem for the fix to stick


for those wanted to run as script (i haven try as i no longer own note 2)
*create a file, copy the syntax below and put it in extSdCard, use script manager to run as SU and at Boot



1. After flashing a ROM, you booted it and when you long press the home button, suddenly the system ui force close, but you DID FLASH the rom ACCORDINGLY to the OP's instruction ;

https://play.google.com/store/apps/...+s4&pcampaignid=APPU_1_LrxyVaCvMKfP7gaLioGACg
 
Jun 18, 2015
25
6
0
Ottawa
the first thing i notice after updated to the latest firmware, dme6 or dmf2 is either efs corrupted or in my case is the proximity sensor not working well.

during in-call, the screen off but when move away from face, the screen would remain off.
so i poke around in the system file and found some solution after few days of testing
and now its work very well

the only method works for me is re-calibration via terminal/adb shell
u need to type 'su' without the quotation mark and then follow by the code
Code:
echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
by echoing it 0, it force the sensor to reset

Code:
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
by echoing to 1, its actually force the sensor to re-calibrate

my guess is, the calibration value are stored in efs so if there are chances for it to corrupted, there's small chance that the sensor goes haywire, well it happen to me. so i hoping this helps some user that facing proximity sensor.
*ps : okay, so i did some experiment and found that for it to recalibrate properly, it is recommend to do it under a bright environment
So, i decided to put in solution/fixes for those problem that occur on GT-N7100(Galaxy Note II International) that i cant find the solution.
the solution is based on my experience so i DID manage to fix it

**update : another method which i found online, forgotten from where, give a hard blow on the earpiece. i remember saw some user (not from xda) posted that this helps the problem

as reported from user, only working in SAMSUNG stock rom


for those having problem for the fix to stick


for those wanted to run as script (i haven try as i no longer own note 2)
*create a file, copy the syntax below and put it in extSdCard, use script manager to run as SU and at Boot



1. After flashing a ROM, you booted it and when you long press the home button, suddenly the system ui force close, but you DID FLASH the rom ACCORDINGLY to the OP's instruction ;
I do not have such a directory proximity_sensor. When I ls sensors I get a directory with a name which contains accl, I gues this is the directory for the accelerometer.

Any ideas?
 

santro2511

Member
Jul 10, 2014
47
13
0
the first thing i notice after updated to the latest firmware, dme6 or dmf2 is either efs corrupted or in my case is the proximity sensor not working well.

during in-call, the screen off but when move away from face, the screen would remain off.
so i poke around in the system file and found some solution after few days of testing
and now its work very well

the only method works for me is re-calibration via terminal/adb shell
u need to type 'su' without the quotation mark and then follow by the code
Code:
echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
by echoing it 0, it force the sensor to reset

Code:
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
by echoing to 1, its actually force the sensor to re-calibrate

my guess is, the calibration value are stored in efs so if there are chances for it to corrupted, there's small chance that the sensor goes haywire, well it happen to me. so i hoping this helps some user that facing proximity sensor.
*ps : okay, so i did some experiment and found that for it to recalibrate properly, it is recommend to do it under a bright environment
So, i decided to put in solution/fixes for those problem that occur on GT-N7100(Galaxy Note II International) that i cant find the solution.
the solution is based on my experience so i DID manage to fix it

**update : another method which i found online, forgotten from where, give a hard blow on the earpiece. i remember saw some user (not from xda) posted that this helps the problem

as reported from user, only working in SAMSUNG stock rom


for those having problem for the fix to stick


for those wanted to run as script (i haven try as i no longer own note 2)
*create a file, copy the syntax below and put it in extSdCard, use script manager to run as SU and at Boot



1. After flashing a ROM, you booted it and when you long press the home button, suddenly the system ui force close, but you DID FLASH the rom ACCORDINGLY to the OP's instruction ;
You are too good. Thanks Alot. :good:
 

nguyns

Senior Member
Nov 2, 2008
97
9
0
1/ You have to root your cellphone, turn on "Developer options" Mode, check on "USB debugging"
2/ On the PC, you install ADB and cellphone drivers
3/ Connect cellphone to PC, press Window + R
Type: cmd
Type: adb shell
Type: su
Type: echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
Type: chown system:system /efs/prox_cal
Type: chmod 644 /efs/prox_cal
Type: sync
Type: Exit
Type: Exit
Type: adb reboot
Success 100%
Good luck!
Here is a picture that I captured from my PC, you can follow this:
 
Last edited:
  • Like
Reactions: mazriza

Fatih666

Member
Mar 19, 2014
26
1
0
It only works when I open the caller application. Then he accepts. But when I reset it, the settings are deleted. When calling again using the caller, "
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal "
When I write it. I have to do this every time I start. Is there anyone who will tell me a definite solution? None of the apps on google play does not work. I want to solve this with Adb for sure. I am using s3 lineage os 14. I used boeffla kernel and sim unlock. I have to use them.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone