From 73a74266f9e22ea26aee40133805c695dca62752 Mon Sep 17 00:00:00 2001 From: Patty Huang Date: Wed, 28 Jun 2023 22:18:38 +0800 Subject: [PATCH] Allow bthal to access vendor bluetooth folder Bug: 289055382 Test: enable vendor debug log and check the vendor snoop log contain the vendor log Change-Id: I25d7080f89ef1ca5836315097eab3c2916c9f4c0 --- whitechapel/vendor/google/file.te | 3 +++ whitechapel/vendor/google/file_contexts | 1 + whitechapel/vendor/google/hal_bluetooth_btlinux.te | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 whitechapel/vendor/google/hal_bluetooth_btlinux.te diff --git a/whitechapel/vendor/google/file.te b/whitechapel/vendor/google/file.te index d8cce99a..8eec86af 100644 --- a/whitechapel/vendor/google/file.te +++ b/whitechapel/vendor/google/file.te @@ -55,6 +55,9 @@ type sysfs_fingerprint, sysfs_type, fs_type; # CHRE type chre_socket, file_type; +# BT +type vendor_bt_data_file, file_type, data_file_type; + # IOMMU type sysfs_iommu, sysfs_type, fs_type; diff --git a/whitechapel/vendor/google/file_contexts b/whitechapel/vendor/google/file_contexts index 961d9c27..ce7e5631 100644 --- a/whitechapel/vendor/google/file_contexts +++ b/whitechapel/vendor/google/file_contexts @@ -153,6 +153,7 @@ # data files /data/vendor/mediadrm(/.*)? u:object_r:mediadrm_vendor_data_file:s0 +/data/vendor/bluetooth(/.*)? u:object_r:vendor_bt_data_file:s0 # Camera /vendor/bin/hw/android\.hardware\.camera\.provider@2\.7-service-google u:object_r:hal_camera_default_exec:s0 diff --git a/whitechapel/vendor/google/hal_bluetooth_btlinux.te b/whitechapel/vendor/google/hal_bluetooth_btlinux.te new file mode 100644 index 00000000..851dc894 --- /dev/null +++ b/whitechapel/vendor/google/hal_bluetooth_btlinux.te @@ -0,0 +1,3 @@ +allow hal_bluetooth_btlinux vendor_bt_data_file:dir rw_dir_perms; +allow hal_bluetooth_btlinux vendor_bt_data_file:file create_file_perms; +