diff --git a/bluetooth.te b/bluetooth.te index 2b99c3e92..d8448a6d9 100644 --- a/bluetooth.te +++ b/bluetooth.te @@ -10,6 +10,8 @@ wakelock_use(bluetooth); # Data file accesses. allow bluetooth bluetooth_data_file:dir create_dir_perms; allow bluetooth bluetooth_data_file:notdevfile_class_set create_file_perms; +allow bluetooth bluetooth_logs_data_file:dir rw_dir_perms; +allow bluetooth bluetooth_logs_data_file:file create_file_perms; # Socket creation under /data/misc/bluedroid. type_transition bluetooth bluetooth_data_file:sock_file bluetooth_socket; diff --git a/file.te b/file.te index 75b4b3cdb..f80e46f9d 100644 --- a/file.te +++ b/file.te @@ -141,6 +141,7 @@ type adb_keys_file, file_type, data_file_type; type audio_data_file, file_type, data_file_type; type audioserver_data_file, file_type, data_file_type; type bluetooth_data_file, file_type, data_file_type; +type bluetooth_logs_data_file, file_type, data_file_type; type bootstat_data_file, file_type, data_file_type; type boottrace_data_file, file_type, data_file_type; type camera_data_file, file_type, data_file_type; diff --git a/file_contexts b/file_contexts index 59cbdd044..36fde98c7 100644 --- a/file_contexts +++ b/file_contexts @@ -268,6 +268,7 @@ /data/misc/bootstat(/.*)? u:object_r:bootstat_data_file:s0 /data/misc/boottrace(/.*)? u:object_r:boottrace_data_file:s0 /data/misc/bluetooth(/.*)? u:object_r:bluetooth_data_file:s0 +/data/misc/bluetooth/logs(/.*)? u:object_r:bluetooth_logs_data_file:s0 /data/misc/bluedroid(/.*)? u:object_r:bluetooth_data_file:s0 /data/misc/bluedroid/\.a2dp_ctrl u:object_r:bluetooth_socket:s0 /data/misc/bluedroid/\.a2dp_data u:object_r:bluetooth_socket:s0