From ef0936947ec2bc3ac770dc146629affdaa64e781 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 22 Aug 2019 00:45:53 +0200 Subject: [PATCH] We need to restart samsung hal when doing chown --- rw-system.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rw-system.sh b/rw-system.sh index 7f0373b..657c51d 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -364,9 +364,13 @@ if getprop ro.vendor.build.fingerprint | grep -qiE '^samsung/' && [ "$vndk" -ge chown system /sys/class/power_supply/battery/wc_tx_en chcon u:object_r:sysfs_app_writable:s0 /sys/class/power_supply/battery/wc_tx_en - chown system:system /sys/class/sec/tsp/input/enabled fi + if [ "$(stat -c '%U' /sys/class/sec/tsp/input/enabled)" == "root" ] && + [ "$(stat -c '%G' /sys/class/sec/tsp/input/enabled)" == "root" ];then + chown system:system /sys/class/sec/tsp/input/enabled + setprop ctl.restart sec-miscpower-1-0 + fi fi if [ -f /system/phh/secure ];then