Andreas Gampe | 261ea86 | 2018-12-04 16:29:21 -0800 | [diff] [blame] | 1 | # APEX pre- & post-install test. |
| 2 | # |
| 3 | # Allow to run pre- and post-install hooks for APEX test modules |
| 4 | # in debuggable builds. |
| 5 | |
| 6 | type apex_test_prepostinstall, domain, coredomain; |
| 7 | type apex_test_prepostinstall_exec, system_file_type, exec_type, file_type; |
| 8 | |
| 9 | userdebug_or_eng(` |
| 10 | # /dev/zero |
| 11 | allow apex_test_prepostinstall apexd:fd use; |
| 12 | # Logwrapper. |
| 13 | create_pty(apex_test_prepostinstall) |
| 14 | # Logwrapper executing sh. |
| 15 | allow apex_test_prepostinstall shell_exec:file rx_file_perms; |
| 16 | # Logwrapper exec. |
| 17 | allow apex_test_prepostinstall system_file:file execute_no_trans; |
| 18 | # Ls. |
| 19 | allow apex_test_prepostinstall toolbox_exec:file rx_file_perms; |
| 20 | ') |