diff --git a/device.te b/device.te index a120ba3243c36d7f3fdaa1fe4f2ff75b6d9edee8..d322170b8199762bea8e3caa298ecf6ff8bc4586 100644 --- a/device.te +++ b/device.te @@ -96,3 +96,6 @@ type metadata_block_device, dev_type; # The 'misc' partition used by recovery and A/B. type misc_block_device, dev_type; + +# Bootctrl block device used by A/B update (update_engine, update_verifier). +type bootctrl_block_device, dev_type; diff --git a/file_contexts b/file_contexts index 7a8d0ea311c506a9b55dd42353642889bc9b9758..dcf0c77194c55e88f20b672e142045658548dc54 100644 --- a/file_contexts +++ b/file_contexts @@ -187,6 +187,7 @@ /system/bin/inputflinger u:object_r:inputflinger_exec:s0 /system/bin/logd u:object_r:logd_exec:s0 /system/bin/uncrypt u:object_r:uncrypt_exec:s0 +/system/bin/update_verifier u:object_r:update_verifier_exec:s0 /system/bin/logwrapper u:object_r:system_file:s0 /system/bin/vdc u:object_r:vdc_exec:s0 /system/bin/install-recovery.sh u:object_r:install_recovery_exec:s0 diff --git a/update_verifier.te b/update_verifier.te new file mode 100644 index 0000000000000000000000000000000000000000..42567fec91ffc3d55b01e0bf8d67c0ff793db503 --- /dev/null +++ b/update_verifier.te @@ -0,0 +1,10 @@ +# update_verifier +type update_verifier, domain; +type update_verifier_exec, exec_type, file_type; + +init_daemon_domain(update_verifier) + +# Raw writes to bootctrl block device +allow update_verifier bootctrl_block_device:blk_file rw_file_perms; + +# TODO: Add rules to allow update_verifier to read system_block_device.