Fix backlight on some Samsung devices
Some Samsung Q vendor devices have HWC rather than lights hal control. In those cases, backlight is controlled through another SELinux context. We used to correct this SELinux context for all devices, however this is no longer needed, and actually breaks those devices. So, change SELinux context, only if uid/gid is wrong
This commit is contained in:
parent
c7438a5be6
commit
72c62260b9
@ -816,9 +816,11 @@ fi
|
|||||||
|
|
||||||
if getprop ro.vendor.build.fingerprint |grep -qiE '^samsung/';then
|
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
|
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
|
if [ "$(stat -c '%U' "$f")" == "root" ];then
|
||||||
chmod 0644 $f
|
chcon u:object_r:sysfs_lcd_writable:s0 $f
|
||||||
chown system:system $f
|
chmod 0644 $f
|
||||||
|
chown system:system $f
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
setprop persist.sys.phh.fod.samsung true
|
setprop persist.sys.phh.fod.samsung true
|
||||||
|
Loading…
Reference in New Issue
Block a user