From a283ac713c9e8ce18ac2bcfa8bf2d250ee2a8f17 Mon Sep 17 00:00:00 2001 From: Pavel Grafov <pgrafov@google.com> Date: Thu, 20 Apr 2017 18:02:50 +0100 Subject: [PATCH] Let shell and bugreport read logging related properties. Currently ro.device_owner and persist.logd.security aren't accessible without root, so "adb shell getprop" returns empty reply which is confusing. Also these properties aren't seen from bugreport unless their change happened recently. Bug: 37053313 Test: manual, took bugreport and ran getprop after "adb unroot". Change-Id: Id41cdabc282f2ebcdfc0ac7fe9df756322a0863d --- public/dumpstate.te | 3 +++ public/shell.te | 3 +++ 2 files changed, 6 insertions(+) diff --git a/public/dumpstate.te b/public/dumpstate.te index 3322e1468..15c61320b 100644 --- a/public/dumpstate.te +++ b/public/dumpstate.te @@ -185,6 +185,9 @@ set_prop(dumpstate, dumpstate_options_prop) # Read device's serial number from system properties get_prop(dumpstate, serialno_prop) +# Read state of logging-related properties +get_prop(dumpstate, device_logging_prop) + # Access to /data/media. # This should be removed if sdcardfs is modified to alter the secontext for its # accesses to the underlying FS. diff --git a/public/shell.te b/public/shell.te index fd0f2efa2..1fb896a7d 100644 --- a/public/shell.te +++ b/public/shell.te @@ -75,6 +75,9 @@ userdebug_or_eng(` # Read device's serial number from system properties get_prop(shell, serialno_prop) +# Read state of logging-related properties +get_prop(shell, device_logging_prop) + # allow shell access to services allow shell servicemanager:service_manager list; # don't allow shell to access GateKeeper service -- GitLab