diff --git a/rw-system.sh b/rw-system.sh index cacda06..0372b10 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -816,9 +816,11 @@ fi if getprop ro.vendor.build.fingerprint |grep -qiE '^samsung/';then for f in /sys/class/lcd/panel/actual_mask_brightness /sys/class/lcd/panel/mask_brightness /sys/class/lcd/panel/device/backlight/panel/brightness /sys/class/backlight/panel0-backlight/brightness;do - chcon u:object_r:sysfs_lcd_writable:s0 $f - chmod 0644 $f - chown system:system $f + if [ "$(stat -c '%U' "$f")" == "root" ];then + chcon u:object_r:sysfs_lcd_writable:s0 $f + chmod 0644 $f + chown system:system $f + fi done setprop persist.sys.phh.fod.samsung true