diff --git a/sepolicy/vendor/attributes b/sepolicy/vendor/attributes index edab863..0981fe0 100644 --- a/sepolicy/vendor/attributes +++ b/sepolicy/vendor/attributes @@ -1,3 +1,12 @@ +# Camera +attribute vendor_hal_cameraperf; +attribute vendor_hal_cameraperf_client; +attribute vendor_hal_cameraperf_server; +attribute vendor_hal_camerapostproc_xiaomi; +attribute vendor_hal_camerapostproc_xiaomi_client; +attribute vendor_hal_camerapostproc_xiaomi_server; + +# Citsensor attribute vendor_hal_citsensorservice_xiaomi; attribute vendor_hal_citsensorservice_xiaomi_client; attribute vendor_hal_citsensorservice_xiaomi_server; diff --git a/sepolicy/vendor/hal_camera_default.te b/sepolicy/vendor/hal_camera_default.te index 8c1cf0a..e9e5293 100644 --- a/sepolicy/vendor/hal_camera_default.te +++ b/sepolicy/vendor/hal_camera_default.te @@ -1,6 +1,15 @@ type camera_persist_file, vendor_persist_type, file_type; +type vendor_hal_cameraperf_hwservice, hwservice_manager_type, protected_hwservice; +type vendor_hal_camerapostproc_xiaomi_hwservice, hwservice_manager_type; vendor_internal_prop(vendor_camera_sensor_prop) set_prop(hal_camera_default, vendor_camera_sensor_prop) r_dir_file(hal_camera_default, camera_persist_file) r_dir_file(hal_camera_default, mnt_vendor_file) + +hal_server_domain(hal_camera_default, vendor_hal_cameraperf) +hal_server_domain(hal_camera_default, vendor_hal_camerapostproc_xiaomi) +add_hwservice(hal_camera_server, vendor_hal_cameraperf_hwservice) +add_hwservice(hal_camera_server, vendor_hal_camerapostproc_xiaomi_hwservice) +allow hal_camera_client vendor_hal_cameraperf_hwservice:hwservice_manager find; +allow hal_camera_client vendor_hal_camerapostproc_xiaomi_hwservice:hwservice_manager find; diff --git a/sepolicy/vendor/hal_cameraperf.te b/sepolicy/vendor/hal_cameraperf.te new file mode 100644 index 0000000..460de0c --- /dev/null +++ b/sepolicy/vendor/hal_cameraperf.te @@ -0,0 +1,4 @@ +add_hwservice(vendor_hal_cameraperf_server, vendor_hal_cameraperf_hwservice) +allow vendor_hal_cameraperf_client vendor_hal_cameraperf_hwservice:hwservice_manager find; +binder_call(vendor_hal_cameraperf_client, vendor_hal_cameraperf_server) +binder_call(vendor_hal_cameraperf_server, vendor_hal_cameraperf_client) diff --git a/sepolicy/vendor/hal_camerapostproc_xiaomi.te b/sepolicy/vendor/hal_camerapostproc_xiaomi.te new file mode 100644 index 0000000..3ea6494 --- /dev/null +++ b/sepolicy/vendor/hal_camerapostproc_xiaomi.te @@ -0,0 +1,4 @@ +add_hwservice(vendor_hal_camerapostproc_xiaomi_server, vendor_hal_camerapostproc_xiaomi_hwservice) +allow vendor_hal_camerapostproc_xiaomi_client vendor_hal_camerapostproc_xiaomi_hwservice:hwservice_manager find; +binder_call(vendor_hal_camerapostproc_xiaomi_client, vendor_hal_camerapostproc_xiaomi_server) +binder_call(vendor_hal_camerapostproc_xiaomi_server, vendor_hal_camerapostproc_xiaomi_client) diff --git a/sepolicy/vendor/hwservice_contexts b/sepolicy/vendor/hwservice_contexts index 4fde520..80c5f56 100644 --- a/sepolicy/vendor/hwservice_contexts +++ b/sepolicy/vendor/hwservice_contexts @@ -1,3 +1,7 @@ +# Camera +vendor.xiaomi.hardware.cameraperf::IMiCameraPerfService u:object_r:vendor_hal_cameraperf_hwservice:s0 +vendor.xiaomi.hardware.campostproc::IMiPostProcService u:object_r:vendor_hal_camerapostproc_xiaomi_hwservice:s0 + # Fingerprint vendor.xiaomi.hardware.fx.tunnel::IMiFxTunnel u:object_r:vendor_hal_fingerprint_hwservice_xiaomi:s0 vendor.xiaomi.hardware.fingerprintextension::IXiaomiFingerprint u:object_r:vendor_hal_fingerprint_hwservice_xiaomi:s0