From 46dd4be36658ff252992b8c7a04825f00aad51bd Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Tue, 18 Aug 2020 11:25:32 +0900 Subject: [PATCH] Reland "Add persist.dumpstate.verbose_logging.enabled to system/..." This reverts commit 409c038d3c356c5a9eb418b966d08375c0b65f37. Reason for revert: fixed breakage Bug: 163759751 Test: lunch sdk; m selinux_policy Change-Id: I59d170cd3a764209d353d77372387fdc8719ea7f --- private/compat/30.0/30.0.ignore.cil | 1 + private/property.te | 7 +++++++ private/property_contexts | 1 + public/hal_dumpstate.te | 2 ++ public/property.te | 1 + 5 files changed, 12 insertions(+) diff --git a/private/compat/30.0/30.0.ignore.cil b/private/compat/30.0/30.0.ignore.cil index ada1bcff5..9cead18d4 100644 --- a/private/compat/30.0/30.0.ignore.cil +++ b/private/compat/30.0/30.0.ignore.cil @@ -9,6 +9,7 @@ apex_info_file debugfs_kprobes gnss_device + hal_dumpstate_config_prop keystore2_key_contexts_file mediatranscoding_tmpfs people_service diff --git a/private/property.te b/private/property.te index d62ea9c99..96edc148f 100644 --- a/private/property.te +++ b/private/property.te @@ -446,3 +446,10 @@ neverallow { -dumpstate -appdomain } camera_calibration_prop:file no_rw_file_perms; + +neverallow { + -init + -dumpstate + -hal_dumpstate + not_compatible_property(`-vendor_init') +} hal_dumpstate_config_prop:file no_rw_file_perms; diff --git a/private/property_contexts b/private/property_contexts index 0c563fdd6..2397150e6 100644 --- a/private/property_contexts +++ b/private/property_contexts @@ -517,6 +517,7 @@ drm.service.enabled u:object_r:drm_service_config_prop:s0 exact bool dumpstate.dry_run u:object_r:exported_dumpstate_prop:s0 exact bool dumpstate.unroot u:object_r:exported_dumpstate_prop:s0 exact bool +persist.dumpstate.verbose_logging.enabled u:object_r:hal_dumpstate_config_prop:s0 exact bool hal.instrumentation.enable u:object_r:hal_instrumentation_prop:s0 exact bool diff --git a/public/hal_dumpstate.te b/public/hal_dumpstate.te index b7676ed29..b7e14f8a5 100644 --- a/public/hal_dumpstate.te +++ b/public/hal_dumpstate.te @@ -2,6 +2,8 @@ binder_call(hal_dumpstate_client, hal_dumpstate_server) binder_call(hal_dumpstate_server, hal_dumpstate_client) +set_prop(hal_dumpstate, hal_dumpstate_config_prop) + hal_attribute_hwservice(hal_dumpstate, hal_dumpstate_hwservice) # write bug reports in /data/data/com.android.shell/files/bugreports/bugreport diff --git a/public/property.te b/public/property.te index 3c913b1f5..34ed99959 100644 --- a/public/property.te +++ b/public/property.te @@ -169,6 +169,7 @@ system_public_prop(exported_bluetooth_prop) system_public_prop(exported_overlay_prop) system_public_prop(exported_pm_prop) system_public_prop(ffs_control_prop) +system_public_prop(hal_dumpstate_config_prop) system_public_prop(sota_prop) system_public_prop(hwservicemanager_prop) system_public_prop(lmkd_prop)