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 | |
ynwang | e68d2d2 | 2016-07-01 12:18:54 -0700 | [diff] [blame] | 11 | allow dumpstate storaged_exec:file rx_file_perms; |
| 12 | |
Vishnu Nair | 2d6942d | 2017-11-17 08:23:32 -0800 | [diff] [blame] | 13 | # /data/misc/wmtrace for wm traces |
| 14 | userdebug_or_eng(` |
| 15 | allow dumpstate wm_trace_data_file:dir r_dir_perms; |
| 16 | allow dumpstate wm_trace_data_file:file r_file_perms; |
| 17 | ') |
| 18 | |
Mike Ma | de3a3e4 | 2018-12-03 10:35:40 -0800 | [diff] [blame] | 19 | # Allow dumpstate to make binder calls to incidentd |
| 20 | binder_call(dumpstate, incidentd) |
| 21 | |
ynwang | e68d2d2 | 2016-07-01 12:18:54 -0700 | [diff] [blame] | 22 | # Allow dumpstate to make binder calls to storaged service |
| 23 | binder_call(dumpstate, storaged) |
Keun-young Park | 43e8fae | 2017-03-03 13:13:25 -0800 | [diff] [blame] | 24 | |
Yao Chen | b10ff33 | 2018-01-17 16:17:28 -0800 | [diff] [blame] | 25 | # Allow dumpstate to make binder calls to statsd |
| 26 | binder_call(dumpstate, statsd) |
| 27 | |
Joel Galenson | 7c275a6 | 2018-11-13 12:35:17 -0800 | [diff] [blame] | 28 | # Allow dumpstate to talk to gpuservice over binder |
| 29 | binder_call(dumpstate, gpuservice); |
| 30 | |
Joel Galenson | 657470a | 2018-12-05 11:01:04 -0800 | [diff] [blame] | 31 | # Allow dumpstate to talk to idmap over binder |
| 32 | binder_call(dumpstate, idmap); |
| 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 |
Chalard Jean | a4c9f7b | 2019-04-05 17:33:56 +0900 | [diff] [blame] | 40 | netd |
Andreas Gampe | 7468db6 | 2018-01-24 17:56:25 -0800 | [diff] [blame] | 41 | }:process signal; |
Joel Galenson | 03ff9f9 | 2018-02-14 14:32:38 -0800 | [diff] [blame] | 42 | |
| 43 | # For collecting bugreports. |
| 44 | allow dumpstate debugfs_wakeup_sources:file r_file_perms; |
| 45 | allow dumpstate dev_type:blk_file getattr; |
| 46 | allow dumpstate webview_zygote:process signal; |
Joel Galenson | 03ff9f9 | 2018-02-14 14:32:38 -0800 | [diff] [blame] | 47 | dontaudit dumpstate update_engine:binder call; |
Jeff Vander Stoep | 4245177 | 2018-09-28 10:55:14 -0700 | [diff] [blame] | 48 | allow dumpstate proc_net_tcp_udp:file r_file_perms; |
Joe Onorato | 5536a08 | 2018-12-07 17:20:14 -0800 | [diff] [blame] | 49 | |
| 50 | # For comminucating with the system process to do confirmation ui. |
| 51 | binder_call(dumpstate, incidentcompanion_service) |
David Anderson | dc2a787 | 2019-09-06 14:52:21 -0700 | [diff] [blame] | 52 | |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame^] | 53 | # Set properties. |
| 54 | # dumpstate_prop is used to share state with the Shell app. |
| 55 | set_prop(dumpstate, dumpstate_prop) |
| 56 | set_prop(dumpstate, exported_dumpstate_prop) |
| 57 | |
| 58 | # dumpstate_options_prop is used to pass extra command-line args. |
| 59 | set_prop(dumpstate, dumpstate_options_prop) |
| 60 | |
| 61 | # Allow dumpstate to kill vendor dumpstate service by init |
| 62 | set_prop(dumpstate, ctl_dumpstate_prop) |
| 63 | |
David Anderson | dc2a787 | 2019-09-06 14:52:21 -0700 | [diff] [blame] | 64 | # For dumping dynamic partition information. |
| 65 | set_prop(dumpstate, lpdumpd_prop) |
| 66 | binder_call(dumpstate, lpdumpd) |
David Anderson | 14eaa6c | 2019-09-09 17:52:06 -0700 | [diff] [blame] | 67 | |
| 68 | # For dumping device-mapper and snapshot information. |
| 69 | allow dumpstate gsid_exec:file rx_file_perms; |
| 70 | set_prop(dumpstate, ctl_gsid_prop) |
| 71 | binder_call(dumpstate, gsid) |
Yifan Hong | 91709db | 2019-10-29 14:12:16 -0700 | [diff] [blame] | 72 | |
| 73 | r_dir_file(dumpstate, ota_metadata_file) |