From 9800e43980becd73c09c5d7a4425c237cb2d4386 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 24 Jun 2020 11:11:02 +0200 Subject: [PATCH] Some devices have mask_brightness with proper selinux, wrong perms... --- rw-system.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/rw-system.sh b/rw-system.sh index afe5857..b5a209f 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -730,13 +730,11 @@ if getprop ro.vendor.build.fingerprint |grep -qiE '^xiaomi/';then fi if getprop ro.vendor.build.fingerprint |grep -qiE '^samsung/';then - if ls -lZ /sys/class/lcd/panel/mask_brightness |grep -q u:object_r:sysfs:s0;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 - done - fi + 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 + done setprop persist.sys.phh.fod.samsung true fi