blob: a3c49db3708d7467b09d3c572b77e4543ab6dbc2 [file] [log] [blame]
Alex Klyubinf5446eb2017-03-23 14:27:32 -07001typeattribute shell coredomain;
2
Siarhei Vishniakou2a7f5712017-05-10 19:37:06 -07003# allow shell input injection
4allow shell uhid_device:chr_file rw_file_perms;
5
dcashman2e00e632016-10-12 14:58:09 -07006# systrace support - allow atrace to run
7allow shell debugfs_tracing:dir r_dir_perms;
Joel Galenson27c0aa72017-07-26 16:22:50 -07008allow shell debugfs_tracing:file rw_file_perms;
dcashman2e00e632016-10-12 14:58:09 -07009allow shell debugfs_trace_marker:file getattr;
10allow shell atrace_exec:file rx_file_perms;
11
Yifan Hong19a87732017-05-08 14:38:45 -070012# read config.gz for CTS purposes
13allow shell config_gz:file r_file_perms;
14
Carmen Jackson25788df2017-04-14 12:12:50 -070015userdebug_or_eng(`
Joel Galenson47966ce2017-07-27 09:50:25 -070016 allow shell debugfs_tracing_debug:file rw_file_perms;
Carmen Jackson25788df2017-04-14 12:12:50 -070017')
18
dcashman3e8dbf02016-12-08 11:23:34 -080019# Run app_process.
20# XXX Transition into its own domain?
21app_domain(shell)
Jin Qiana239f302017-03-23 12:28:20 -070022
23# allow shell to call dumpsys storaged
24binder_call(shell, storaged)
Nick Kralevich14e2e922017-05-08 09:51:59 -070025
26# Perform SELinux access checks, needed for CTS
27selinux_check_access(shell)
28selinux_check_context(shell)
Primiano Tuccic80f9e02017-12-21 03:51:15 +010029
30# Control Perfetto traced and obtain traces from it.
31# Needed for Studio and debugging.
32unix_socket_connect(shell, traced_consumer, traced)
33
34# Allow shell binaries to write trace data to Perfetto. Used for testing and
35# cmdline utils.
36allow shell traced:fd use;
37allow shell traced_tmpfs:file { read write getattr map };
38unix_socket_connect(shell, traced_producer, traced)