diff --git a/proprietary-files.txt b/proprietary-files.txt index a8c448e..0290304 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -103,6 +103,7 @@ system_ext/lib64/libaptXHD_encoder.so|e13fa70c97caaa24d061678bdee608eb8850a69e # Camera vendor/bin/hw/vendor.oneplus.hardware.camera@1.0-service vendor/bin/hw/vendor.oneplus.hardware.CameraMDMHIDL@1.0-service +vendor/bin/vl53l1_daemon_main vendor/etc/init/vendor.oneplus.hardware.camera@1.0-service.rc vendor/etc/init/vendor.oneplus.hardware.CameraMDMHIDL@1.0-service.rc vendor/lib/libcamxexternalformatutils.so @@ -203,6 +204,7 @@ vendor/lib64/libVDBlurless.so vendor/lib64/libVDDualCameraBlurlessAPI.so vendor/lib64/libVDFusionBlurlessAPI_v2.so vendor/lib64/libVDSuperPhotoAPI.so +vendor/lib64/libvl53l1_daemon.so vendor/lib64/sensors.hal.tof.so vendor/lib64/vendor.oneplus.hardware.camera@1.0.so vendor/lib64/vendor.oneplus.hardware.CameraMDMHIDL@1.0.so diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te index e76b758..131ac00 100644 --- a/sepolicy/vendor/file.te +++ b/sepolicy/vendor/file.te @@ -21,4 +21,5 @@ type sysfs_memplus, fs_type, sysfs_type; type sysfs_project_info, fs_type, sysfs_type; type sysfs_tpd, fs_type, sysfs_type; type sysfs_tri_state_key, sysfs_type, fs_type; +type sysfs_vl53l1, fs_type, sysfs_type; type vendor_sysfs_video_call_on, fs_type, sysfs_type; diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 788edca..0ddc03d 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -2,6 +2,7 @@ /(vendor|system/vendor)/bin/dashd u:object_r:dashd_exec:s0 /(vendor|system/vendor)/bin/opf-service u:object_r:opf_exec:s0 /(vendor|system/vendor)/bin/tri-state-key_daemon u:object_r:tri-state-key_daemon_exec:s0 +/(vendor|system/vendor)/bin/vl53l1_daemon_main u:object_r:vl53l1_daemon_main_exec:s0 /(vendor|system/vendor)/bin/wlchgd u:object_r:wlchgd_exec:s0 # Block devices diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts index 11b8200..efb1542 100644 --- a/sepolicy/vendor/genfs_contexts +++ b/sepolicy/vendor/genfs_contexts @@ -42,6 +42,7 @@ genfscon sysfs /devices/platform/soc/soc:oneplus_wlchg/power_supply/wireless genfscon sysfs /module/memplus_core/parameters u:object_r:sysfs_memplus:s0 genfscon sysfs /module/qpnp_smb5/parameters/call_on u:object_r:sysfs_dash_charger:s0 genfscon sysfs /module/qpnp_smb5/parameters/video_call_on u:object_r:vendor_sysfs_video_call_on:s0 +genfscon sysfs /module/stmvl53l1 u:object_r:sysfs_vl53l1:s0 # sysfs (wakeup) genfscon sysfs /devices/0306_02.01.00/wakeup u:object_r:sysfs_wakeup:s0 diff --git a/sepolicy/vendor/vl53l1_daemon_main.te b/sepolicy/vendor/vl53l1_daemon_main.te new file mode 100644 index 0000000..33f24e2 --- /dev/null +++ b/sepolicy/vendor/vl53l1_daemon_main.te @@ -0,0 +1,14 @@ +type vl53l1_daemon_main, domain; +type vl53l1_daemon_main_exec, exec_type, vendor_file_type, file_type; + +init_daemon_domain(vl53l1_daemon_main) + +allow vl53l1_daemon_main self:{ + netlink_generic_socket + netlink_iscsi_socket + netlink_kobject_uevent_socket + netlink_socket +} create_socket_perms_no_ioctl; + +allow vl53l1_daemon_main sysfs_vl53l1:dir search; +allow vl53l1_daemon_main sysfs_vl53l1:file rw_file_perms;