• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
11userdebug_or_eng(`
12  # smlog_dump
13  domain_auto_trans(hal_dumpstate_impl, smlog_dump_exec, smlog_dump)
14  allow hal_dumpstate_impl modem_dump_file:dir create_dir_perms;
15  allow hal_dumpstate_impl modem_dump_file:file create_file_perms;
16  allow hal_dumpstate_impl radio_vendor_data_file:dir r_dir_perms;
17  allow hal_dumpstate_impl netmgr_data_file:dir r_dir_perms;
18  allow hal_dumpstate_impl radio_vendor_data_file:file r_file_perms;
19  allow hal_dumpstate_impl netmgr_data_file:file r_file_perms;
20  allow hal_dumpstate_impl debugfs_ipc:dir r_dir_perms;
21  allow hal_dumpstate_impl debugfs_ipc:file r_file_perms;
22  allow hal_dumpstate_impl debugfs_tzdbg:dir search;
23  allow hal_dumpstate_impl debugfs_tzdbg:file r_file_perms;
24  allow hal_dumpstate_impl sysfs_usb_device:dir r_dir_perms;
25  allow hal_dumpstate_impl sysfs_usb_device:file r_file_perms;
26  allow hal_dumpstate_impl sysfs_msm_subsys:file write;
27
28  set_prop(hal_dumpstate_impl, modem_diag_prop)
29')
30
31get_prop(hal_dumpstate_impl, vendor_radio_prop)
32
33allow hal_dumpstate_impl uio_device:chr_file rw_file_perms;
34r_dir_file(hal_dumpstate_impl, sysfs_uio)
35r_dir_file(hal_dumpstate_impl, sysfs_rmtfs)
36r_dir_file(hal_dumpstate_impl, sysfs_msm_subsys)
37r_dir_file(hal_dumpstate_impl, sysfs_soc)
38r_dir_file(hal_dumpstate_impl, sysfs_thermal)
39r_dir_file(hal_dumpstate_impl, sysfs_easel)
40
41allow hal_dumpstate_impl debugfs_ion:dir r_dir_perms;
42allow hal_dumpstate_impl debugfs_ion:file r_file_perms;
43allow hal_dumpstate_impl debugfs_rpm:file r_file_perms;
44allow hal_dumpstate_impl debugfs_wlan:dir r_dir_perms;
45allow hal_dumpstate_impl debugfs_wlan:file r_file_perms;
46allow hal_dumpstate_impl debugfs_icnss:dir r_dir_perms;
47allow hal_dumpstate_impl debugfs_icnss:file r_file_perms;
48allow hal_dumpstate_impl debugfs_ipc:file r_file_perms;
49allow hal_dumpstate_impl proc_stat:file r_file_perms;
50allow hal_dumpstate_impl debugfs_ufs:dir r_dir_perms;
51allow hal_dumpstate_impl debugfs_ufs:file r_file_perms;
52
53# Access to files for dumping
54allow hal_dumpstate_impl  sysfs:dir r_dir_perms;
55# rpm stat
56# usb logs
57allow hal_dumpstate_impl debugfs_usb:file r_file_perms;
58
59#Access display debug data
60allow hal_dumpstate_impl display_vendor_data_file:dir r_dir_perms;
61allow hal_dumpstate_impl display_vendor_data_file:file r_file_perms;
62
63# Access to touch firmware info
64allow hal_dumpstate_impl sysfs_touch:dir r_dir_perms;
65allow hal_dumpstate_impl sysfs_touch:file rw_file_perms;
66
67# Access to UFS info
68allow hal_dumpstate_impl sysfs_scsi_devices_0000:dir r_dir_perms;
69allow hal_dumpstate_impl sysfs_scsi_devices_0000:file r_file_perms;
70
71# For collecting bugreports.
72allow hal_dumpstate_impl shell_data_file:file getattr;
73userdebug_or_eng(`allow hal_dumpstate_impl debugfs_dma_bufinfo:file r_file_perms;')
74dontaudit hal_dumpstate_impl debugfs_dma_bufinfo:file r_file_perms;
75
76# Query and dump power supply nodes
77allow hal_dumpstate_impl sysfs_batteryinfo:dir search;
78allow hal_dumpstate_impl sysfs_batteryinfo:file r_file_perms;
79
80# Dump QCOM FG content
81allow hal_dumpstate_impl debugfs_fg_sram:dir search;
82allow hal_dumpstate_impl debugfs_fg_sram:file rw_file_perms;
83