runas_app.te 717 B

123456789101112131415161718
  1. typeattribute runas_app coredomain;
  2. app_domain(runas_app)
  3. untrusted_app_domain(runas_app)
  4. net_domain(runas_app)
  5. bluetooth_domain(runas_app)
  6. # The ability to call exec() on files in the apps home directories
  7. # when using run-as on a debuggable app. Used to run lldb/ndk-gdb/simpleperf,
  8. # which are copied to the apps home directories.
  9. allow runas_app app_data_file:file execute_no_trans;
  10. # Allow lldb/ndk-gdb/simpleperf to read maps of debuggable app processes.
  11. r_dir_file(runas_app, untrusted_app_all)
  12. # Allow lldb/ndk-gdb/simpleperf to ptrace attach to debuggable app processes.
  13. allow runas_app untrusted_app_all:process { ptrace signal sigstop };
  14. allow runas_app untrusted_app_all:unix_stream_socket connectto;