diff --git a/sepolicy/cameraserver.te b/sepolicy/cameraserver.te index 1e7e9a6..e392a31 100644 --- a/sepolicy/cameraserver.te +++ b/sepolicy/cameraserver.te @@ -1,3 +1,6 @@ allow cameraserver gpu_device:chr_file rw_file_perms; set_prop(cameraserver, camera_prop) + +allow cameraserver sysfs_camera:file r_file_perms; +allow cameraserver sysfs_camera:dir search; diff --git a/sepolicy/file.te b/sepolicy/file.te index 4355c58..22f4cc2 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -1,4 +1,5 @@ type sysfs_graphics, sysfs_type, fs_type; +type sysfs_camera, sysfs_type, fs_type; type qmuxd_socket, file_type; type netmgrd_socket, file_type; type thermal_socket, file_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 04da4e7..8b73968 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -43,6 +43,7 @@ /sys/devices/virtual/thermal(/.*)? u:object_r:sysfs_thermal:s0 /sys/module/msm_thermal(/.*)? u:object_r:sysfs_thermal:s0 /sys/devices/virtual/graphics/fb([0-2])+/idle_time u:object_r:sysfs_graphics:s0 +/sys/devices/soc/8c0000\.qcom,msm-cam(/.*)? u:object_r:sysfs_camera:s0 # files in /system /system/bin/init\.power\.sh u:object_r:init_power_exec:s0