platform_system_sepolicy/private/gki_apex_prepostinstall.te
Yifan Hong a5809013a4 Allow GKI APEX to use apexd:fd
/dev/zero is inherited from apexd. This is required for
sh to start.

Bug: 126787589
Bug: 161563386
Test: apply GKI update
Change-Id: I8624996c129872b26d4c17242cb911b5e948d9bd
2020-08-28 17:29:58 -07:00

23 lines
920 B
Text

# GKI pre- & post-install hooks.
#
# Allow to run pre- and post-install hooks for GKI APEXes
type gki_apex_prepostinstall, domain, coredomain;
type gki_apex_prepostinstall_exec, system_file_type, exec_type, file_type;
# Execute /system/bin/sh.
allow gki_apex_prepostinstall shell_exec:file rx_file_perms;
# Execute various toolsbox utilities.
allow gki_apex_prepostinstall toolbox_exec:file rx_file_perms;
# Allow preinstall.sh to execute update_engine_stable_client binary.
allow gki_apex_prepostinstall gki_apex_prepostinstall_exec:file execute_no_trans;
# Allow preinstall hook to communicate with update_engine to execute update.
binder_use(gki_apex_prepostinstall)
allow gki_apex_prepostinstall update_engine_stable_service:service_manager find;
binder_call(gki_apex_prepostinstall, update_engine)
# /dev/zero is inherited although it is not used. See b/126787589.
allow gki_apex_prepostinstall apexd:fd use;