From 7fa260ab0c7ea04518dead056a1fc36f24c77686 Mon Sep 17 00:00:00 2001
From: Mikhail Naganov <mnaganov@google.com>
Date: Mon, 8 May 2017 10:12:45 -0700
Subject: [PATCH] hal_audio: Allow writing dump info into pipes when capturing
 BR

The following HAL methods use file descriptors to write dump
info comprising audioflinger debug dump:

IDevice.debugDump
IEffectsFactory.debugDump
IStream.debugDump

Bug: 37993476
Test: check contents of media.audio_flinger section in
      a bugreport captured on Pixel device
Merged-In: I77d347c019ac93c3ba0d54ce50f0fdc243b04685

Change-Id: Ia0531f715ae5f8b2599153e54a11e9eb4ee47d4b
---
 public/hal_audio.te | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/public/hal_audio.te b/public/hal_audio.te
index 5b1a4dff5..33330bf6b 100644
--- a/public/hal_audio.te
+++ b/public/hal_audio.te
@@ -20,6 +20,8 @@ allow hal_audio audio_device:chr_file rw_file_perms;
 # Needed to provide debug dump output via dumpsys' pipes.
 allow hal_audio shell:fd use;
 allow hal_audio shell:fifo_file write;
+allow hal_audio dumpstate:fd use;
+allow hal_audio dumpstate:fifo_file write;
 
 ###
 ### neverallow rules
-- 
GitLab