Be more flexible wrt when to fix Samsung backlight selinux context
This commit is contained in:
parent
bf333ce566
commit
4b86b1ccb5
@ -920,7 +920,7 @@ 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
|
||||
if [ "$(stat -c '%U' "$f")" == "root" ];then
|
||||
if [ "$(stat -c '%U' "$f")" == "root" ] || [ "$(ls -lZ "$f" | grep -oE 'u:object_r:[^:]*:s0')" == "u:object_r:sysfs:s0" ];then
|
||||
chcon u:object_r:sysfs_lcd_writable:s0 $f
|
||||
chmod 0644 $f
|
||||
chown system:system $f
|
||||
|
Loading…
Reference in New Issue
Block a user