diff --git a/rw-system.sh b/rw-system.sh index 0e018de..fb59a3a 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -118,7 +118,7 @@ changeKeylayout() { changed=true fi - if getprop ro.vendor.build.fingerprint |grep -iq -E -e '^Lenovo/kunlun';then + if getprop ro.vendor.build.fingerprint |grep -iq -E -e '^Lenovo/' && [ -f /sys/devices/virtual/touch/tp_dev/gesture_on ];then cp /system/phh/lenovo-synaptics_dsx.kl /mnt/phh/keylayout/synaptics_dsx.kl chmod 0644 /mnt/phh/keylayout/synaptics_dsx.kl changed=true diff --git a/sepolicy/lenovo.te b/sepolicy/lenovo.te new file mode 100644 index 0000000..19e3314 --- /dev/null +++ b/sepolicy/lenovo.te @@ -0,0 +1,4 @@ +type sysfs_tp, file_type; + +#Allow treble_app access to /sys/devices/virtual/touch/tp_dev/gesture_on +allow system_app sysfs_tp:file rw_file_perms;