Merge "Add a new context for property ota.warm_reset"

This commit is contained in:
Tianjie Xu 2019-11-18 23:15:43 +00:00 committed by Gerrit Code Review
commit a54c82a1fc
7 changed files with 17 additions and 0 deletions

View file

@ -27,6 +27,7 @@
linker_prop
mock_ota_prop
ota_metadata_file
ota_prop
art_apex_dir
service_manager_service
system_group_file

View file

@ -219,3 +219,6 @@ ro.charger. u:object_r:charger_prop:s0
# Virtual A/B properties
ro.virtual_ab.enabled u:object_r:virtual_ab_prop:s0
ro.virtual_ab.retrofit u:object_r:virtual_ab_prop:s0
# Property to set/clear the warm reset flag after an OTA update.
ota.warm_reset u:object_r:ota_prop:s0

View file

@ -130,6 +130,7 @@ system_public_prop(log_prop)
system_public_prop(log_tag_prop)
system_public_prop(lowpan_prop)
system_public_prop(nfc_prop)
system_public_prop(ota_prop)
system_public_prop(powerctl_prop)
system_public_prop(radio_prop)
system_public_prop(serialno_prop)
@ -287,6 +288,7 @@ typeattribute fingerprint_prop core_property_type;
typeattribute logd_prop core_property_type;
typeattribute net_radio_prop core_property_type;
typeattribute nfc_prop core_property_type;
typeattribute ota_prop core_property_type;
typeattribute pan_result_prop core_property_type;
typeattribute persist_debug_prop core_property_type;
typeattribute powerctl_prop core_property_type;
@ -313,6 +315,7 @@ neverallow * {
-logd_prop
-net_radio_prop
-nfc_prop
-ota_prop
-pan_result_prop
-persist_debug_prop
-powerctl_prop
@ -625,6 +628,7 @@ compatible_property_only(`
-net_radio_prop
-netd_stable_secret_prop
-nfc_prop
-ota_prop
-overlay_prop
-pan_result_prop
-persist_debug_prop

View file

@ -58,6 +58,9 @@ allow update_engine system_file:dir r_dir_perms;
# Allow to start gsid service.
set_prop(update_engine, ctl_gsid_prop)
# Allow to set the OTA related properties, e.g. ota.warm_reset.
set_prop(update_engine, ota_prop)
# update_engine tries to determine the parent path for all devices (e.g.
# /dev/block/by-name) by reading the default fstab and looking for the misc
# device. ReadDefaultFstab() checks whether a GSI is running by checking

View file

@ -27,6 +27,9 @@ allow update_verifier kmsg_device:chr_file { getattr w_file_perms };
# Allow update_verifier to reboot the device.
set_prop(update_verifier, powerctl_prop)
# Allow to set the OTA related properties e.g. ota.warm_reset.
set_prop(update_verifier, ota_prop)
# Use Boot Control HAL
hal_client_domain(update_verifier, hal_bootctl)

View file

@ -258,6 +258,8 @@ get_prop(vendor_init, exported2_radio_prop)
get_prop(vendor_init, exported3_system_prop)
get_prop(vendor_init, theme_prop)
get_prop(vendor_init, ota_prop)
###
### neverallow rules
###

View file

@ -174,6 +174,7 @@ set_prop(vold, exported2_vold_prop)
set_prop(vold, powerctl_prop)
set_prop(vold, ctl_fuse_prop)
set_prop(vold, restorecon_prop)
set_prop(vold, ota_prop)
# ASEC
allow vold asec_image_file:file create_file_perms;