Files
oneplus-turbo-6x-min-bright…/min-brightness.sh
T
2026-07-28 01:20:38 +00:00

14 lines
398 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 2 && $BRIGHTNESS -ne 0 ]]; then
settings put system screen_brightness 2
fi
exit 0