Files
device_google_wahoo/sepolicy/hal_dumpstate_impl.te
Badhri Jagan Sridharan 5fb5ea21b9 Add selinux rules for dumping usb debugfs logs
Bug: 36178613
Test: ran adb bugreport and noticed the logs to be dumped.
Change-Id: I24ba5883f7ffd5faf5bd02d0dc362feb30011c09
2017-04-21 18:38:38 +00:00

40 lines
1.5 KiB
Plaintext

type hal_dumpstate_impl, domain, vendor_executes_system_violators;
hal_server_domain(hal_dumpstate_impl, hal_dumpstate)
type hal_dumpstate_impl_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_dumpstate_impl)
# Execute dump scripts
allow hal_dumpstate_impl shell_exec:file rx_file_perms;
allow hal_dumpstate_impl toolbox_exec:file rx_file_perms;
userdebug_or_eng(`
# smlog_dump
domain_auto_trans(hal_dumpstate_impl, smlog_dump_exec, smlog_dump)
allow hal_dumpstate_impl smlog_dump_file:dir create_dir_perms;
allow hal_dumpstate_impl smlog_dump_file:file create_file_perms;
allow hal_dumpstate_impl radio_data_file:dir r_dir_perms;
allow hal_dumpstate_impl radio_vendor_data_file:dir r_dir_perms;
allow hal_dumpstate_impl netmgr_data_file:dir r_dir_perms;
allow hal_dumpstate_impl radio_data_file:file r_file_perms;
allow hal_dumpstate_impl radio_vendor_data_file:file r_file_perms;
allow hal_dumpstate_impl netmgr_data_file:file r_file_perms;
')
allow hal_dumpstate_impl uio_device:chr_file rw_file_perms;
r_dir_file(hal_dumpstate_impl, sysfs_uio)
r_dir_file(hal_dumpstate_impl, sysfs_rmtfs)
r_dir_file(hal_dumpstate_impl, sysfs_msm_subsys)
allow hal_dumpstate_impl sysfs_thermal:dir search;
allow hal_dumpstate_impl sysfs_thermal:file r_file_perms;
allow hal_dumpstate_impl debugfs_ion:dir r_dir_perms;
allow hal_dumpstate_impl debugfs_ion:file r_file_perms;
# Access to files for dumping
allow hal_dumpstate_impl sysfs:dir r_dir_perms;
# rpm stat
# usb logs
userdebug_or_eng(`allow hal_dumpstate_impl debugfs_usb:file r_file_perms;')