• 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
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 radio_vendor_data_file:file r_file_perms;
22  allow hal_dumpstate_impl netmgr_data_file:dir r_dir_perms;
23  allow hal_dumpstate_impl netmgr_data_file: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 ssr_log_file:dir search;
27  allow hal_dumpstate_impl ssr_log_file:file r_file_perms;
28  allow hal_dumpstate_impl tcpdump_vendor_data_file:dir create_dir_perms;
29  allow hal_dumpstate_impl tcpdump_vendor_data_file:file create_file_perms;
30
31  set_prop(hal_dumpstate_impl, vendor_modem_diag_prop)
32  set_prop(hal_dumpstate_impl, vendor_tcpdump_log_prop)
33
34  #Dump perfstatsd
35  allow hal_dumpstate_impl perfstatsd_exec:file rx_file_perms;
36  allow hal_dumpstate_impl perfstatsd_service:service_manager find;
37  vndbinder_use(hal_dumpstate_impl)
38  binder_call(hal_dumpstate_impl, perfstatsd)
39')
40
41# modem stat
42domain_auto_trans(hal_dumpstate_impl, modem_svc_exec, modem_svc)
43allow hal_dumpstate_impl modem_stat_data_file:file r_file_perms;
44
45dontaudit hal_dumpstate_impl modem_dump_file:dir create_dir_perms;
46dontaudit hal_dumpstate_impl modem_dump_file:file create_file_perms;
47
48allow hal_dumpstate_impl uio_device:chr_file rw_file_perms;
49r_dir_file(hal_dumpstate_impl, sysfs_uio)
50r_dir_file(hal_dumpstate_impl, sysfs_rmtfs)
51r_dir_file(hal_dumpstate_impl, sysfs_msm_subsys)
52r_dir_file(hal_dumpstate_impl, sysfs_soc)
53r_dir_file(hal_dumpstate_impl, sysfs_thermal)
54r_dir_file(hal_dumpstate_impl, sysfs_easel)
55
56allow hal_dumpstate_impl sysfs_rpm:file r_file_perms;
57allow hal_dumpstate_impl sysfs_system_sleep_stats:file r_file_perms;
58
59allow hal_dumpstate_impl debugfs_ion:dir r_dir_perms;
60allow hal_dumpstate_impl debugfs_ion:file r_file_perms;
61allow hal_dumpstate_impl debugfs_wlan:dir r_dir_perms;
62allow hal_dumpstate_impl debugfs_wlan:file r_file_perms;
63allow hal_dumpstate_impl debugfs_icnss:dir r_dir_perms;
64allow hal_dumpstate_impl debugfs_icnss:file r_file_perms;
65allow hal_dumpstate_impl debugfs_ipc:dir r_dir_perms;
66allow hal_dumpstate_impl debugfs_ipc:file r_file_perms;
67allow hal_dumpstate_impl debugfs_f2fs:dir r_dir_perms;
68allow hal_dumpstate_impl debugfs_f2fs:file r_file_perms;
69allow hal_dumpstate_impl debugfs_tzdbg:dir search;
70allow hal_dumpstate_impl debugfs_tzdbg:file r_file_perms;
71allow hal_dumpstate_impl debugfs_ufs:dir r_dir_perms;
72allow hal_dumpstate_impl debugfs_ufs:file r_file_perms;
73allow hal_dumpstate_impl debugfs_mmc:dir r_dir_perms;
74allow hal_dumpstate_impl debugfs_mmc:file r_file_perms;
75allow hal_dumpstate_impl sysfs_esim:file r_file_perms;
76allow hal_dumpstate_impl sysfs_mmc:dir r_dir_perms;
77allow hal_dumpstate_impl sysfs_mmc:file r_file_perms;
78allow hal_dumpstate_impl proc_stat:file r_file_perms;
79allow hal_dumpstate_impl proc_f2fs:dir r_dir_perms;
80allow hal_dumpstate_impl proc_f2fs:file r_file_perms;
81
82# Access to files for dumping
83allow hal_dumpstate_impl  sysfs:dir r_dir_perms;
84# usb logs
85allow hal_dumpstate_impl debugfs_usb:file r_file_perms;
86
87#Access display debug data
88allow hal_dumpstate_impl display_vendor_data_file:dir r_dir_perms;
89allow hal_dumpstate_impl display_vendor_data_file:file r_file_perms;
90
91# Access to touch firmware info
92allow hal_dumpstate_impl sysfs_touch:dir r_dir_perms;
93allow hal_dumpstate_impl sysfs_touch:file rw_file_perms;
94
95# Access to touch proc node
96allow hal_dumpstate_impl proc_touch:file rw_file_perms;
97
98# Access to WLC firmware info
99allow hal_dumpstate_impl sysfs_wlc:dir r_dir_perms;
100allow hal_dumpstate_impl sysfs_wlc:file r_file_perms;
101
102# Access to UFS info
103allow hal_dumpstate_impl sysfs_scsi_devices_0000:dir r_dir_perms;
104allow hal_dumpstate_impl sysfs_scsi_devices_0000:file r_file_perms;
105
106# Access to MPSS RFS info
107userdebug_or_eng(`
108allow hal_dumpstate_impl mpss_rfs_data_file:dir r_dir_perms;
109allow hal_dumpstate_impl mpss_rfs_data_file:file r_file_perms;
110')
111
112# For collecting bugreports.
113allow hal_dumpstate_impl shell_data_file:file getattr;
114allow hal_dumpstate_impl sysfs_system_sleep_stats:file r_file_perms;
115# For '/vendor/bin/sh -c getprop | grep vendor.sys.modem.diag'
116allow hal_dumpstate_impl vendor_file:file execute_no_trans;
117userdebug_or_eng(`allow hal_dumpstate_impl debugfs_dma_bufinfo:file r_file_perms;')
118dontaudit hal_dumpstate_impl debugfs_dma_bufinfo:file r_file_perms;
119
120# Query and dump power supply nodes
121allow hal_dumpstate_impl sysfs_batteryinfo:dir search;
122allow hal_dumpstate_impl sysfs_batteryinfo:file r_file_perms;
123
124# Dump QCOM FG content
125allow hal_dumpstate_impl debugfs_fg_sram:dir search;
126allow hal_dumpstate_impl debugfs_fg_sram:file rw_file_perms;
127
128# Dump Maxim FG content
129allow hal_dumpstate_impl debugfs_maxfg:dir search;
130allow hal_dumpstate_impl debugfs_maxfg:file r_file_perms;
131
132# Dump PMIC data
133allow hal_dumpstate_impl debugfs_pmic:dir r_dir_perms;
134allow hal_dumpstate_impl debugfs_pmic:file r_file_perms;
135
136allow hal_dumpstate_impl dumpstate:fifo_file write;
137
138dontaudit hal_dumpstate_impl binder_device:chr_file rw_file_perms;
139dontaudit hal_dumpstate_impl vndbinder_device:chr_file rw_file_perms;
140dontaudit hal_dumpstate_impl property_socket:sock_file rw_file_perms;
141dontaudit hal_dumpstate_impl radio_vendor_data_file:dir r_dir_perms;
142dontaudit hal_dumpstate_impl radio_vendor_data_file:file r_file_perms;
143dontaudit hal_dumpstate_impl netmgr_data_file:dir r_dir_perms;
144dontaudit hal_dumpstate_impl netmgr_data_file:file r_file_perms;
145dontaudit hal_dumpstate_impl vendor_modem_diag_prop:file rw_file_perms;
146dontaudit hal_dumpstate_impl vendor_tcpdump_log_prop:file rw_file_perms;
147dontaudit hal_dumpstate_impl sysfs_usb_device:dir r_dir_perms;
148dontaudit hal_dumpstate_impl sysfs_usb_device:file r_file_perms;
149dontaudit hal_dumpstate_impl ssr_log_file:dir search;
150dontaudit hal_dumpstate_impl ssr_log_file:file r_file_perms;
151dontaudit hal_dumpstate_impl tcpdump_vendor_data_file:dir create_dir_perms;
152dontaudit hal_dumpstate_impl tcpdump_vendor_data_file:file create_file_perms;
153dontaudit hal_dumpstate_impl perfstatsd_exec:file rx_file_perms;
154dontaudit hal_dumpstate_impl perfstatsd_service:service_manager find;
155dontaudit hal_dumpstate_impl mpss_rfs_data_file:dir r_dir_perms;
156dontaudit hal_dumpstate_impl mpss_rfs_data_file:file r_file_perms;
157