diff --git a/private/compat/29.0/29.0.ignore.cil b/private/compat/29.0/29.0.ignore.cil index 88257f1d5..6e3c48567 100644 --- a/private/compat/29.0/29.0.ignore.cil +++ b/private/compat/29.0/29.0.ignore.cil @@ -17,6 +17,7 @@ hal_tv_tuner_hwservice init_svc_debug_prop linker_prop + mock_ota_prop ota_metadata_file art_apex_dir system_group_file diff --git a/private/property_contexts b/private/property_contexts index 55445ec92..b77a94415 100644 --- a/private/property_contexts +++ b/private/property_contexts @@ -59,6 +59,7 @@ logd.logpersistd u:object_r:logpersistd_logging_prop:s0 persist.log.tag u:object_r:log_tag_prop:s0 persist.mmc. u:object_r:mmc_prop:s0 persist.netd.stable_secret u:object_r:netd_stable_secret_prop:s0 +persist.pm.mock-upgrade u:object_r:mock_ota_prop:s0 persist.sys. u:object_r:system_prop:s0 persist.sys.safemode u:object_r:safemode_prop:s0 persist.sys.theme u:object_r:theme_prop:s0 diff --git a/private/system_server.te b/private/system_server.te index a7f9b130d..34e832bbc 100644 --- a/private/system_server.te +++ b/private/system_server.te @@ -628,6 +628,9 @@ set_prop(system_server, test_harness_prop) # Read gsid.image_running. get_prop(system_server, gsid_prop) +# Read the property that mocks an OTA +get_prop(system_server, mock_ota_prop) + # Create a socket for connections from debuggerd. allow system_server system_ndebug_socket:sock_file create_file_perms; diff --git a/public/property.te b/public/property.te index f82ab8956..b2f534bfa 100644 --- a/public/property.te +++ b/public/property.te @@ -37,6 +37,7 @@ system_internal_prop(last_boot_reason_prop) system_internal_prop(llkd_prop) system_internal_prop(lpdumpd_prop) system_internal_prop(mmc_prop) +system_internal_prop(mock_ota_prop) system_internal_prop(net_dns_prop) system_internal_prop(netd_stable_secret_prop) system_internal_prop(overlay_prop) @@ -541,6 +542,7 @@ compatible_property_only(` -lowpan_prop -lpdumpd_prop -mmc_prop + -mock_ota_prop -net_dns_prop -net_radio_prop -netd_stable_secret_prop diff --git a/public/shell.te b/public/shell.te index 56196c3d2..532d05fd8 100644 --- a/public/shell.te +++ b/public/shell.te @@ -82,6 +82,8 @@ set_prop(shell, heapprofd_enabled_prop) set_prop(shell, ctl_gsid_prop) # Allow shell to enable Dynamic System Update set_prop(shell, dynamic_system_prop) +# Allow shell to mock an OTA using persist.pm.mock-upgrade +set_prop(shell, mock_ota_prop) userdebug_or_eng(` # "systrace --boot" support - allow boottrace service to run