blob: 1639640d07bc964cd275ca192c883f0de166cbdb [file] [log] [blame]
Alan Stokes72cac092021-07-21 12:13:19 +01001# dex2oat
2type dex2oat, domain, coredomain;
3type dex2oat_exec, system_file_type, exec_type, file_type;
4
Victor Hsieh2a017b62022-03-08 22:22:33 +00005userfaultfd_use(dex2oat)
6
Alan Stokes72cac092021-07-21 12:13:19 +01007allow dex2oat tmpfs:file { read getattr map };
Victor Hsiehaa987aa2021-08-10 16:33:32 -07008
9# Allow dex2oat to use FDs from authfs_service via compos.
10allow dex2oat authfs_service:fd use;
11allow dex2oat compos:fd use;
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080012allow dex2oat odrefresh:fd use;
Victor Hsiehaa987aa2021-08-10 16:33:32 -070013
14# Allow dex2oat to read/write FDs on authfs_fuse filesystem.
Victor Hsiehdedb4902021-08-19 13:59:37 -070015allow dex2oat authfs_fuse:file { read write getattr map };
Victor Hsiehaa987aa2021-08-10 16:33:32 -070016
Victor Hsiehe2a4d0c2021-12-15 10:57:35 -080017# Allow to search in authfs directories.
18allow dex2oat authfs_data_file:dir { search };
19allow dex2oat authfs_fuse:dir { search };
20
Victor Hsiehaa987aa2021-08-10 16:33:32 -070021# Minijail uses pipe for the parent process to signal the child (as a fallback
22# mechanism, since Android does not support minijail's preload).
23# TODO(196109647): We can probably remove this once the minijail preload is
24# supported on Android.
25allow dex2oat compos:fifo_file read;
26
27# Allow acquiring advisory lock on /system/framework/<arch>/*
28allow dex2oat system_file:file lock;
29
30# Allow dex2oat to read /apex/apex-info-list.xml
31allow dex2oat apex_info_file:file r_file_perms;
Victor Hsiehb415c732021-12-14 11:06:23 -080032
Alan Stokes8b40e902023-02-01 15:56:32 +000033# Allow reading dalvik system properties that may affect compilation
Jiakai Zhang22fb5c72023-03-30 15:50:05 +010034get_prop(dex2oat, dalvik_config_prop_type)
Alan Stokes8b40e902023-02-01 15:56:32 +000035get_prop(dex2oat, device_config_runtime_native_boot_prop)
36
37# Don't audit because we don't configure the compiler through these
38# properties in the VM.
Victor Hsiehb415c732021-12-14 11:06:23 -080039dontaudit dex2oat device_config_runtime_native_prop:file { open read getattr map };