xref: /aosp_15_r20/system/sepolicy/prebuilts/api/31.0/private/statsd.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Workertypeattribute statsd coredomain;
2*e4a36f41SAndroid Build Coastguard Worker
3*e4a36f41SAndroid Build Coastguard Workerinit_daemon_domain(statsd)
4*e4a36f41SAndroid Build Coastguard Worker
5*e4a36f41SAndroid Build Coastguard Worker# Allow to exec the perfetto cmdline client and pass it the trace config on
6*e4a36f41SAndroid Build Coastguard Worker# stdint through a pipe. It allows statsd to  capture traces and hand them
7*e4a36f41SAndroid Build Coastguard Worker# to Android dropbox.
8*e4a36f41SAndroid Build Coastguard Workerallow statsd perfetto_exec:file rx_file_perms;
9*e4a36f41SAndroid Build Coastguard Workerdomain_auto_trans(statsd, perfetto_exec, perfetto)
10*e4a36f41SAndroid Build Coastguard Worker
11*e4a36f41SAndroid Build Coastguard Worker# Grant statsd with permissions to register the services.
12*e4a36f41SAndroid Build Coastguard Workerallow statsd {
13*e4a36f41SAndroid Build Coastguard Worker  statscompanion_service
14*e4a36f41SAndroid Build Coastguard Worker}:service_manager find;
15*e4a36f41SAndroid Build Coastguard Worker
16*e4a36f41SAndroid Build Coastguard Worker# Allow incidentd to obtain the statsd incident section.
17*e4a36f41SAndroid Build Coastguard Workerallow statsd incidentd:fifo_file write;
18*e4a36f41SAndroid Build Coastguard Worker
19*e4a36f41SAndroid Build Coastguard Worker# Allow StatsCompanionService to pipe data to statsd.
20*e4a36f41SAndroid Build Coastguard Workerallow statsd system_server:fifo_file { read getattr };
21*e4a36f41SAndroid Build Coastguard Worker
22*e4a36f41SAndroid Build Coastguard Worker# Allow statsd to retrieve SF statistics over binder
23*e4a36f41SAndroid Build Coastguard Workerbinder_call(statsd, surfaceflinger);
24*e4a36f41SAndroid Build Coastguard Worker
25*e4a36f41SAndroid Build Coastguard Worker# Allow statsd to read its system properties
26*e4a36f41SAndroid Build Coastguard Workerget_prop(statsd, device_config_statsd_native_prop)
27*e4a36f41SAndroid Build Coastguard Workerget_prop(statsd, device_config_statsd_native_boot_prop)
28