Files
oneplus-turbo-6x-min-bright…/min-brightness.sh
T
2026-07-20 07:31:05 +08:00

14 lines
378 B
Bash

#!/system/bin/sh
# This script checks the current brightness ensures a minimum brightness of 2.
# This prevents the black screen if the brightness is 1(screen_brightness).
BRIGHTNESS_FILE=/sys/devices/platform/mtk-leds/leds/lcd-backlight/brightness
BRIGHTNESS="$(cat "$BRIGHTNESS_FILE")"
if [ "$BRIGHTNESS" -lt 15 ]; then
settings put system screen_brightness 2
fi
exit 0