From cb3f59b89e99a59e8ee8d7a9e5493729883b3dd6 Mon Sep 17 00:00:00 2001 From: jonerlin Date: Sat, 27 Mar 2021 13:50:48 +0800 Subject: [PATCH] bthal: allow bthal to access bluetooth kernel driver logbuffer_btlpm and logbuffer_btuart device node * add sepolicy rules to let bthal can access bluetooth kernel device nodes dev/logbuffer_btlpm and dev/logbuffer_tty16 in engineer or user debug build Bug: 177794127 Test: Manually Change-Id: I5253719df82ca7ef8e64cbd3f2b0ff6d3f088edc --- whitechapel/vendor/google/file_contexts | 2 ++ whitechapel/vendor/google/hal_bluetooth_btlinux.te | 1 + 2 files changed, 3 insertions(+) diff --git a/whitechapel/vendor/google/file_contexts b/whitechapel/vendor/google/file_contexts index 08499a41..d479face 100644 --- a/whitechapel/vendor/google/file_contexts +++ b/whitechapel/vendor/google/file_contexts @@ -296,6 +296,8 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.bluetooth@1\.1-service\.bcmbtlinux u:object_r:hal_bluetooth_btlinux_exec:s0 /dev/wbrc u:object_r:wb_coexistence_dev:s0 /dev/ttySAC16 u:object_r:hci_attach_dev:s0 +/dev/logbuffer_btlpm u:object_r:logbuffer_device:s0 +/dev/logbuffer_tty16 u:object_r:logbuffer_device:s0 # Audio /mnt/vendor/persist/aoc(/.*)? u:object_r:persist_aoc_file:s0 diff --git a/whitechapel/vendor/google/hal_bluetooth_btlinux.te b/whitechapel/vendor/google/hal_bluetooth_btlinux.te index 3299ffe8..f348099e 100644 --- a/whitechapel/vendor/google/hal_bluetooth_btlinux.te +++ b/whitechapel/vendor/google/hal_bluetooth_btlinux.te @@ -18,4 +18,5 @@ allow hal_bluetooth_btlinux sscoredump_vendor_data_crashinfo_file:file create_fi userdebug_or_eng(` allow hal_bluetooth_btlinux sscoredump_vendor_data_coredump_file:dir create_dir_perms; allow hal_bluetooth_btlinux sscoredump_vendor_data_coredump_file:file create_file_perms; + allow hal_bluetooth_btlinux logbuffer_device:chr_file r_file_perms; ')