upload scripts

This commit is contained in:
pluv authored and GitHub committed 2026-07-20 07:31:05 +08:00
commit 380e50e268
8 files changed
+90

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#!/system/bin/sh
# Do NOT assume where your module will be located. ALWAYS use $MODDIR if you
# need to know where this script and module is placed. This will make sure your
# module will work if Magisk changes it's mount point in the future.
MODDIR="${0%/*}"
BRIGHTNESS_FILE=/sys/devices/platform/mtk-leds/leds/lcd-backlight/brightness
BRIGHTNESS_SCRIPT="$MODDIR/min-brightness.sh"
until [ "$(getprop sys.boot_completed)" = 1 ] && \
[ "$(getprop dev.bootcomplete)" = 1 ] && \
[ "$(getprop service.bootanim.exit)" = 1 ] && \
[ "$(getprop init.svc.bootanim)" = stopped ]; do
sleep 5
done
# Monitor writes to $BRIGHTNESS_FILE and call $BRIGHTNESS_SCRIPT.
while true; do
/system/bin/sh "$BRIGHTNESS_SCRIPT"
sleep 2
done
exit 0