1*e4a36f41SAndroid Build Coastguard Workertypeattribute statsd coredomain; 2*e4a36f41SAndroid Build Coastguard Workertypeattribute statsd stats_service_server; 3*e4a36f41SAndroid Build Coastguard Worker 4*e4a36f41SAndroid Build Coastguard Workerinit_daemon_domain(statsd) 5*e4a36f41SAndroid Build Coastguard Worker 6*e4a36f41SAndroid Build Coastguard Workerbinder_call(statsd, statscompanion_service) 7*e4a36f41SAndroid Build Coastguard Worker 8*e4a36f41SAndroid Build Coastguard Worker# Allow to exec the perfetto cmdline client and pass it the trace config on 9*e4a36f41SAndroid Build Coastguard Worker# stdint through a pipe. It allows statsd to capture traces and hand them 10*e4a36f41SAndroid Build Coastguard Worker# to Android dropbox. 11*e4a36f41SAndroid Build Coastguard Workerallow statsd perfetto_exec:file rx_file_perms; 12*e4a36f41SAndroid Build Coastguard Workerdomain_auto_trans(statsd, perfetto_exec, perfetto) 13*e4a36f41SAndroid Build Coastguard Worker 14*e4a36f41SAndroid Build Coastguard Worker# Grant statsd with permissions to register the services. 15*e4a36f41SAndroid Build Coastguard Workerallow statsd { 16*e4a36f41SAndroid Build Coastguard Worker statscompanion_service 17*e4a36f41SAndroid Build Coastguard Worker}:service_manager find; 18*e4a36f41SAndroid Build Coastguard Worker 19*e4a36f41SAndroid Build Coastguard Worker# Allow incidentd to obtain the statsd incident section. 20*e4a36f41SAndroid Build Coastguard Workerallow statsd incidentd:fifo_file write; 21