From 1abf80e5c103b216f8bf2b327a292afc1f496972 Mon Sep 17 00:00:00 2001 From: Alex Hong Date: Fri, 13 Jan 2023 22:28:23 +0800 Subject: [PATCH] Allow vendor_init to set properties for recovery/fastbootd USB IDs Bug: 211547922 Test: SELinuxUncheckedDenialBootTest Test: Enter recovery/fastbootd mode $ lsusb -d 18d1: Change-Id: Ibee1210c1a70a3165e70f9b3b57e11949e412c97 --- private/compat/33.0/33.0.ignore.cil | 1 + private/property_contexts | 4 ++++ public/property.te | 1 + 3 files changed, 6 insertions(+) diff --git a/private/compat/33.0/33.0.ignore.cil b/private/compat/33.0/33.0.ignore.cil index af2f22e2c..6808973ae 100644 --- a/private/compat/33.0/33.0.ignore.cil +++ b/private/compat/33.0/33.0.ignore.cil @@ -36,6 +36,7 @@ ntfs permissive_mte_prop prng_seeder + recovery_usb_config_prop remote_provisioning_service rkpdapp servicemanager_prop diff --git a/private/property_contexts b/private/property_contexts index f3c8d55b8..546fab09a 100644 --- a/private/property_contexts +++ b/private/property_contexts @@ -702,6 +702,10 @@ ro.oem_unlock_supported u:object_r:oem_unlock_prop:s0 exact int ro.rebootescrow.device u:object_r:rebootescrow_hal_prop:s0 exact string +ro.recovery.usb.vid u:object_r:recovery_usb_config_prop:s0 exact string +ro.recovery.usb.adb.pid u:object_r:recovery_usb_config_prop:s0 exact string +ro.recovery.usb.fastboot.pid u:object_r:recovery_usb_config_prop:s0 exact string + ro.storage_manager.enabled u:object_r:storagemanager_config_prop:s0 exact bool ro.storage_manager.show_opt_in u:object_r:storagemanager_config_prop:s0 exact bool diff --git a/public/property.te b/public/property.te index 0cde29483..533c57f2a 100644 --- a/public/property.te +++ b/public/property.te @@ -164,6 +164,7 @@ system_vendor_config_prop(mm_events_config_prop) system_vendor_config_prop(oem_unlock_prop) system_vendor_config_prop(packagemanager_config_prop) system_vendor_config_prop(recovery_config_prop) +system_vendor_config_prop(recovery_usb_config_prop) system_vendor_config_prop(sendbug_config_prop) system_vendor_config_prop(soc_prop) system_vendor_config_prop(storage_config_prop)