From 3f045e296e3b5f07f7bca267d1a989b226ff6d70 Mon Sep 17 00:00:00 2001 From: Ady Abraham Date: Sat, 19 Feb 2022 01:09:39 +0000 Subject: [PATCH] Allow hal_graphics_composer to write to a pipe We would like SurfaceFlinger to be able to create a pipe and provide the write-end to the graphics composer to dump debug info for dumpsys. Bug: 220171623 Test: atest VtsHalGraphicsComposer3_TargetTest Test: adb shell dumpsys SurfaceFlinger Test: adb shell dumpsys android.hardware.graphics.composer3.IComposer/default Change-Id: Ie2cbe76fb0d224235a8ea99f68a20e2139e1cc56 --- public/hal_graphics_composer.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/hal_graphics_composer.te b/public/hal_graphics_composer.te index 732725649..3dbc1d8e6 100644 --- a/public/hal_graphics_composer.te +++ b/public/hal_graphics_composer.te @@ -31,6 +31,10 @@ allow hal_graphics_composer appdomain:fd use; # allow self to set SCHED_FIFO allow hal_graphics_composer self:global_capability_class_set sys_nice; +# allow surfaceflinger to use a pipe for dumpsys output +allow hal_graphics_composer_server hal_graphics_composer_client:fifo_file write; + + binder_call(hal_graphics_composer_client, servicemanager) binder_call(hal_graphics_composer_server, servicemanager)