blob: 43340e007324e4918aadd281a16623ebdc13b56e [file] [log] [blame]
Andreas Gampe4abfe602019-02-21 16:11:27 -08001# cppreopts
2#
3# This command copies preopted files from the system_b partition to the data
4# partition. This domain ensures that we are only copying into specific
5# directories.
6
7type cppreopts, domain, mlstrustedsubject;
8type cppreopts_exec, system_file_type, exec_type, file_type;
9
Alex Klyubinf5446eb2017-03-23 14:27:32 -070010typeattribute cppreopts coredomain;
11
dcashmancc39f632016-07-22 13:13:11 -070012# Technically not a daemon but we do want the transition from init domain to
13# cppreopts to occur.
14init_daemon_domain(cppreopts)
15domain_auto_trans(cppreopts, preopt2cachename_exec, preopt2cachename);
Andreas Gampe4abfe602019-02-21 16:11:27 -080016
17# Allow cppreopts copy files into the dalvik-cache
18allow cppreopts dalvikcache_data_file:dir { add_name remove_name search write };
19allow cppreopts dalvikcache_data_file:file { create getattr open read rename write unlink };
20
21# Allow cppreopts to execute itself using #!/system/bin/sh
22allow cppreopts shell_exec:file rx_file_perms;
23
24# Allow us to run find on /postinstall
25allow cppreopts system_file:dir { open read };
26
27# Allow running the cp command using cppreopts permissions. Needed so we can
28# write into dalvik-cache
29allow cppreopts toolbox_exec:file rx_file_perms;