From 7d7f055d462933d5913818620f1e97d809d736c4 Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Tue, 20 Jun 2023 07:25:30 +0000 Subject: [PATCH] Create telephony.ril.silent_reset system_ext property for RILD restart RILD listens for changes to this property. If the value changes to 1, RILD will restart itself and set this property back to 0. The TelephonyGoogle app will set this property to 1 when it receives a request from the SCONE app. Since TelephonyGoogle runs in the com.android.phone process, we also need to give the radio domain permission to set the telephony.ril.silent_reset property. Bug: 286476107 Test: manual Change-Id: I363b44a1a44184df05449ceb97089bb9e0211550 --- radio/radio.te | 2 ++ radio/rild.te | 2 ++ system_ext/private/property_contexts | 2 ++ system_ext/public/property.te | 6 ++++++ 4 files changed, 12 insertions(+) create mode 100644 system_ext/private/property_contexts create mode 100644 system_ext/public/property.te diff --git a/radio/radio.te b/radio/radio.te index 5d13273..221c812 100644 --- a/radio/radio.te +++ b/radio/radio.te @@ -1,3 +1,5 @@ +set_prop(radio, telephony_ril_prop) + allow radio radio_vendor_data_file:dir rw_dir_perms; allow radio radio_vendor_data_file:file create_file_perms; allow radio vendor_ims_app:udp_socket { getattr read write setopt shutdown }; diff --git a/radio/rild.te b/radio/rild.te index a82e135..3a2bac7 100644 --- a/radio/rild.te +++ b/radio/rild.te @@ -6,6 +6,8 @@ get_prop(rild, vendor_carrier_prop) get_prop(rild, sota_prop) get_prop(rild, system_boot_reason_prop) +set_prop(rild, telephony_ril_prop) + allow rild proc_net:file rw_file_perms; allow rild radio_vendor_data_file:dir create_dir_perms; allow rild radio_vendor_data_file:file create_file_perms; diff --git a/system_ext/private/property_contexts b/system_ext/private/property_contexts new file mode 100644 index 0000000..2f40ca4 --- /dev/null +++ b/system_ext/private/property_contexts @@ -0,0 +1,2 @@ +# Telephony +telephony.ril.silent_reset u:object_r:telephony_ril_prop:s0 exact bool diff --git a/system_ext/public/property.te b/system_ext/public/property.te new file mode 100644 index 0000000..8ad51ac --- /dev/null +++ b/system_ext/public/property.te @@ -0,0 +1,6 @@ +# Telephony +system_public_prop(telephony_ril_prop) + +userdebug_or_eng(` + set_prop(shell, telephony_ril_prop) +') \ No newline at end of file