View Single Post
Posts: 1 | Thanked: 0 times | Joined on Mar 2015
#16
Originally Posted by eccenux View Post
Here is a script which you can run to disable/enable the sensor. Helps when you have your N9 behind some kind of foil.

Code:
#
# Disable/enable proximity sensor
#
# To enable use: proximity_disable.sh 0
#
prox_enable_path=`find /sys/devices/ -name 'prox_enable'`

if [ -z "$1" ]; then
     echo "0" > $prox_enable_path
else
     echo "1" > $prox_enable_path
fi
Save it as /use/sbin/proximity_disable.sh or /use/bin/proximity_disable.sh, note however that you need to login as root (devel-su) to use the script. Don't forget to chmod the script to add execution rights.
That seems to help, but only once. The first time I make a call, the controls are visible. The second time, the screen turns blank. Running the script again helps. Any way to make this effect permanent?

(My screen is shattered, but I've fixed it with protective foil.)