1# Modem helper service. Spawns kickstart.
2type mdm_helper, domain;
3type mdm_helper_exec, file_type, exec_type;
4
5init_daemon_domain(mdm_helper)
6
7# access /sys/power/wakelock
8allow mdm_helper self:capability dac_override;
9
10# Spawn /system/bin/efsks and /system/bin/ks
11allow mdm_helper mdm_helper_exec:file rx_file_perms;
12
13# Access USB host ks bridge drivers
14allow mdm_helper mdm_helper_device:chr_file rw_file_perms;
15
16# Read and write for EFS
17allow mdm_helper efs_block_device:blk_file rw_file_perms;
18allow mdm_helper block_device:dir { getattr write search };
19
20# Let qcks access /dev/mdm node (modem driver)??
21allow mdm_helper radio_device:chr_file r_file_perms;
22# Access the modem Hand Over Block (HOB)
23allow mdm_helper modem_hob_block_device:blk_file rw_file_perms;
24# ks checks the writeback path (dir) for the EFS block devices to make sure it is valid
25allow mdm_helper block_device:dir getattr;
26
27allow mdm_helper firmware_file:dir r_dir_perms;
28allow mdm_helper firmware_file:file r_file_perms;
29
30allow mdm_helper fsg_file:dir r_dir_perms;
31allow mdm_helper fsg_file:file r_file_perms;
32
33allow mdm_helper persist_file:dir r_dir_perms;
34allow mdm_helper persist_modem_file:dir rw_dir_perms;
35allow mdm_helper persist_modem_file:file create_file_perms;
36
37# Runs commands via sh.
38allow mdm_helper shell_exec:file rx_file_perms;
39# TODO remove once the modem team removes system() calls to toolbox functions
40allow mdm_helper system_file:file x_file_perms;
41
42allow mdm_helper sysfs_xhci_msm_hsic:dir r_dir_perms;
43allow mdm_helper sysfs_xhci_msm_hsic:file rw_file_perms;
44allow mdm_helper sysfs_msm_hsic_host:file write;
45
46# host_ready not labeled correctly
47allow mdm_helper sysfs:file write;
48
49wakelock_use(mdm_helper)
50
51# change ownership of modem log files
52allow mdm_helper self:capability { fowner chown fsetid };
53
54# Write ram dump logs
55allow mdm_helper ram_dump_logs:dir create_dir_perms;
56allow mdm_helper ram_dump_logs:file create_file_perms;
57
58# write modem logs to dropbox
59allow mdm_helper dropbox_data_file:dir rw_dir_perms;
60allow mdm_helper dropbox_data_file:file create_file_perms;
61
62# write radio properties
63unix_socket_connect(mdm_helper, property, init)
64allow mdm_helper radio_prop:property_service set;
65