blob: 0d26234a84392b75afc5e44c524c4ace83517a72 [file] [log] [blame]
Chris Wailes467d8a82021-03-03 12:30:28 -08001# art service daemon
Jiakai Zhang76bfb7e2022-05-26 13:55:33 +01002type artd, domain, coredomain;
Chris Wailes467d8a82021-03-03 12:30:28 -08003type artd_exec, system_file_type, exec_type, file_type;
Jiakai Zhang76bfb7e2022-05-26 13:55:33 +01004type artd_tmpfs, file_type;
Chris Wailes467d8a82021-03-03 12:30:28 -08005
6# Allow artd to publish a binder service and make binder calls.
7binder_use(artd)
8add_service(artd, artd_service)
9allow artd dumpstate:fifo_file { getattr write };
10
Chris Wailes467d8a82021-03-03 12:30:28 -080011init_daemon_domain(artd)
Calin Juravle0b2ca6c2021-05-18 15:33:08 -070012
13# Allow query ART device config properties
14get_prop(artd, device_config_runtime_native_prop)
15get_prop(artd, device_config_runtime_native_boot_prop)
Jiakai Zhang76bfb7e2022-05-26 13:55:33 +010016
17# Access to "odsign.verification.success" for deciding whether to deny files in
18# the ART APEX data directory.
19get_prop(artd, odsign_prop)
20
21# Reading an APK opens a ZipArchive, which unpack to tmpfs.
22# Use tmpfs_domain() which will give tmpfs files created by artd their
23# own label, which differs from other labels created by other processes.
24# This allows to distinguish in policy files created by artd vs other
25# processes.
26tmpfs_domain(artd)
27
28# Allow testing userfaultfd support.
29userfaultfd_use(artd)
30
31# Read access to primary dex'es on writable partitions (e.g., /data/app/...).
32r_dir_file(artd, apk_data_file)
33
34# Read access to /vendor/app.
35r_dir_file(artd, vendor_app_file)
36
37# Read access to all compilation artifacts generated on device for apps' primary
38# dex'es. (/data/dalvik-cache/..., /data/app/.../oat/..., etc.)
39r_dir_file(artd, dalvikcache_data_file)
40
41# Read access to the ART APEX data directory.
42# Needed for reading the boot image generated on device.
43allow artd apex_module_data_file:dir { getattr search };
44r_dir_file(artd, apex_art_data_file)
45
46# Read access to /apex/apex-info-list.xml
47# Needed for getting APEX versions.
48allow artd apex_info_file:file r_file_perms;