From 6c80fcba4dda44cb46b8fbf500baee472fd20065 Mon Sep 17 00:00:00 2001
From: Jack He <siyuanh@google.com>
Date: Tue, 18 Apr 2017 18:06:41 -0700
Subject: [PATCH] Allow Bluetooth process to access /dev/uhid in SELinux Policy

Bug: 37476041
Test: make, pair and connect to HID device
Change-Id: Ic7e81382994769e3f3a91255dcf3624edeaf6bfd
(cherry picked from commit a61f7f60ef1f26b84a4d9a420ac7b555d9b8ada1)
---
 private/bluetooth.te | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/private/bluetooth.te b/private/bluetooth.te
index d05a21f65..45b5710a1 100644
--- a/private/bluetooth.te
+++ b/private/bluetooth.te
@@ -33,6 +33,9 @@ allow bluetooth self:tun_socket create_socket_perms_no_ioctl;
 allow bluetooth tun_device:chr_file rw_file_perms;
 allow bluetooth efs_file:dir search;
 
+# allow Bluetooth to access uhid device for HID profile
+allow bluetooth uhid_device:chr_file rw_file_perms;
+
 # proc access.
 allow bluetooth proc_bluetooth_writable:file rw_file_perms;
 
-- 
GitLab