viewcompiler.te 1.0 KB

12345678910111213141516171819202122232425
  1. # viewcompiler
  2. type viewcompiler, domain, coredomain, mlstrustedsubject;
  3. type viewcompiler_exec, system_file_type, exec_type, file_type;
  4. type viewcompiler_tmpfs, file_type;
  5. # Reading an APK opens a ZipArchive, which unpack to tmpfs.
  6. # Use tmpfs_domain() which will give tmpfs files created by viewcompiler their
  7. # own label, which differs from other labels created by other processes.
  8. # This allows to distinguish in policy files created by viewcompiler vs other
  9. # processes.
  10. tmpfs_domain(viewcompiler)
  11. allow viewcompiler installd:fd use;
  12. # Include write permission for app data files so viewcompiler can generate
  13. # compiled layout dex files
  14. allow viewcompiler app_data_file:file { getattr write };
  15. # Allow the view compiler to read resources from the apps APK.
  16. allow viewcompiler apk_data_file:file read;
  17. # priv-apps are moving to a world where they can only execute
  18. # signed code. Make sure viewcompiler never can write to privapp
  19. # directories to avoid introducing unsigned executable code
  20. neverallow viewcompiler privapp_data_file:file no_w_file_perms;