From c5ac946a7a56babf39cdfe03aaff229f0366e1ce Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Tue, 22 Nov 2022 23:27:44 +0000 Subject: [PATCH] Allow Trusty storageproxy property Allows the Trusty storageproxyd to set ro.vendor.trusty.storage.fs_ready when the data filesystems are ready for use, and allows vendor init to query and wait on this property. Test: build, flash, test app loading Bug: 258018785 Change-Id: I5fe83524d74a6f5017011553c6d5ad0e3831751c --- legacy/whitechapel_pro/property.te | 2 ++ legacy/whitechapel_pro/property_contexts | 2 ++ legacy/whitechapel_pro/tee.te | 2 ++ legacy/whitechapel_pro/vendor_init.te | 3 +++ 4 files changed, 9 insertions(+) diff --git a/legacy/whitechapel_pro/property.te b/legacy/whitechapel_pro/property.te index 56ea2611..676fa651 100644 --- a/legacy/whitechapel_pro/property.te +++ b/legacy/whitechapel_pro/property.te @@ -22,3 +22,5 @@ system_vendor_config_prop(vendor_uwb_calibration_prop) # Dynamic sensor vendor_internal_prop(vendor_dynamic_sensor_prop) +# Trusty storage FS ready +vendor_internal_prop(vendor_trusty_storage_prop) diff --git a/legacy/whitechapel_pro/property_contexts b/legacy/whitechapel_pro/property_contexts index 830ce69f..8945ca6e 100644 --- a/legacy/whitechapel_pro/property_contexts +++ b/legacy/whitechapel_pro/property_contexts @@ -51,3 +51,5 @@ ro.vendor.uwb.calibration. u:object_r:vendor_uwb_calibration_pro # Dynamic sensor vendor.dynamic_sensor. u:object_r:vendor_dynamic_sensor_prop:s0 +# Trusty +ro.vendor.trusty.storage.fs_ready u:object_r:vendor_trusty_storage_prop:s0 diff --git a/legacy/whitechapel_pro/tee.te b/legacy/whitechapel_pro/tee.te index 58228b5a..811dcbbc 100644 --- a/legacy/whitechapel_pro/tee.te +++ b/legacy/whitechapel_pro/tee.te @@ -15,3 +15,5 @@ read_fstab(tee) # storageproxyd starts before /data is mounted. It handles /data not being there # gracefully. However, attempts to access /data trigger a denial. dontaudit tee unlabeled:dir { search }; + +set_prop(tee, vendor_trusty_storage_prop) diff --git a/legacy/whitechapel_pro/vendor_init.te b/legacy/whitechapel_pro/vendor_init.te index 97a84f5d..f4769976 100644 --- a/legacy/whitechapel_pro/vendor_init.te +++ b/legacy/whitechapel_pro/vendor_init.te @@ -23,3 +23,6 @@ allow vendor_init modem_img_file:filesystem { getattr }; # Battery set_prop(vendor_init, vendor_battery_defender_prop) + +# Trusty storage FS ready +get_prop(vendor_init, vendor_trusty_storage_prop)