惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Help Net Security
Help Net Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
T
Threatpost
T
Tor Project blog
AWS News Blog
AWS News Blog
S
Schneier on Security
Cyberwarzone
Cyberwarzone
The Hacker News
The Hacker News
Scott Helme
Scott Helme
C
Cybersecurity and Infrastructure Security Agency CISA
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Palo Alto Networks Blog
P
Proofpoint News Feed
Vercel News
Vercel News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V
V2EX
腾讯CDC
C
CERT Recently Published Vulnerability Notes
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V2EX - 技术
V2EX - 技术
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
D
Docker
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
Know Your Adversary
Know Your Adversary
宝玉的分享
宝玉的分享
爱范儿
爱范儿
Simon Willison's Weblog
Simon Willison's Weblog
N
News | PayPal Newsroom
Recent Announcements
Recent Announcements
小众软件
小众软件
Project Zero
Project Zero
SecWiki News
SecWiki News
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
Cloudbric
Cloudbric
博客园 - Franky
Forbes - Security
Forbes - Security
C
Cisco Blogs
Webroot Blog
Webroot Blog
H
Help Net Security

MoonLab

VSCode + OpenOCD 远程调试开发STM32 Clangd + VSCode使用方法 Keil5 编译错误 error: call to undeclared function '__enable_irq' 算法 - 前缀和 2025蓝桥杯赛后总结 三星ZFold 3改造 JavaScript 逆向 Steam 登录二维码 快速求解平方根倒数算法 Protobuf Android设备安装Debian成为BT下载服务器 [双系统] Windows 更新摧毁了我的Linux系统 Reading List Golang embed 使用问题 Hexo博客自动备份插件 云盘备份支持 通过汇编分析栈、函数调用 esp&ebp Git push 出现 permisson denied error 403 坑:Litepal save方法返回true却没有保存 Android Shizuku源码分析 第二篇 Android Shizuku源码分析 Android 监听第三方Activity的一举一动 Android笔记#1 View的事件分发机制解析 知乎日报的问题 使用Hexo Hello World Ubnutu 无法启动网易云音乐 - 总结 Windows 好软推荐 | 这一定是良心软件 typecho - http转https 如何评价Android P MoonLab MoonLab MoonLab 关于 项目
BTSNOOP is FUN!
LingC · 2025-08-01 · via MoonLab

手机 HCI 日志记录

在VIVO手机中的开发者选项,启用蓝牙 HCI 信息手机日志。

用USB连接电脑后,将 USB连接方式 调整为传输文件。

adb bugreport vivo_btsnoop

会在 /data/user_de/0/com.android.shell/files/ 下生成日志,并自动拉取到电脑上。

在 bugreport.zip 下的 \FS\data\misc\bluetooth\logs 中能找到 HCI log:

Knowledge Base

UUID

UUID(Universally Unique Identifier)是一个 128位(16字节) 的唯一标识符,用于标识蓝牙协议中的各种组件 Services Characteristics Descriptors 的类型和功能。

Service

Service 是蓝牙设备提供的 功能集合,每个 Service 包含一个或多个 Characteristic

Service 也分为 Primary ServiceSecondary Service

Characteristic

Characteristic 是 Service 中的 具体数据点,用于 读取、写入、通知 数据。
每个 Characteristic 包含:

  • Value:存储的数据(如温度、心率等)。
  • Properties:定义操作权限(readwritenotify 等)。
  • Descriptors:额外配置(如通知开关)。

抓包

我已经知道这是一个蓝牙低功耗(BLE)设备,只需找到Attribute Protocol通信:

在安卓设备中,我也找到了一个国产的还挺好用的蓝牙调试工具,E调试。

我们在浏览器环境使用 Web Bluetooth API 来进行蓝牙通信。

// Bluetooth functionality
if (!navigator.bluetooth) {
 console.error('Web Bluetooth API 不支持此浏览器');
} else {
 async function connectAndWrite() {
	 try {
		 console.log("Requesting Bluetooth Device...");
		 
		 // 扫描并选择设备
		 const device = await navigator.bluetooth.requestDevice({
			 // acceptAllDevices: true,
			 filters: [{ name: 'JEU-Lush139-XT' }],
			 optionalServices: ['generic_access', '53300001-0023-4bd4-bbd5-a6920e4c5653'] // 指定要访问的服务
		 });

		 console.log("Device:", device.name);
		 
		 // 连接到 GATT 服务器
		 const server = await device.gatt.connect();
		 console.log("Connected to GATT Server");

		 // 获取服务
		 const service = await server.getPrimaryService("53300001-0023-4bd4-bbd5-a6920e4c5653");
		 console.log("Service:", service.uuid);

		 // Notify
		 const characteristic = await service.getCharacteristic("53300002-0023-4bd4-bbd5-a6920e4c5653");
		 await characteristic.startNotifications();
		 characteristic.addEventListener('characteristicvaluechanged', (event) => {
			 const value = event.target.value;
			 console.log("Received value:", value);
		 });
		 const close_cmd = [0x85, 0x8b, 0x5b, 0x55, 0x67, 0x7a, 0x7b, 0x7c, 0x1a];
		 const open_cmd = [0x85, 0x8b, 0x5b, 0x55, 0x66, 0x6a, 0x6b, 0x6c, 0x0b];
		 const characteristic2 = await service.getCharacteristic("53300003-0023-4bd4-bbd5-a6920e4c5653");
		 characteristic2.writeValue(new Uint8Array(open_cmd));
		 console.log("Data written successfully!");

		 // 断开连接
		 device.gatt.disconnect();
		 console.log("Disconnected");
	 } catch (error) {
		 console.error("Error:", error);
	 }
 }