一个用于 Windows 的小工具:通过 ADB 导出 Android bugreport,检查其中是否包含蓝牙 HCI 日志(通常为 btsnoop_hci.log)。适合把测试设备的蓝牙诊断日志交给开发或分析人员。
适用于支持 Android 蓝牙 HCI 日志和 ADB bugreport 的设备。
- 解压本项目。项目已包含 Android SDK Platform-Tools 和
adb.exe,无需安装 Android Studio 或单独配置 ADB。 - 在手机上开启开发者选项、USB 调试和“启用蓝牙 HCI 信息收集日志”(系统名称可能略有不同)。
- 用支持数据传输的 USB 线连接手机,并在手机上允许 USB 调试授权。
- 在手机上完成需要记录的蓝牙操作。
- 双击
run-export.cmd。 - 根据屏幕提示操作,导出时保持手机解锁且不要断开 USB。
- 完成后,将项目根目录新生成的
HCI日志-时间戳.zip发给分析人员。
导出文件还会保存在 exports/ 下。这些文件可能含有设备信息和系统日志,请仅在获得设备使用者同意后分享,且不要提交到 GitHub。
- 未发现设备或设备未授权:检查 USB 调试、手机授权提示和数据线;运行
adb devices可查看状态。 - 显示 offline:重新插拔数据线,必要时关闭再开启 USB 调试。
- 没有 HCI 日志:开启 HCI 日志后,关闭再打开蓝牙,重新完成测试流程再导出。
- 多台设备已连接:请只保留一台目标设备。
A small Windows utility that exports an Android bugreport through ADB and checks whether it contains a Bluetooth HCI log, usually btsnoop_hci.log. It is intended for collecting Bluetooth diagnostics from a test device.
It works with Android devices that support Bluetooth HCI logging and ADB bugreport.
- Extract this project. It already includes Android SDK Platform-Tools and
adb.exe; Android Studio and a separate ADB installation are not required. - On the phone, enable Developer options, USB debugging, and Bluetooth HCI logging.
- Connect the phone with a data-capable USB cable and accept the USB debugging prompt.
- Reproduce the Bluetooth activity you want to capture on the phone.
- Double-click
run-export.cmd. - Follow the prompts. Keep the phone unlocked and connected while the export runs.
- Send the newly created
HCI日志-timestamp.zipfrom the project root to the person analyzing the log.
The source bugreport and note are also stored under exports/. They can contain device details and system logs. Obtain consent before sharing them and never commit them to GitHub.
- No authorized device: verify USB debugging, accept the phone prompt, and use a data-capable cable. Run
adb devicesto inspect the state. - Device is offline: reconnect the cable and, if needed, toggle USB debugging.
- No HCI log was found: enable HCI logging, restart Bluetooth, reproduce the issue, then export again.
- More than one device: disconnect all but the target device.
This repository includes the launcher, PowerShell script, and Android SDK Platform-Tools required for offline use. It intentionally excludes generated logs.
The project source code is released under the MIT License. See THIRD_PARTY_NOTICES.md for the separately distributed tools used by this project.
Android and ADB are trademarks of their respective owners. Their use here is descriptive only and does not imply endorsement.