blob: 14009c606139909057b5586d67853c46db21477b [file] [log] [blame]
Eric Holkf8dfb5f2019-01-11 08:13:01 -08001# viewcompiler
2type viewcompiler, domain, coredomain, mlstrustedsubject;
3type viewcompiler_exec, system_file_type, exec_type, file_type;
4
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.
10tmpfs_domain(viewcompiler)
11
12allow viewcompiler installd:fd use;
13
14# Include write permission for app data files so viewcompiler can generate
15# compiled layout dex files
16allow viewcompiler app_data_file:file { getattr write };
17
18# Allow the view compiler to read resources from the apps APK.
19allow viewcompiler apk_data_file:file read;
20
21# priv-apps are moving to a world where they can only execute
22# signed code. Make sure viewcompiler never can write to privapp
23# directories to avoid introducing unsigned executable code
24neverallow viewcompiler privapp_data_file:file no_w_file_perms;