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