1typeattribute statsd coredomain;
2
3init_daemon_domain(statsd)
4
5# Allow to exec the perfetto cmdline client and pass it the trace config on
6# stdint through a pipe. It allows statsd to  capture traces and hand them
7# to Android dropbox.
8allow statsd perfetto_exec:file rx_file_perms;
9domain_auto_trans(statsd, perfetto_exec, perfetto)
10
11# Grant statsd with permissions to register the services.
12allow statsd {
13  statscompanion_service
14}:service_manager find;
15
16# Allow incidentd to obtain the statsd incident section.
17allow statsd incidentd:fifo_file write;
18
19# Allow StatsCompanionService to pipe data to statsd.
20allow statsd system_server:fifo_file { read write getattr };
21
22# Allow Statsd to pipe data to privileged apps.
23allow statsd priv_app:fifo_file { read write getattr };
24
25# Allow statsd to retrieve SF statistics over binder
26binder_call(statsd, surfaceflinger);
27
28# Allow statsd to read its system properties
29get_prop(statsd, device_config_statsd_native_prop)
30get_prop(statsd, device_config_statsd_native_boot_prop)
31