From 27d52551b192821e8dd7dd0a57953036dcad0da8 Mon Sep 17 00:00:00 2001 From: Wenjie Zhou Date: Thu, 9 Apr 2020 14:43:00 -0700 Subject: [PATCH] Enable incidentd access to ro.boot.bootreason incident report contains similar data as in a bugreport, but in proto format. Test: adb shell incident -p LOCAL 1000 Bug: 152173578 Change-Id: Iee53a3b8a6c95629a1d5c15b4d17f3d680b14178 --- private/bootstat.te | 1 + private/incidentd.te | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/private/bootstat.te b/private/bootstat.te index da3179b1e..016292ed3 100644 --- a/private/bootstat.te +++ b/private/bootstat.te @@ -15,6 +15,7 @@ neverallow { -bootanim -bootstat -dumpstate + userdebug_or_eng(`-incidentd') -init -recovery -shell diff --git a/private/incidentd.te b/private/incidentd.te index c379fa237..405684ae6 100644 --- a/private/incidentd.te +++ b/private/incidentd.te @@ -168,6 +168,14 @@ userdebug_or_eng(` get_prop(incidentd, serialno_prop) ') +# Read ro.boot.bootreason, persist.sys.boot.bootreason +# This is used to track reports from lab testing devices +userdebug_or_eng(` + get_prop(incidentd, bootloader_boot_reason_prop); + get_prop(incidentd, system_boot_reason_prop); + get_prop(incidentd, last_boot_reason_prop); +') + ### ### neverallow rules ###