From 8585788d9f2ab5cd1af4feee2cba036e2a0ee910 Mon Sep 17 00:00:00 2001
From: Chia-I Wu <olv@google.com>
Date: Fri, 24 Feb 2017 07:23:45 -0800
Subject: [PATCH] Allow adbd to use graphics fds

Bug: 35708449
Test: AS screen capture
Change-Id: I53f1604e1ee9c9b32c6932f1b8944708f5012e5f
---
 private/adbd.te | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/private/adbd.te b/private/adbd.te
index 5b0b8f22a..1865b2a10 100644
--- a/private/adbd.te
+++ b/private/adbd.te
@@ -70,6 +70,9 @@ binder_call(adbd, surfaceflinger)
 allow adbd gpu_device:chr_file rw_file_perms;
 allow adbd ion_device:chr_file rw_file_perms;
 r_dir_file(adbd, system_file)
+# Needed for Android Studio screenshot
+hwbinder_use(adbd)
+allow adbd hal_graphics_allocator:fd use;
 
 # Read /data/misc/adb/adb_keys.
 allow adbd adb_keys_file:dir search;
-- 
GitLab