automation: Allow mock modem in test boots
New CTS setup requirement for Android 13. The
persist.radio.allow_mock_modem system property cannot be set via adb on
user builds, but on user builds the option needs to be set for full CTS
runs.
Change-Id: Ifd7feaa1483dff977a7ed6447f81c23273ab8ce0
diff --git a/automation_setup/automation_setup.sh b/automation_setup/automation_setup.sh
index decf742..0229bff 100644
--- a/automation_setup/automation_setup.sh
+++ b/automation_setup/automation_setup.sh
@@ -27,6 +27,9 @@
settings_put global device_provisioned 1
settings_put secure user_setup_complete 1
+# Allow "mock" modem for Android 13 and beyond
+setprop persist.radio.allow_mock_modem true
+
# Remove trigger so we don't run again
rm -v /data/userdata_automation/trigger
diff --git a/sepolicy/vendor/automation_setup/automation_setup.te b/sepolicy/vendor/automation_setup/automation_setup.te
index 1e127a3..eee5349 100644
--- a/sepolicy/vendor/automation_setup/automation_setup.te
+++ b/sepolicy/vendor/automation_setup/automation_setup.te
@@ -37,5 +37,8 @@
# Allow setprop
set_prop(automation_setup, system_prop)
+# Allow enabling mock modem for CTS (persist.radio.allow_mock_modem)
+set_prop(automation_setup, radio_control_prop)
+
# Allow service option "stdio_to_kmsg"
allow automation_setup kmsg_debug_device:chr_file { ioctl open getattr append write };