From e5bc422c553e6cb69b608766537ee172f9433998 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 14 Apr 2020 10:21:06 +0200 Subject: [PATCH] common: Add policy for inscreen fp HAL Change-Id: Id846e19e2a27ab8b723a1f704dab195409f21d79 --- common/vendor/file_contexts | 1 + common/vendor/hal_fingerprint_default.te | 2 ++ common/vendor/hal_lineage_fod_default.te | 12 ++++++++++++ common/vendor/hwservice.te | 1 + common/vendor/hwservice_contexts | 2 +- 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 common/vendor/hal_lineage_fod_default.te diff --git a/common/vendor/file_contexts b/common/vendor/file_contexts index fb80364..4c77ff2 100644 --- a/common/vendor/file_contexts +++ b/common/vendor/file_contexts @@ -115,6 +115,7 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.light@[0-9].[0-9]-service\.samsung u:object_r:hal_light_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.power@[0-9].[0-9]-service\.exynos u:object_r:hal_power_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator@[0-9].[0-9]-service\.samsung-haptic u:object_r:hal_vibrator_default_exec:s0 +/(vendor|system/vendor)/bin/hw/vendor\.lineage\.biometrics\.fingerprint\.inscreen@1.0-service.samsung u:object_r:hal_lineage_fod_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.samsung_slsi\.hardware\.configstore@[0-9]\.[0-9]-service u:object_r:hal_vendor_configstore_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.samsung_slsi\.hardware\.ExynosHWCServiceTW@[0-9]\.[0-9]-service u:object_r:hal_vendor_hwcservice_default_exec:s0 diff --git a/common/vendor/hal_fingerprint_default.te b/common/vendor/hal_fingerprint_default.te index cce1395..cf3daea 100644 --- a/common/vendor/hal_fingerprint_default.te +++ b/common/vendor/hal_fingerprint_default.te @@ -1,5 +1,7 @@ # hal_fingerprint_default.te +add_hwservice(hal_fingerprint_default, hal_vendor_fingerprint_hwservice) + # /dev/esfp[0-9] allow hal_fingerprint_default fp_sensor_device:chr_file rw_file_perms; diff --git a/common/vendor/hal_lineage_fod_default.te b/common/vendor/hal_lineage_fod_default.te new file mode 100644 index 0000000..b387a7b --- /dev/null +++ b/common/vendor/hal_lineage_fod_default.te @@ -0,0 +1,12 @@ +# hal_lineage_fod_default.te + +binder_call(hal_lineage_fod_default, hal_fingerprint_default) + +allow hal_lineage_fod_default hal_vendor_fingerprint_hwservice:hwservice_manager find; + +# /sys/class/backlight/panel/brightness +allow hal_lineage_fod_default sysfs_backlight_writable:file rw_file_perms; + +# /sys/class/sec/tsp/cmd +allow hal_lineage_fod_default sysfs_sec_touchscreen:dir r_dir_perms; +allow hal_lineage_fod_default sysfs_touchscreen_writable:file rw_file_perms; diff --git a/common/vendor/hwservice.te b/common/vendor/hwservice.te index 01f680f..d890e4e 100644 --- a/common/vendor/hwservice.te +++ b/common/vendor/hwservice.te @@ -1,4 +1,5 @@ # hwservice.te +type hal_vendor_fingerprint_hwservice, hwservice_manager_type; type hal_vendor_configstore_hwservice, hwservice_manager_type; type hal_vendor_surfaceflinger_hwservice, hwservice_manager_type; diff --git a/common/vendor/hwservice_contexts b/common/vendor/hwservice_contexts index 68ce47e..0421eb4 100644 --- a/common/vendor/hwservice_contexts +++ b/common/vendor/hwservice_contexts @@ -1,5 +1,5 @@ # hwservice_contexts -vendor.samsung.hardware.biometrics.fingerprint::ISecBiometricsFingerprint u:object_r:hal_fingerprint_hwservice:s0 +vendor.samsung.hardware.biometrics.fingerprint::ISecBiometricsFingerprint u:object_r:hal_vendor_fingerprint_hwservice:s0 vendor.samsung_slsi.hardware.ExynosHWCServiceTW::IExynosHWCServiceTW u:object_r:hal_vendor_surfaceflinger_hwservice:s0 vendor.samsung_slsi.hardware.configstore::IExynosHWCConfigs u:object_r:hal_vendor_configstore_hwservice:s0 -- 2.20.1