From 084a5e669eca8064762c2a9a322281f67712201f Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 4 Dec 2019 20:34:35 +0100 Subject: [PATCH] Fix fingerprint gestures on huawei pie vendor --- rw-system.sh | 5 +++++ sepolicy/treble_app.te | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/rw-system.sh b/rw-system.sh index 2b49569..af30c29 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -66,6 +66,11 @@ fixSPL() { changeKeylayout() { cp -a /system/usr/keylayout /mnt/phh/keylayout changed=false + if grep -q vendor.huawei.hardware.biometrics.fingerprint /vendor/etc/vintf/manifest.xml; then + changed=true + cp /system/phh/huawei/fingerprint.kl /mnt/phh/keylayout/fingerprint.kl + chmod 0644 /mnt/phh/keylayout/fingerprint.kl + fi if getprop ro.vendor.build.fingerprint | grep -qE -e "^samsung"; then diff --git a/sepolicy/treble_app.te b/sepolicy/treble_app.te index f78a29a..e5832cb 100644 --- a/sepolicy/treble_app.te +++ b/sepolicy/treble_app.te @@ -11,3 +11,11 @@ set_prop(system_app, vendor_camera_prop); #Used to control double-tap-to-wake on Xiaomi allow system_app input_device:chr_file rw_file_perms; allow system_app input_device:dir r_dir_perms; + +type hal_ext_fingerprint_hwservice, hwservice_manager_type; +allow system_app hal_ext_fingerprint_hwservice:hwservice_manager { find }; +type hal_fingerprint_default, domain; +allow system_app hal_fingerprint_default:binder { call }; +allow system_app sysfs_power:dir r_dir_perms; +allow system_app sysfs_power:file rw_file_perms; +allow system_app sysfs_power:lnk_file read;