1type hal_dumpstate_impl, domain; 2hal_server_domain(hal_dumpstate_impl, hal_dumpstate) 3 4type hal_dumpstate_impl_exec, exec_type, vendor_file_type, file_type; 5init_daemon_domain(hal_dumpstate_impl) 6 7# Execute dump scripts from vendor partition 8allow hal_dumpstate_impl vendor_shell_exec:file rx_file_perms; 9allow hal_dumpstate_impl vendor_toolbox_exec:file rx_file_perms; 10 11# Allow to read pixel-trace trace file 12allow hal_dumpstate_impl debugfs_tracing_instances:dir search; 13allow hal_dumpstate_impl debugfs_tracing_instances:file r_file_perms; 14 15userdebug_or_eng(` 16 # smlog_dump 17 domain_auto_trans(hal_dumpstate_impl, smlog_dump_exec, smlog_dump) 18 allow hal_dumpstate_impl modem_dump_file:dir create_dir_perms; 19 allow hal_dumpstate_impl modem_dump_file:file create_file_perms; 20 allow hal_dumpstate_impl radio_vendor_data_file:dir r_dir_perms; 21 allow hal_dumpstate_impl netmgr_data_file:dir r_dir_perms; 22 allow hal_dumpstate_impl radio_vendor_data_file:file r_file_perms; 23 allow hal_dumpstate_impl netmgr_data_file:file r_file_perms; 24 allow hal_dumpstate_impl debugfs_tzdbg:dir search; 25 allow hal_dumpstate_impl debugfs_tzdbg:file r_file_perms; 26 allow hal_dumpstate_impl sysfs_usb_device:dir r_dir_perms; 27 allow hal_dumpstate_impl sysfs_usb_device:file r_file_perms; 28 allow hal_dumpstate_impl sysfs_msm_subsys:file write; 29 30 set_prop(hal_dumpstate_impl, modem_diag_prop) 31') 32 33get_prop(hal_dumpstate_impl, vendor_radio_prop) 34 35allow hal_dumpstate_impl uio_device:chr_file rw_file_perms; 36r_dir_file(hal_dumpstate_impl, sysfs_uio) 37r_dir_file(hal_dumpstate_impl, sysfs_rmtfs) 38r_dir_file(hal_dumpstate_impl, sysfs_msm_subsys) 39r_dir_file(hal_dumpstate_impl, sysfs_soc) 40r_dir_file(hal_dumpstate_impl, sysfs_thermal) 41r_dir_file(hal_dumpstate_impl, sysfs_easel) 42 43allow hal_dumpstate_impl debugfs_ion:dir r_dir_perms; 44allow hal_dumpstate_impl debugfs_ion:file r_file_perms; 45allow hal_dumpstate_impl debugfs_rpm:file r_file_perms; 46allow hal_dumpstate_impl debugfs_wlan:dir r_dir_perms; 47allow hal_dumpstate_impl debugfs_wlan:file r_file_perms; 48allow hal_dumpstate_impl debugfs_icnss:dir r_dir_perms; 49allow hal_dumpstate_impl debugfs_icnss:file r_file_perms; 50allow hal_dumpstate_impl debugfs_ipc:dir r_dir_perms; 51allow hal_dumpstate_impl debugfs_ipc:file r_file_perms; 52allow hal_dumpstate_impl proc_stat:file r_file_perms; 53dontaudit hal_dumpstate_impl debugfs_tzdbg:dir search; 54dontaudit hal_dumpstate_impl debugfs_tzdbg:file r_file_perms; 55allow hal_dumpstate_impl debugfs_ufs:dir r_dir_perms; 56allow hal_dumpstate_impl debugfs_ufs:file r_file_perms; 57 58# Access to files for dumping 59allow hal_dumpstate_impl sysfs:dir r_dir_perms; 60# rpm stat 61# usb logs 62allow hal_dumpstate_impl debugfs_usb:file r_file_perms; 63 64#Access display debug data 65allow hal_dumpstate_impl display_vendor_data_file:dir r_dir_perms; 66allow hal_dumpstate_impl display_vendor_data_file:file r_file_perms; 67 68# Access to touch firmware info 69allow hal_dumpstate_impl sysfs_touch:dir r_dir_perms; 70allow hal_dumpstate_impl sysfs_touch:file rw_file_perms; 71 72# Access to UFS info 73allow hal_dumpstate_impl sysfs_scsi_devices_0000:dir r_dir_perms; 74allow hal_dumpstate_impl sysfs_scsi_devices_0000:file r_file_perms; 75 76# For collecting bugreports. 77allow hal_dumpstate_impl shell_data_file:file getattr; 78userdebug_or_eng(`allow hal_dumpstate_impl debugfs_dma_bufinfo:file r_file_perms;') 79dontaudit hal_dumpstate_impl debugfs_dma_bufinfo:file r_file_perms; 80 81# Query and dump power supply nodes 82allow hal_dumpstate_impl sysfs_batteryinfo:dir search; 83allow hal_dumpstate_impl sysfs_batteryinfo:file r_file_perms; 84 85# Dump QCOM FG content 86allow hal_dumpstate_impl debugfs_fg_sram:dir search; 87allow hal_dumpstate_impl debugfs_fg_sram:file rw_file_perms; 88