common: Add policy for inscreen fp HAL
authorAndreas Schneider <asn@cryptomilk.org>
Tue, 14 Apr 2020 08:21:06 +0000 (10:21 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 16 Apr 2020 19:11:36 +0000 (21:11 +0200)
Change-Id: Id846e19e2a27ab8b723a1f704dab195409f21d79

common/vendor/file_contexts
common/vendor/hal_fingerprint_default.te
common/vendor/hal_lineage_fod_default.te [new file with mode: 0644]
common/vendor/hwservice.te
common/vendor/hwservice_contexts

index fb80364aa22bd7a754b8772fb98c90a7b885ac8d..4c77ff21e96a788f765ea8533deed7dbd34ba041 100644 (file)
 /(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
 
index cce1395914e50ebde5d051b4e1b548eca47e2530..cf3daea11817b6bd798bb1385996f503c473f977 100644 (file)
@@ -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 (file)
index 0000000..b387a7b
--- /dev/null
@@ -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;
index 01f680f8fd9ccf5d0146e494d07e11b5610cda1d..d890e4e21784e8cfd1805bbd54a129ef9b70bba9 100644 (file)
@@ -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;
index 68ce47e3fefa75b5cb0426bf11941fa27830a666..0421eb4441ce1b6656e7dceace6748a2c0abd276 100644 (file)
@@ -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