Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 1 | typeattribute dumpstate coredomain; |
| 2 | |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 3 | init_daemon_domain(dumpstate) |
| 4 | |
| 5 | # Execute and transition to the vdc domain |
| 6 | domain_auto_trans(dumpstate, vdc_exec, vdc) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 7 | |
Joel Scherpelz | 5e901bb | 2017-04-25 11:53:51 +0900 | [diff] [blame] | 8 | # Acquire advisory lock on /system/etc/xtables.lock from ip[6]tables |
| 9 | allow dumpstate system_file:file lock; |
| 10 | |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 11 | # TODO: deal with tmpfs_domain pub/priv split properly |
| 12 | allow dumpstate dumpstate_tmpfs:file execute; |
| 13 | |
| 14 | # systrace support - allow atrace to run |
| 15 | allow dumpstate debugfs_tracing:dir r_dir_perms; |
| 16 | allow dumpstate debugfs_tracing:file rw_file_perms; |
Carmen Jackson | 2c8ca45 | 2018-01-30 18:14:45 -0800 | [diff] [blame] | 17 | allow dumpstate debugfs_tracing_debug:dir r_dir_perms; |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 18 | allow dumpstate debugfs_trace_marker:file getattr; |
| 19 | allow dumpstate atrace_exec:file rx_file_perms; |
ynwang | e68d2d2 | 2016-07-01 12:18:54 -0700 | [diff] [blame] | 20 | allow dumpstate storaged_exec:file rx_file_perms; |
| 21 | |
Vishnu Nair | 2d6942d | 2017-11-17 08:23:32 -0800 | [diff] [blame] | 22 | # /data/misc/wmtrace for wm traces |
| 23 | userdebug_or_eng(` |
| 24 | allow dumpstate wm_trace_data_file:dir r_dir_perms; |
| 25 | allow dumpstate wm_trace_data_file:file r_file_perms; |
| 26 | ') |
| 27 | |
ynwang | e68d2d2 | 2016-07-01 12:18:54 -0700 | [diff] [blame] | 28 | # Allow dumpstate to make binder calls to storaged service |
| 29 | binder_call(dumpstate, storaged) |
Keun-young Park | 43e8fae | 2017-03-03 13:13:25 -0800 | [diff] [blame] | 30 | |
Yao Chen | b10ff33 | 2018-01-17 16:17:28 -0800 | [diff] [blame] | 31 | # Allow dumpstate to make binder calls to statsd |
| 32 | binder_call(dumpstate, statsd) |
| 33 | |
Keun-young Park | 43e8fae | 2017-03-03 13:13:25 -0800 | [diff] [blame] | 34 | # Collect metrics on boot time created by init |
| 35 | get_prop(dumpstate, boottime_prop) |
Andreas Gampe | 7468db6 | 2018-01-24 17:56:25 -0800 | [diff] [blame] | 36 | |
| 37 | # Signal native processes to dump their stack. |
| 38 | allow dumpstate { |
| 39 | statsd |
| 40 | }:process signal; |