Home | History | Annotate | Download | only in sepolicy
      1 type hal_dumpstate_impl, domain;
      2 hal_server_domain(hal_dumpstate_impl, hal_dumpstate)
      3 
      4 type hal_dumpstate_impl_exec, exec_type, vendor_file_type, file_type;
      5 init_daemon_domain(hal_dumpstate_impl)
      6 
      7 # Execute dump scripts
      8 allow hal_dumpstate_impl vendor_shell_exec:file rx_file_perms;
      9 allow hal_dumpstate_impl vendor_toolbox_exec:file rx_file_perms;
     10 # system file execution
     11 #allow hal_dumpstate_impl system_data_file:dir r_dir_perms;
     12 
     13 # smlog_dump
     14 allow hal_dumpstate_impl smlog_dump_exec:file rx_file_perms;
     15 userdebug_or_eng(`
     16 allow hal_dumpstate_impl smlog_dump_file:dir create_dir_perms;
     17 allow hal_dumpstate_impl smlog_dump_file:file create_file_perms;
     18 allow hal_dumpstate_impl radio_data_file:dir r_dir_perms;
     19 allow hal_dumpstate_impl netmgr_data_file:dir r_dir_perms;
     20 allow hal_dumpstate_impl radio_data_file:file r_file_perms;
     21 allow hal_dumpstate_impl netmgr_data_file:file r_file_perms;
     22 ')
     23 
     24 allow hal_dumpstate_impl uio_device:chr_file rw_file_perms;
     25 r_dir_file(hal_dumpstate_impl, sysfs_uio)
     26 r_dir_file(hal_dumpstate_impl, sysfs_rmtfs)
     27 r_dir_file(hal_dumpstate_impl, sysfs_msm_subsys)
     28 
     29 # Access to files for dumping
     30 allow hal_dumpstate_impl  sysfs:dir r_dir_perms;
     31 # rpm stat
     32 allow hal_dumpstate_impl debugfs_rpm:file r_file_perms;
     33 allow hal_dumpstate_impl debugfs_bufinfo:file r_file_perms;
     34 # wlan power stats
     35 allow hal_dumpstate_impl debugfs_wlan:dir r_dir_perms;
     36 allow hal_dumpstate_impl debugfs_wlan:file r_file_perms;
     37 # runtime-pm
     38 allow hal_dumpstate_impl debugfs_runtime_pm:file r_file_perms;
     39 # cnss
     40 allow hal_dumpstate_impl debugfs_cnss:file r_file_perms;
     41 # qsee_logger
     42 allow hal_dumpstate_impl qsee_logger_exec:file rx_file_perms;
     43 allow hal_dumpstate_impl debugfs_qsee_log:file r_file_perms;
     44 # MDP logs
     45 allow hal_dumpstate_impl debugfs_mdp:file r_file_perms;
     46 # ION HEAPS
     47 r_dir_file(hal_dumpstate_impl, debugfs_ion)
     48 # ipc
     49 r_dir_file(hal_dumpstate_impl, debugfs_ipc)
     50 # Temperatures
     51 r_dir_file(hal_dumpstate_impl, sysfs_thermal)
     52 # CPU stat
     53 r_dir_file(hal_dumpstate_impl, sysfs_devices_system_cpu)
     54 # usb logs
     55 userdebug_or_eng(`allow hal_dumpstate_impl debugfs_usb:file r_file_perms;')
     56 
     57 # Access to UFS info
     58 allow hal_dumpstate_impl sysfs_scsi_devices_0000:dir r_dir_perms;
     59 allow hal_dumpstate_impl sysfs_scsi_devices_0000:file r_file_perms;
     60 allow hal_dumpstate_impl debugfs_ufs:dir r_dir_perms;
     61 allow hal_dumpstate_impl debugfs_ufs:file r_file_perms;
     62