Home | History | Annotate | Download | only in sepolicy
      1 # kickstart processes and scripts (system process)
      2 type kickstart, domain;
      3 type kickstart_exec, file_type, exec_type;
      4 
      5 init_daemon_domain(kickstart)
      6 
      7 # Run kickstart_checker.sh
      8 allow kickstart shell_exec:file { entrypoint read };
      9 allow kickstart kickstart_exec:file { getattr open execute_no_trans };
     10 
     11 # kickstart_checker.sh changes block devices
     12 # /dev/block/platform/msm_sdcc.1/by-name/m9kefs*
     13 allow kickstart self:capability { chown fowner };
     14 
     15 # Spawn /system/bin/efsks and /system/bin/ks
     16 allow kickstart kickstart_exec:file { open execute_no_trans getattr };
     17 
     18 # Let qcks access /dev/mdm node (modem driver)
     19 allow kickstart radio_device:chr_file r_file_perms;
     20 
     21 # Access USB host ks bridge drivers
     22 allow kickstart kickstart_device:chr_file rw_file_perms;
     23 
     24 # Read and write to /dev/block/mmcblk0p[567]
     25 allow kickstart efs_block_device:blk_file { setattr rw_file_perms };
     26 allow kickstart block_device:dir { getattr write search };
     27 
     28 # Write contents of block device to kickstart data dir
     29 allow kickstart kickstart_data_file:file create_file_perms;
     30 allow kickstart kickstart_data_file:dir rw_dir_perms;
     31 
     32 # Read radio firmware file(s)
     33 allow kickstart radio_efs_file:dir search;
     34 allow kickstart radio_efs_file:file r_file_perms;
     35 
     36 # Run dd from toolbox on firmware files
     37 allow kickstart shell_exec:file rx_file_perms;
     38 allow kickstart system_file:file execute_no_trans;
     39 
     40 # Wake lock access
     41 wakelock_use(kickstart)
     42 
     43 # Set property key gsm.radio.kickstart
     44 allow kickstart radio_prop:property_service set;
     45 unix_socket_connect(kickstart, property, init)
     46 
     47 # Access /sys/module/rmnet_usb/parameters/rmnet_data_init
     48 allow kickstart sysfs_rmnet:file w_file_perms;
     49