blob: 0eff540e4baf7938bb2997fc435c920cdbc69899 [file] [log] [blame]
Alex Klyubinf5446eb2017-03-23 14:27:32 -07001typeattribute dumpstate coredomain;
2
dcashmancc39f632016-07-22 13:13:11 -07003init_daemon_domain(dumpstate)
4
5# Execute and transition to the vdc domain
6domain_auto_trans(dumpstate, vdc_exec, vdc)
dcashman2e00e632016-10-12 14:58:09 -07007
Joel Scherpelz5e901bb2017-04-25 11:53:51 +09008# Acquire advisory lock on /system/etc/xtables.lock from ip[6]tables
9allow dumpstate system_file:file lock;
10
ynwange68d2d22016-07-01 12:18:54 -070011allow dumpstate storaged_exec:file rx_file_perms;
12
Vishnu Nair2d6942d2017-11-17 08:23:32 -080013# /data/misc/wmtrace for wm traces
14userdebug_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 Made3a3e42018-12-03 10:35:40 -080019# Allow dumpstate to make binder calls to incidentd
20binder_call(dumpstate, incidentd)
21
ynwange68d2d22016-07-01 12:18:54 -070022# Allow dumpstate to make binder calls to storaged service
23binder_call(dumpstate, storaged)
Keun-young Park43e8fae2017-03-03 13:13:25 -080024
Yao Chenb10ff332018-01-17 16:17:28 -080025# Allow dumpstate to make binder calls to statsd
26binder_call(dumpstate, statsd)
27
Joel Galenson7c275a62018-11-13 12:35:17 -080028# Allow dumpstate to talk to gpuservice over binder
29binder_call(dumpstate, gpuservice);
30
Joel Galenson657470a2018-12-05 11:01:04 -080031# Allow dumpstate to talk to idmap over binder
32binder_call(dumpstate, idmap);
33
Keun-young Park43e8fae2017-03-03 13:13:25 -080034# Collect metrics on boot time created by init
35get_prop(dumpstate, boottime_prop)
Andreas Gampe7468db62018-01-24 17:56:25 -080036
37# Signal native processes to dump their stack.
38allow dumpstate {
39 statsd
Chalard Jeana4c9f7b2019-04-05 17:33:56 +090040 netd
Andreas Gampe7468db62018-01-24 17:56:25 -080041}:process signal;
Joel Galenson03ff9f92018-02-14 14:32:38 -080042
43# For collecting bugreports.
44allow dumpstate debugfs_wakeup_sources:file r_file_perms;
45allow dumpstate dev_type:blk_file getattr;
46allow dumpstate webview_zygote:process signal;
Joel Galenson03ff9f92018-02-14 14:32:38 -080047dontaudit dumpstate update_engine:binder call;
Jeff Vander Stoep42451772018-09-28 10:55:14 -070048allow dumpstate proc_net_tcp_udp:file r_file_perms;
Joe Onorato5536a082018-12-07 17:20:14 -080049
50# For comminucating with the system process to do confirmation ui.
51binder_call(dumpstate, incidentcompanion_service)
David Andersondc2a7872019-09-06 14:52:21 -070052
Inseob Kim55e5c9b2020-03-04 17:20:35 +090053# Set properties.
54# dumpstate_prop is used to share state with the Shell app.
55set_prop(dumpstate, dumpstate_prop)
56set_prop(dumpstate, exported_dumpstate_prop)
57
58# dumpstate_options_prop is used to pass extra command-line args.
59set_prop(dumpstate, dumpstate_options_prop)
60
61# Allow dumpstate to kill vendor dumpstate service by init
62set_prop(dumpstate, ctl_dumpstate_prop)
63
David Andersondc2a7872019-09-06 14:52:21 -070064# For dumping dynamic partition information.
65set_prop(dumpstate, lpdumpd_prop)
66binder_call(dumpstate, lpdumpd)
David Anderson14eaa6c2019-09-09 17:52:06 -070067
68# For dumping device-mapper and snapshot information.
69allow dumpstate gsid_exec:file rx_file_perms;
70set_prop(dumpstate, ctl_gsid_prop)
71binder_call(dumpstate, gsid)
Yifan Hong91709db2019-10-29 14:12:16 -070072
73r_dir_file(dumpstate, ota_metadata_file)