type mm-qcamerad, domain; type mm-qcamerad_exec, exec_type, file_type; init_daemon_domain(mm-qcamerad) #added to support EZTune for camera userdebug_or_eng(` allow mm-qcamerad debugfs:dir r_dir_perms; allow mm-qcamerad debugfs:file read; allow mm-qcamerad camera_data_file:file create_file_perms; allow mm-qcamerad self:tcp_socket create_stream_socket_perms; allow mm-qcamerad node:tcp_socket node_bind; # IMS use camera daemon to make VT call allow mm-qcamerad port:tcp_socket name_bind; allow mm-qcamerad self:tcp_socket { accept listen }; allow mm-qcamerad camera_data_file:file create_file_perms; # mm-qcamerad needs to set persist.camera. property allow mm-qcamerad camera_prop:property_service set; ') #Communicate with user land process through domain socket allow mm-qcamerad camera_socket:sock_file { create unlink write }; allow mm-qcamerad camera_socket:dir w_dir_perms; unix_socket_connect(mm-qcamerad, sensors, sensors) #Allow connections between sensor manager and mm-qcamerad allow mm-qcamerad system_server:unix_stream_socket rw_socket_perms; binder_call(mm-qcamerad, system_server); binder_use(mm-qcamerad); allow mm-qcamerad self:process execmem; # Interact with other media devices allow mm-qcamerad camera_device:dir r_dir_perms; allow mm-qcamerad { gpu_device video_device camera_device sensors_device }:chr_file rw_file_perms; allow mm-qcamerad { surfaceflinger mediaserver }:fd use; allow mm-qcamerad camera_data_file:dir w_dir_perms; allow mm-qcamerad camera_data_file:sock_file { create unlink }; #Allows camera to call ADSP QDSP6 functionality allow mm-qcamerad qdsp_device:chr_file rw_file_perms; #Allows sensor service(running in camera daemon) to invoke service manager API allow mm-qcamerad sensorservice_service:service_manager find; #allow mm-qcamerad to access /dsp r_dir_file(mm-qcamerad, adsprpcd_file); r_dir_file(mm-qcamerad, firmware_file) allow mm-qcamerad graphics_device:dir r_dir_perms; #Allow access to /dev/graphics/fb* for screen capture allow mm-qcamerad graphics_device:chr_file rw_file_perms; unix_socket_connect(mm-qcamerad, property, init) #Allow camera work normally in FFBM binder_call(mm-qcamerad, mmi);