pmaports/device/testing/device-sony-taoshan/sony-taoshan-screen-enlightener

17 lines
498 B
Text
Raw Normal View History

2018-11-21 07:53:26 +00:00
#!/bin/sh
brightness_file="$(find /sys/devices/platform/msm_ssbi.0/ -name brightness | grep -v rgb | head -n1)"
test -z "$brightness_file" && {
echo "Can't find screen brightness file!"
exit 1
}
echo "Screen brightness : $brightness_file"
test -w "$brightness_file" || {
echo "Can't find write screen brightness file!"
exit 1
}
while true ; do
test "$(cat "$brightness_file")" -ne 255 && \
echo 255 > "$brightness_file"
sleep 1
done