blob: bb707c36b928da4edd77763eeb89d5b0cc4fb378 [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 {
Chong Zhang81f5b9f2020-10-15 12:38:30 -070039 mediatranscoding
Andreas Gampe7468db62018-01-24 17:56:25 -080040 statsd
Chalard Jeana4c9f7b2019-04-05 17:33:56 +090041 netd
Andreas Gampe7468db62018-01-24 17:56:25 -080042}:process signal;
Joel Galenson03ff9f92018-02-14 14:32:38 -080043
44# For collecting bugreports.
45allow dumpstate debugfs_wakeup_sources:file r_file_perms;
46allow dumpstate dev_type:blk_file getattr;
47allow dumpstate webview_zygote:process signal;
Joel Galenson03ff9f92018-02-14 14:32:38 -080048dontaudit dumpstate update_engine:binder call;
Jeff Vander Stoep42451772018-09-28 10:55:14 -070049allow dumpstate proc_net_tcp_udp:file r_file_perms;
Joe Onorato5536a082018-12-07 17:20:14 -080050
51# For comminucating with the system process to do confirmation ui.
52binder_call(dumpstate, incidentcompanion_service)
David Andersondc2a7872019-09-06 14:52:21 -070053
Inseob Kim55e5c9b2020-03-04 17:20:35 +090054# Set properties.
55# dumpstate_prop is used to share state with the Shell app.
56set_prop(dumpstate, dumpstate_prop)
57set_prop(dumpstate, exported_dumpstate_prop)
58
59# dumpstate_options_prop is used to pass extra command-line args.
60set_prop(dumpstate, dumpstate_options_prop)
61
62# Allow dumpstate to kill vendor dumpstate service by init
63set_prop(dumpstate, ctl_dumpstate_prop)
64
David Andersondc2a7872019-09-06 14:52:21 -070065# For dumping dynamic partition information.
66set_prop(dumpstate, lpdumpd_prop)
67binder_call(dumpstate, lpdumpd)
David Anderson14eaa6c2019-09-09 17:52:06 -070068
69# For dumping device-mapper and snapshot information.
70allow dumpstate gsid_exec:file rx_file_perms;
71set_prop(dumpstate, ctl_gsid_prop)
72binder_call(dumpstate, gsid)
Yifan Hong91709db2019-10-29 14:12:16 -070073
74r_dir_file(dumpstate, ota_metadata_file)