1 type stats, domain; 2 typeattribute stats coredomain; 3 type stats_exec, exec_type, file_type; 4 5 # switch to stats domain for stats command 6 domain_auto_trans(shell, stats_exec, stats) 7 8 # allow stats access to stdout from its parent shell. 9 allow stats shell:fd use; 10 11 # allow stats to communicate use, read and write over the adb 12 # connection. 13 allow stats adbd:fd use; 14 allow stats adbd:unix_stream_socket { read write }; 15 16 # allow adbd to reap stats 17 allow stats adbd:process { sigchld }; 18 19 # Allow the stats command to talk to the statsd over the binder, and get 20 # back the stats report data from a ParcelFileDescriptor. 21 binder_use(stats) 22 allow stats stats_service:service_manager find; 23 binder_call(stats, statsd) 24 allow stats statsd:fifo_file write; 25 26