diff --git a/private/compat/33.0/33.0.ignore.cil b/private/compat/33.0/33.0.ignore.cil index ffa7e4e94..af2f22e2c 100644 --- a/private/compat/33.0/33.0.ignore.cil +++ b/private/compat/33.0/33.0.ignore.cil @@ -43,6 +43,7 @@ timezone_metadata_prop tuner_config_prop tuner_server_ctl_prop + usb_uvc_enabled_prop virtual_face_hal_prop virtual_fingerprint_hal_prop hal_gatekeeper_service diff --git a/private/property.te b/private/property.te index c4351d1df..5383300fd 100644 --- a/private/property.te +++ b/private/property.te @@ -681,3 +681,9 @@ neverallow { domain -init } log_file_logger_prop:property_service set; + +neverallow { + domain + -init + -vendor_init +} usb_uvc_enabled_prop:property_service set; diff --git a/private/property_contexts b/private/property_contexts index 561129035..f3c8d55b8 100644 --- a/private/property_contexts +++ b/private/property_contexts @@ -1501,3 +1501,6 @@ tuner.server.enable u:object_r:tuner_server_ctl_prop:s0 exact bool # Adaptive haptics settings property vibrator.adaptive_haptics.enabled u:object_r:adaptive_haptics_prop:s0 exact string + +# UVC Gadget property +ro.usb.uvc.enabled u:object_r:usb_uvc_enabled_prop:s0 exact bool diff --git a/private/system_app.te b/private/system_app.te index 3b92c0f1b..9116058c5 100644 --- a/private/system_app.te +++ b/private/system_app.te @@ -177,6 +177,9 @@ allow system_app system_server:udp_socket { # Settings app reads ro.oem_unlock_supported get_prop(system_app, oem_unlock_prop) +# Settings app reads ro.usb.uvc.enabled +get_prop(system_app, usb_uvc_enabled_prop) + # Allow system apps to act as Perfetto producers. perfetto_producer(system_app) diff --git a/public/hal_usb_gadget.te b/public/hal_usb_gadget.te index 45bfdbe50..c0df9a9bd 100644 --- a/public/hal_usb_gadget.te +++ b/public/hal_usb_gadget.te @@ -14,3 +14,6 @@ allow hal_usb_gadget_server configfs:file create_file_perms; allow hal_usb_gadget_server functionfs:dir { read search }; allow hal_usb_gadget_server functionfs:file read; allow hal_usb_gadget_server proc_interrupts:file r_file_perms; + +# Read access to ro.usb.uvc.enabled +get_prop(hal_usb_gadget_server, usb_uvc_enabled_prop) diff --git a/public/property.te b/public/property.te index 346cd7710..0cde29483 100644 --- a/public/property.te +++ b/public/property.te @@ -187,6 +187,7 @@ system_vendor_config_prop(zram_config_prop) system_vendor_config_prop(zygote_config_prop) system_vendor_config_prop(dck_prop) system_vendor_config_prop(tuner_config_prop) +system_vendor_config_prop(usb_uvc_enabled_prop) # Properties with no restrictions system_public_prop(adbd_config_prop)