My proximity sensor is not functioning properly when im in a call. i have scoured these forums and tried the following with no success:
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
would appreciate any help!
Related
We've done this script to make work light leds on physical keyboard, when keyboard is out, and off when is in, on X10 mini pro.
Code:
#!/system/bin/sh
do
/system/bin/logcat | grep 'keys=2/1/1' > /sdcard/true.txt
sleep 1
kill -9 $!
if [ -s /sdcard/true.txt ]; then
echo 1 > /sys/devices/platform/msm_pmic_misc_led.0/brightness
sleep 9
else
echo 0 > /sys/devices/platform/msm_pmic_misc_led.0/brightness
sleep 9
fi
while true;
problem is that it says that it can create /sdcard/true.txt, so, someone maybe can help me?
Hi all,
I xant to enable debug info from module qtouch_obp_ts. (Related to my digitizer problem)
I put in /system/etc/init.d/77debug
#!/system/bin/sh
echo 0xFF > /sys/module/qtouch_obp_ts/parameters/tsdebug
But tsdebug stay at 0.
I'm on cyanogenMod 7.2.
What can I do ?
Methods that worked for me.
Method 1.
Blow Air it will solve your prob hopefully.
Method 2.
go to samsung code *#0*#. then SENSORS and Read your Proximity sensor values.
<<< DECISION >>>>>
####Calibration isnot needed if ####
.
your phone doesnt vibrate in normal but does so when u physically put your finger on the Sensor.
#### Calibration needed if ####
.
your phone is vibrating in this menu no matter what, you put your finger on the sensor or not
Follow these steps
1. download Android Terminal from store
2. type these commands to calibrate automatically
$ su
# echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
# echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
Reboot and see if it works.go to *#0*# and check if it continuously vibrating or only does so when you put your finger on the SENSOR.
<<<< IF Continuously Vibrating Follow these steps>>>>
you need to manually put values in ur /efs/prox_cal.it Reads Hexadecimal value. so you have to convert your decimal values into HEX.
##### FIND YOUR Decimal Values and pushing them into /efs/prox_cal ######
Method : finding two values for calibration . offset + normal value.
##.. FINDING OFFSET ######
cat /sys/devices/virtual/sensors/proximity_sensor/prox_cal
note down the values it returns.. mine is 5,64,100.. you only need the 1st value which is 5.
### FINDING NORMAL STATE ######
cat /sys/devices/virtual/sensors/proximity_sensor/state
note down the value if returns. mine is 64
now ADD OFFSET value + Normal Value
5 + 64 = 69
Convert in Hexadecimal which is 45.
<<<<<<<<<<< Pushing the value in /efs/prox_cal >>>>>>>>>>>>>>
# echo -en $ '\x45' > /efs/prox_cal
then
# chown system:system /efs/prox_cal
# chmod 644 /efs/prox_cal
# sync
# Reboot
All done. after that go to *#0*# then SENSORS and move your finger on the sensor, yout phone will Vibrate only when you put your finger on the sensors.
Manual method worked for me.
ENJOY.
NOTE: I am not a developer. i was just stuck with this problem for so long so now i found it from "mcelicalderon". who posted this method some where.
Thank you ! That worked for me too
Pleasure is all mine
Sent from my GT-I9505 using xda app-developers app
thanks
i've had this problem a long time now. it worked fine with stock rom but as soon as i changed it, it went wrong. unrooted it and back to stock and it worked again. Been looking all over for a solution. tried air blowing and other non working solutions. the *#0*# did not run on my phone either. but after follwing this guide it got fixed. but insted of typing the long cat command in terminal i used ES file explorer and navigated to the right files and opened them.
so thank you for this guide to fix this irretating problem
hello everybody, i have an s4 19505 with 4.4.3 rom (http://forum.xda-developers.com/showthread.php?t=2544474) in the rom´s description, it says that this rom hasn´t got any bugs, but when i call, my screen turns to black and i need lo lock and unlock the phone for hang up the call:crying:, I need help, is the calibration of the sensor? any .zip to fix this?
lot of thanks
Its for the proximity sensor. I dunno if you have this option in AOSP but in STOCK ROMs it's. You only have to check one option of the settings for solve that:
- Go to Settings -> My device -> Call -> Turn off screen during calls.
Look here
http://forum.xda-developers.com/showthread.php?t=2208440&page=2
or
in terminal or adb
$ su
$ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
reboot
Hello, I have tried this (echo 0 and echo 1).
I'm on CM 11 with a Zerolemon case.
It still doesn't work. When I am on Rom stock 4.2, it works fine.
The screen goes black on call If I push the "Home" buttons, proximity sensor works fine. And when I try to come back on the call window, it turn black (whatever the 4.4.x, I've tried today, this bug exists not only in CM11).
Any idea to help me ?
Thanks for all.
edit :
When I try (the 74 value is just the one working - don't know the right value in my case)
[email protected]:/ $ su
[email protected]:/ # echo -en $ '\x74' > /efs/prox_cal
[email protected]:/ # chown system:system /efs/prox_cal
[email protected]:/ # chmod 644 /efs/prox_cal
[email protected]:/ # sync
[email protected]:/ # reboot
Click to expand...
Click to collapse
When I do that, the proximity sensor works well when I push the home button during a call. But the screen is still black on the phone call.
Edit 2nd
I've tried this : http://forum.xda-developers.com/showthread.php?t=1626611 ... Problem always here !
Hey guys,
Any of you have similar issue? Whenever calling / receiving a call the screen won't recover from blackscreen. Only way is to turn off the Proximity sensor in call settings. Sorry for posting here, couldn't post on dev forum (posts < 10).
Using the following setup:
Twrp (2.8.7.0-ks01lte)
cm-12.1-2015.10.19-UNOFFICIAL-temasek-ks01lte-V18.0.zip
arter97-kernel-i9506-9.0.zip
arter97-ks01ltexx-cm-patch-2.0.zip
pa_gapps-modular-pico-5.1-2015.04.18-signed.zip
flashed in this order.
Thank you for the help
Here r link
http://www.androidlegend.com/how-to-perform-proximity-sensor-calibration-on-any-samsung-phone/
Hello again,
Thank you for the replay The post didn't helped to solve the problem but found this instead:
http://forum.cyanogenmod.org/topic/81988-black-screen-during-call-jfltexx/page__st__20
First step - Doing the manual recalibration:
$ su
$ echo -en $'\x74' > /efs/prox_cal
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
Reboot your phone.
After rebooting, please test, this will make the proximity sensor work, however, it will only work in a very near distance.
(I was so happy it worked so stopped at this point)
Now, you should do this, to fix permanently with the default proximity distance:
Second step - Fix the proximity distance:
$ su
$ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
Reboot your phone.
Hope it helped for those who suffered with this problem.
Thank you again!