1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
type mm-qcamerad, domain;
type mm-qcamerad_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(mm-qcamerad)
#added to support EZTune for camera
userdebug_or_eng(`
allow mm-qcamerad qti_debugfs:dir r_dir_perms;
allow mm-qcamerad qti_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
set_prop(mm-qcamerad, camera_prop)
')
#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:socket create_socket_perms_no_ioctl;
allow mm-qcamerad persist_file:dir r_dir_perms;
allow mm-qcamerad sensors_persist_file:dir r_dir_perms;
allow mm-qcamerad sensors_persist_file:file r_file_perms;
allow mm-qcamerad self:process execmem;
# Interact with other media devices
allow mm-qcamerad video_device:dir r_dir_perms;
allow mm-qcamerad { gpu_device video_device sensors_device }:chr_file rw_file_perms;
allow mm-qcamerad { surfaceflinger mediaserver cameraserver hal_camera untrusted_app_all priv_app snap_app }:fd use;
allow mm-qcamerad camera_data_file:dir w_dir_perms;
#allow mm-qcamerad camera_data_file:sock_file { create unlink };
allow mm-qcamerad vendor_camera_data_file:dir w_dir_perms;
allow mm-qcamerad vendor_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;
#Allow camera work normally in FFBM
binder_call(mm-qcamerad, mmi);
#Allow camera to access laser nodes
allow mm-qcamerad input_device:dir r_dir_perms;
allow mm-qcamerad input_device:chr_file r_file_perms;
allow mm-qcamerad sysfs_laser:file rw_file_perms;
hal_client_domain(mm-qcamerad, hal_graphics_allocator)
allow mm-qcamerad ion_device:chr_file rw_file_perms;
#allow camera to access Isensormanager
allow mm-qcamerad fwk_sensor_hwservice:hwservice_manager find;
binder_call(mm-qcamerad, system_server)
#allow camera to access system file/dir for CAC3 functionality
allow mm-qcamerad system_file:dir r_dir_perms;
# from sensors team
allow mm-qcamerad self:socket create_socket_perms;
allowxperm mm-qcamerad self:socket ioctl msm_sock_ipc_ioctls;
allow mm-qcamerad sysfs_data:file r_file_perms;
#for v4L node "name" access
allow mm-qcamerad sysfs_graphics:file rw_file_perms;
|