pmaports/device/testing/device-sony-taoshan/sony-taoshan-screen-enlightener
Oliver Smith 64035ac463
device/*: move to device/testing/* (!1063)
Prepare for better device categorization by moving everything to testing
subdir first.

[skip-ci]: chicken-egg problem: passing pmaports CI depends on pmbootstrap MR
				depends on this MR

Related: postmarketos#16
2020-03-14 08:35:32 +01:00

16 lines
498 B
Bash

#!/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