1# Modem helper service. Spawns kickstart.
2type mdm_helper, domain, domain_deprecated;
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 toolbox_exec:file rx_file_perms;
41allow mdm_helper system_file:file x_file_perms;
42
43allow mdm_helper sysfs_xhci_msm_hsic:dir r_dir_perms;
44allow mdm_helper sysfs_xhci_msm_hsic:file rw_file_perms;
45allow mdm_helper sysfs_msm_hsic_host:file write;
46
47# host_ready not labeled correctly
48allow mdm_helper sysfs:file write;
49allow mdm_helper sysfs_usb:file write;
50
51wakelock_use(mdm_helper)
52
53# change ownership of modem log files
54allow mdm_helper self:capability { fowner chown fsetid };
55
56# Write ram dump logs
57allow mdm_helper ram_dump_logs:dir create_dir_perms;
58allow mdm_helper ram_dump_logs:file create_file_perms;
59
60# write modem logs to dropbox
61allow mdm_helper dropbox_data_file:dir rw_dir_perms;
62allow mdm_helper dropbox_data_file:file create_file_perms;
63
64# write radio properties
65set_prop(mdm_helper, radio_prop)
66