davinci: sepolicy: Add camera rules

Change-Id: Ifade6b81926206a8e7ab0ae0ff8d8dc657de294e
This commit is contained in:
Demon000 2020-03-04 02:33:19 +01:00 committed by Arian
parent 167d382728
commit bed948fb95
No known key found for this signature in database
GPG Key ID: 48029380598CE3B9
4 changed files with 32 additions and 0 deletions

View File

@ -1,8 +1,14 @@
# Audio
/dev/socket/audio_hw_socket u:object_r:audio_socket:s0
# Camera
/mnt/vendor/persist/camera(/.*)? u:object_r:camera_persist_file:s0
# HALs
/vendor/bin/hw/android\.hardware\.light@2\.0-service\.davinci u:object_r:hal_light_default_exec:s0
# Remosaic
/vendor/bin/remosaic_daemon u:object_r:remosaic_daemon_exec:s0
# WiFi
/vendor/bin/nv_mac u:object_r:wcnss_service_exec:s0

12
sepolicy/vendor/hal_camera_default.te vendored Normal file
View File

@ -0,0 +1,12 @@
type camera_persist_file, file_type, vendor_persist_type;
hal_client_domain(hal_camera_default, hal_power)
allow hal_camera_default proc_meminfo:file r_file_perms;
r_dir_file(hal_camera_default, sysfs_kgsl)
r_dir_file(hal_camera_default, camera_persist_file)
r_dir_file(hal_camera_default, mnt_vendor_file)
allow hal_camera_default remosaic_daemon_service:service_manager find;
binder_call(hal_camera_default, remosaic_daemon)

13
sepolicy/vendor/remosaic_daemon.te vendored Normal file
View File

@ -0,0 +1,13 @@
type remosaic_daemon, domain;
type remosaic_daemon_exec, exec_type, vendor_file_type, file_type;
type remosaic_daemon_service, vndservice_manager_type;
allow remosaic_daemon ion_device:chr_file r_file_perms;
r_dir_file(remosaic_daemon, vendor_camera_data_file)
init_daemon_domain(remosaic_daemon)
vndbinder_use(remosaic_daemon)
allow remosaic_daemon remosaic_daemon_service:service_manager add;

1
sepolicy/vendor/vndservice_contexts vendored Normal file
View File

@ -0,0 +1 @@
android.IRemosaicDaemon u:object_r:remosaic_daemon_service:s0