blob: 314fb7c9e8ed2073a1fe33fd0e0d056d37d3e237 [file] [log] [blame]
Andreas Gampe4c2d06c2019-02-21 10:03:07 -08001# ART APEX postinstall.
2#
3
4type art_apex_postinstall, domain, coredomain;
5type art_apex_postinstall_exec, system_file_type, exec_type, file_type;
6
7# /dev/zero
8allow art_apex_postinstall apexd:fd use;
9
10# Read temp dirs and files. Move directories.
11allow art_apex_postinstall ota_data_file:dir { r_dir_perms write rename remove_name relabelfrom reparent };
12allow art_apex_postinstall ota_data_file:file { r_file_perms relabelfrom };
13# We're deleting the old /data/dalvik-cache/* and move the new ones
14# over.
15allow art_apex_postinstall dalvikcache_data_file:dir { create_dir_perms relabelto };
16allow art_apex_postinstall dalvikcache_data_file:file { r_file_perms unlink relabelto };
17
18# Required for relabel.
19allow art_apex_postinstall file_contexts_file:file r_file_perms;
20
21# Script helpers.
22allow art_apex_postinstall shell_exec:file rx_file_perms;
23allow art_apex_postinstall toolbox_exec:file rx_file_perms;
Andreas Gampe67e14ad2019-02-28 16:51:12 -080024
25# Fsverity in the same domain.
26allow art_apex_postinstall system_file:file execute_no_trans;
27# Fsverity work.
28allowxperm art_apex_postinstall ota_data_file:file ioctl {
29 FS_IOC_ENABLE_VERITY FS_IOC_MEASURE_VERITY
30};
31
32allow art_apex_postinstall kernel:key search;
33# For testing purposes, allow keys installed with su.
34userdebug_or_eng(`
35 allow art_apex_postinstall su:key search;
36')