Merge "[ALPS03866092] BT HCI snoop log (2/2)" into alps-trunk-p0.basic

Change-Id: I57b57fd88223366357b717fb7aa9d9b2b2e31872
MTK-Commit-Id: d968e2163fad3e6912b3f9e937aa5b8a00cb8714
This commit is contained in:
Peng QI 2020-01-18 09:45:49 +08:00 committed by Gerrit Code Review
commit 7941a87b15
5 changed files with 59 additions and 3 deletions

View File

@ -8,3 +8,14 @@
binder_call(bluetooth, mtk_hal_bluetooth) binder_call(bluetooth, mtk_hal_bluetooth)
allow bluetooth storage_stub_file:dir getattr; allow bluetooth storage_stub_file:dir getattr;
# Date: 2018/01/17
#allow bluetooth to set property
set_prop(bluetooth, vendor_bluetooth_prop)
set_prop(bluetooth, debug_prop)
# Date: 2018/02/02
# Major permission allow are in /system/sepoplicy/private/bluetooth.te
# Add dir create perms for bluetooth on /data/misc/bluetooth/logs
allow bluetooth bluetooth_logs_data_file:dir { create_dir_perms relabelto };
allow bluetooth bluetooth_logs_data_file:fifo_file { create_file_perms };

View File

@ -26,6 +26,9 @@ allow platform_app mdlogger:unix_stream_socket connectto;
allow platform_app emdlogger:unix_stream_socket connectto; allow platform_app emdlogger:unix_stream_socket connectto;
allow platform_app cmddumper:unix_stream_socket connectto; allow platform_app cmddumper:unix_stream_socket connectto;
unix_socket_connect(platform_app, netdiag, netdiag) unix_socket_connect(platform_app, netdiag, netdiag)
# Date: 2018/11/17
# purpose: allow MTKLogger to control Bluetooth HCI log via socket
allow platform_app bluetooth:unix_stream_socket connectto;
# Date : 2014/10/17 # Date : 2014/10/17
# Operation : Migration # Operation : Migration

View File

@ -164,3 +164,6 @@ type vendor_consyslogger_prop, property_type, mtk_core_property_type;
#=============radio group property============= #=============radio group property=============
type vendor_radio_prop, property_type, mtk_core_property_type; type vendor_radio_prop, property_type, mtk_core_property_type;
#=============allow bluetooth==============
type vendor_bluetooth_prop, property_type, mtk_core_property_type;

View File

@ -173,3 +173,6 @@ vendor.ril. u:object_r:vendor_radio_prop:s0
ro.vendor.ril. u:object_r:vendor_radio_prop:s0 ro.vendor.ril. u:object_r:vendor_radio_prop:s0
vendor.gsm. u:object_r:vendor_radio_prop:s0 vendor.gsm. u:object_r:vendor_radio_prop:s0
persist.vendor.radio. u:object_r:vendor_radio_prop:s0 persist.vendor.radio. u:object_r:vendor_radio_prop:s0
#=============allow bluetooth==============
vendor.bthcisnoop u:object_r:vendor_bluetooth_prop:s0

36
plat_private/bluetooth.te Normal file
View File

@ -0,0 +1,36 @@
# ==============================================
# MTK Bluetooth Policy Rule
# Add permission only for platform system
# ==============================================
# Date: 2018/02/02
# Add permission for different storage types logging
# permission in storage for legacy android M version
allow bluetooth mnt_user_file:dir search;
allow bluetooth mnt_user_file:lnk_file read;
allow bluetooth storage_file:lnk_file read;
# purpose: allow access storage for legacy N version
allow bluetooth media_rw_data_file:file { create_file_perms };
allow bluetooth media_rw_data_file:dir { create_dir_perms };
# permission for storage link access in vzw Project
allow bluetooth mnt_media_rw_file:dir search;
# for logging sdcard access
allow bluetooth sdcard_type:dir { create_dir_perms };
allow bluetooth sdcard_type:file { create_file_perms };
allow bluetooth sdcardfs:dir { create_dir_perms };
allow bluetooth sdcardfs:file { create_file_perms };
allow bluetooth rootfs:lnk_file getattr;
allow bluetooth fuse:dir { create_dir_perms };
allow bluetooth fuse:file { create_file_perms };
# permission for storage access storage
allow bluetooth vfat:dir create_dir_perms;
allow bluetooth vfat:file create_file_perms;
allow bluetooth storage_file:dir { create_dir_perms };
allow bluetooth tmpfs:lnk_file read;
allow bluetooth storage_file:file { create_file_perms };