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: I89164330998d7fbea45dab65931c2a3db22a4c92
This commit is contained in:
Patty Huang 2023-06-28 22:22:30 +08:00
parent 4d0eeef36f
commit 1a52c8b952
4 changed files with 9 additions and 3 deletions

View file

@ -1,5 +1,2 @@
allow bluetooth proc_vendor_sched:dir r_dir_perms; allow bluetooth proc_vendor_sched:dir r_dir_perms;
allow bluetooth proc_vendor_sched:file w_file_perms; allow bluetooth proc_vendor_sched:file w_file_perms;
allow hal_bluetooth_btlinux aoc_device:chr_file { getattr open read write };
allow hal_bluetooth_btlinux device:dir r_dir_perms;

View file

@ -68,6 +68,9 @@ type persist_display_file, file_type, vendor_persist_type;
# CHRE # CHRE
type chre_socket, file_type; type chre_socket, file_type;
# BT
type vendor_bt_data_file, file_type, data_file_type;
# Storage Health HAL # Storage Health HAL
type proc_f2fs, proc_type, fs_type; type proc_f2fs, proc_type, fs_type;

View file

@ -211,6 +211,7 @@
/dev/maxfg_history u:object_r:battery_history_device:s0 /dev/maxfg_history u:object_r:battery_history_device:s0
/dev/battery_history u:object_r:battery_history_device:s0 /dev/battery_history u:object_r:battery_history_device:s0
/data/vendor/powerstats(/.*)? u:object_r:powerstats_vendor_data_file:s0 /data/vendor/powerstats(/.*)? u:object_r:powerstats_vendor_data_file:s0
/data/vendor/bluetooth(/.*)? u:object_r:vendor_bt_data_file:s0
# Persist # Persist
/mnt/vendor/persist/battery(/.*)? u:object_r:persist_battery_file:s0 /mnt/vendor/persist/battery(/.*)? u:object_r:persist_battery_file:s0

View file

@ -0,0 +1,5 @@
allow hal_bluetooth_btlinux aoc_device:chr_file { getattr open read write };
allow hal_bluetooth_btlinux device:dir r_dir_perms;
allow hal_bluetooth_btlinux vendor_bt_data_file:dir rw_dir_perms;
allow hal_bluetooth_btlinux vendor_bt_data_file:file create_file_perms;