diff --git a/rw-system.sh b/rw-system.sh index f215de1..8f66fdd 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;