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