Created
December 18, 2022 14:00
-
-
Save YumeMichi/ddf79d5bfdd026680248862c478798e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From da30d96a525a4a64cf208a607172a84a88004ca7 Mon Sep 17 00:00:00 2001 | |
From: Yuan Si <[email protected]> | |
Date: Sun, 18 Dec 2022 19:30:28 +0800 | |
Subject: [PATCH] sepolicy: qti: Label Osense HAL | |
Signed-off-by: Yuan Si <[email protected]> | |
--- | |
sepolicy/qti/vendor/file_contexts | 4 ++++ | |
sepolicy/qti/vendor/hal_camera_default.te | 2 ++ | |
sepolicy/qti/vendor/hal_fingerprint_default.te | 2 ++ | |
sepolicy/qti/vendor/hwservice.te | 3 +++ | |
sepolicy/qti/vendor/hwservice_contexts | 3 +++ | |
5 files changed, 14 insertions(+) | |
diff --git a/sepolicy/qti/vendor/file_contexts b/sepolicy/qti/vendor/file_contexts | |
index 31e3625..9b12e48 100644 | |
--- a/sepolicy/qti/vendor/file_contexts | |
+++ b/sepolicy/qti/vendor/file_contexts | |
@@ -47,6 +47,10 @@ | |
/(vendor|system/vendor)/bin/hw/android\.hardware\.nfc_snxxx@1\.2-service u:object_r:hal_nfc_default_exec:s0 | |
/dev/pn553 u:object_r:nfc_device:s0 | |
+# Osense | |
+/(odm|vendor/odm)/lib64/libosensehalclient\.so u:object_r:same_process_hal_file:s0 | |
+/(odm|vendor/odm)/lib64/vendor\.oplus\.hardware\.osense\.client@1\.0\.so u:object_r:same_process_hal_file:s0 | |
+ | |
# Partitions | |
/dev/block/platform/soc/1d84000\.ufshc/by-name/vbmeta_vendor_[ab] u:object_r:vendor_custom_ab_block_device:s0 | |
/dev/block/platform/soc/1d84000\.ufshc/by-name/engineering_cdt_[ab] u:object_r:vendor_custom_ab_block_device:s0 | |
diff --git a/sepolicy/qti/vendor/hal_camera_default.te b/sepolicy/qti/vendor/hal_camera_default.te | |
index 43c0a6e..2c2d259 100644 | |
--- a/sepolicy/qti/vendor/hal_camera_default.te | |
+++ b/sepolicy/qti/vendor/hal_camera_default.te | |
@@ -4,6 +4,8 @@ hal_client_domain(hal_camera_default, vendor_hal_cameraMDM) | |
allow hal_camera_default vendor_hal_orms_hwservice:hwservice_manager find; | |
+allow hal_camera_default vendor_hal_osense_client_hwservice:hwservice_manager find; | |
+ | |
allow hal_camera_default mnt_vendor_file:dir search; | |
allow hal_camera_default proc_meminfo:file r_file_perms; | |
diff --git a/sepolicy/qti/vendor/hal_fingerprint_default.te b/sepolicy/qti/vendor/hal_fingerprint_default.te | |
index 71248ea..f9ab42c 100644 | |
--- a/sepolicy/qti/vendor/hal_fingerprint_default.te | |
+++ b/sepolicy/qti/vendor/hal_fingerprint_default.te | |
@@ -4,6 +4,8 @@ binder_call(hal_fingerprint_default, hal_fingerprint_default) | |
allow hal_fingerprint_default vendor_hal_orms_hwservice:hwservice_manager find; | |
+allow hal_fingerprint_default vendor_hal_osense_client_hwservice:hwservice_manager find; | |
+ | |
allow hal_fingerprint_default fingerprint_device:chr_file rw_file_perms; | |
allow hal_fingerprint_default graphics_device:chr_file rw_file_perms; | |
allow hal_fingerprint_default tee_device:chr_file rw_file_perms; | |
diff --git a/sepolicy/qti/vendor/hwservice.te b/sepolicy/qti/vendor/hwservice.te | |
index 45ee508..08adea1 100644 | |
--- a/sepolicy/qti/vendor/hwservice.te | |
+++ b/sepolicy/qti/vendor/hwservice.te | |
@@ -8,5 +8,8 @@ type hal_ifaa_hwservice, hwservice_manager_type; | |
# ORMS | |
type vendor_hal_orms_hwservice, hwservice_manager_type, protected_hwservice; | |
+# Osense | |
+type vendor_hal_osense_client_hwservice, hwservice_manager_type, protected_hwservice; | |
+ | |
# Sensors | |
type vendor_hal_oplusSensor_hwservice, hwservice_manager_type, protected_hwservice; | |
diff --git a/sepolicy/qti/vendor/hwservice_contexts b/sepolicy/qti/vendor/hwservice_contexts | |
index ed6a7b9..74d281a 100644 | |
--- a/sepolicy/qti/vendor/hwservice_contexts | |
+++ b/sepolicy/qti/vendor/hwservice_contexts | |
@@ -23,6 +23,9 @@ vendor.nxpnq330.nxpese::INxpEse u:object_r:hal_nfc_hwservice:s | |
# ORMS | |
vendor.oplus.hardware.orms::IOrmsHalProxy u:object_r:vendor_hal_orms_hwservice:s0 | |
+# Osense | |
+vendor.oplus.hardware.osense.client::IOsenseHalReporter u:object_r:vendor_hal_osense_client_hwservice:s0 | |
+ | |
# Sensors | |
vendor.oplus.hardware.oplusSensor::ISensorFeature u:object_r:vendor_hal_oplusSensor_hwservice:s0 | |
-- | |
2.39.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment