Fix/Re-calibration for Proximity Sensor/Miscellaneous fixes

Search This thread

xcxa23

Senior Member
Oct 10, 2010
688
247
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
I tried many times and didn't work, finally I understand! To force recalibration you have to use a stock rom, this method doesn't work on cm aokp and similar.

Inviato dal mio GT-I9505 con Tapatalk

for those having problem for the fix to stick
When i did it, it automaticly stuck to my system. Do it several times. Then it sticks.

Gesendet von meinem GT-N7100 mit Tapatalk 2

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


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 ;
the problem is that the google search apk, aka velvet.apk is missing. the simple solution is go to play store and install google search, or u can download from Playstore GoogleSearch]
 
Last edited:

zeeshanonlyme

Senior Member
Dec 1, 2010
733
162
Kolkata
Permission Denied. I think youd have to give su permission first.

Code:

echo 1 > /sys/class/sensors/proximity_sensor/prox_

Typo? Shouldnt it be prox_cal?

Regards.
 
  • Like
Reactions: koheinsoe

cadmaster83

Member
Jul 13, 2007
11
0
Kharkiv
Thank you very much!
You help solve my big problem.

Отправленные с моего GT-N7100 с помощью Tapatalk 4 Beta
 

xcxa23

Senior Member
Oct 10, 2010
688
247
Permission Denied. I think youd have to give su permission first.

Code:

echo 1 > /sys/class/sensors/proximity_sensor/prox_

Typo? Shouldnt it be prox_cal?

Regards.
yup. of cos need to give su permission as we are changing system related file.
sorry. its typo

Thank you very much!
You help solve my big problem.

Отправленные с моего GT-N7100 с помощью Tapatalk 4 Beta

glad that it helped
 

ykkfive

Inactive Recognized Developer
Jul 25, 2010
3,223
3,018
ykkfive.blogspot.com
I don't have any problem with the proximity sensor, but my gyro sensor calibration doesn't calibrate anymore. however the g sensor works without problem... I traced for the cause but no luck at all
 

xcxa23

Senior Member
Oct 10, 2010
688
247
I don't have any problem with the proximity sensor, but my gyro sensor calibration doesn't calibrate anymore. however the g sensor works without problem... I traced for the cause but no luck at all

have you tried to calibrate by using setting>motion>advance>gyroscope calibration and using the command *#0*#?
 

ykkfive

Inactive Recognized Developer
Jul 25, 2010
3,223
3,018
ykkfive.blogspot.com
have you tried to calibrate by using setting>motion>advance>gyroscope calibration and using the command *#0*#?


yes, but the result remains the same. I have tried other apps also

here is my calibration test result
 

Attachments

  • Screenshot_2013-07-06-01-26-53.jpg
    Screenshot_2013-07-06-01-26-53.jpg
    15.2 KB · Views: 4,858

gdstheking

Senior Member
Sep 25, 2012
65
9
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

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 ;

will this resets my ADC to minimum level 0(0,0,0) as now i have 51(51,51,51) as minimum level of ADC...
i have galaxy s4 gt-i9500
will root only this method works otherwise not..
 

xcxa23

Senior Member
Oct 10, 2010
688
247
for a normal sensor minimum valu of ADC is 0(0,0,0) but in my case its 51(51,51,51) {look at the attachment}
View attachment 2337399
my question is will this method resets my adc from 51(51,51,51) to 0(0,0,0).

now i understand what u meant.. yes it will reset the value to (0,0,0)
i came across this method when my proximity sensor arent working and when checked via *#0*#>sensor, it keep vibrating, showing green screen.
after re calibrate, its okay now.

ps : if you wanted to try my method, i would recommend in a bright environment and make sure nothing is blocking the sensor on the phone (top right)
 
Last edited:

gdstheking

Senior Member
Sep 25, 2012
65
9
through my research (through online), sometimes is due to dust, if this is the case, just hard blow through the ear piece.
i tried that method, not working.. so i assume it was due to me flashing custom rom and kernel..

i tried air blow but never worked, since i never rooted and used custom roms but still have a faulty sensor..:crying:
 

ToRvaLDs

Senior Member
Dec 14, 2004
80
26
Xiaomi Mi 10
I tried many times and didn't work, finally I understand! To force recalibration you have to use a stock rom, this method doesn't work on cm aokp and similar.

Inviato dal mio GT-I9505 con Tapatalk
 
  • Like
Reactions: xcxa23

gdstheking

Senior Member
Sep 25, 2012
65
9
can u provide ur prox_cal file using root explorer??

---------- Post added at 01:33 PM ---------- Previous post was at 12:58 PM ----------

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

as reported from ToRvaLDs, only working in SAMSUNG stock rom




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 ;

permission denied??????what to do:confused:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 38
    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
    I tried many times and didn't work, finally I understand! To force recalibration you have to use a stock rom, this method doesn't work on cm aokp and similar.

    Inviato dal mio GT-I9505 con Tapatalk

    for those having problem for the fix to stick
    When i did it, it automaticly stuck to my system. Do it several times. Then it sticks.

    Gesendet von meinem GT-N7100 mit Tapatalk 2

    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


    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 ;
    the problem is that the google search apk, aka velvet.apk is missing. the simple solution is go to play store and install google search, or u can download from Playstore GoogleSearch]
    1
    Permission Denied. I think youd have to give su permission first.

    Code:

    echo 1 > /sys/class/sensors/proximity_sensor/prox_

    Typo? Shouldnt it be prox_cal?

    Regards.
    1
    I tried many times and didn't work, finally I understand! To force recalibration you have to use a stock rom, this method doesn't work on cm aokp and similar.

    Inviato dal mio GT-I9505 con Tapatalk
    1
    The second option worked for my n7100, thank you very much!!!!!
    1
    When i did it, it automaticly stuck to my system. Do it several times. Then it sticks.

    Gesendet von meinem GT-N7100 mit Tapatalk 2