Andreas Gampe | 4abfe60 | 2019-02-21 16:11:27 -0800 | [diff] [blame^] | 1 | # 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 | |
| 7 | type cppreopts, domain, mlstrustedsubject; |
| 8 | type cppreopts_exec, system_file_type, exec_type, file_type; |
| 9 | |
Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 10 | typeattribute cppreopts coredomain; |
| 11 | |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 12 | # Technically not a daemon but we do want the transition from init domain to |
| 13 | # cppreopts to occur. |
| 14 | init_daemon_domain(cppreopts) |
| 15 | domain_auto_trans(cppreopts, preopt2cachename_exec, preopt2cachename); |
Andreas Gampe | 4abfe60 | 2019-02-21 16:11:27 -0800 | [diff] [blame^] | 16 | |
| 17 | # Allow cppreopts copy files into the dalvik-cache |
| 18 | allow cppreopts dalvikcache_data_file:dir { add_name remove_name search write }; |
| 19 | allow cppreopts dalvikcache_data_file:file { create getattr open read rename write unlink }; |
| 20 | |
| 21 | # Allow cppreopts to execute itself using #!/system/bin/sh |
| 22 | allow cppreopts shell_exec:file rx_file_perms; |
| 23 | |
| 24 | # Allow us to run find on /postinstall |
| 25 | allow 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 |
| 29 | allow cppreopts toolbox_exec:file rx_file_perms; |