通过ADB的方式配置HCI Log开关及file path

Android 6.0及7.0版本,蓝牙HCI Log的开关及Path配置的位置变更,具体如下:

配置文件为etc/bluetooth/bt_stack.conf,通过ADB将该文件pull,修改后,再push会系统,开关蓝牙生效;

1# Enable BtSnoop logging function
2# valid value : true, false
3BtSnoopLogOutput=false
4
5# BtSnoop log output file
6BtSnoopFileName=/sdcard/btsnoop_hci.log
7
8# Preserve existing BtSnoop log before overwriting
9BtSnoopSaveLog=false

Android 8.0开始,蓝牙HCI Log的开关及Path配置的位置变更,具体如下:

通过adb shell setprop修改SystemProperties值进行控制。

46// The number of of packets per btsnoop file before we rotate to the next
47// file. As of right now there are two snoop files that are rotated through.
48// The size can be dynamically configured by seting the relevant system
49// property
50#define DEFAULT_BTSNOOP_SIZE 0xffff
51
52#define BTSNOOP_ENABLE_PROPERTY "persist.bluetooth.btsnoopenable"
53#define BTSNOOP_PATH_PROPERTY "persist.bluetooth.btsnooppath"
54#define DEFAULT_BTSNOOP_PATH "/data/misc/bluetooth/logs/btsnoop_hci.log"
55#define BTSNOOP_MAX_PACKETS_PROPERTY "persist.bluetooth.btsnoopsize"
56

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值