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

推荐订阅源

F
Full Disclosure
V2EX - 技术
V2EX - 技术
The Register - Security
The Register - Security
H
Help Net Security
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
Recorded Future
Recorded Future
GbyAI
GbyAI
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
L
LangChain Blog
D
DataBreaches.Net
M
MIT News - Artificial intelligence
雷峰网
雷峰网
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 司徒正美
C
Check Point Blog
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
G
Google Developers Blog
博客园 - 聂微东
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Palo Alto Networks Blog
有赞技术团队
有赞技术团队
Attack and Defense Labs
Attack and Defense Labs
N
News | PayPal Newsroom
V
V2EX
T
Troy Hunt's Blog
N
News and Events Feed by Topic
The GitHub Blog
The GitHub Blog
Webroot Blog
Webroot Blog
The Hacker News
The Hacker News
I
InfoQ
L
LINUX DO - 最新话题
AWS News Blog
AWS News Blog
美团技术团队
博客园 - 叶小钗
SecWiki News
SecWiki News
G
GRAHAM CLULEY
Vercel News
Vercel News
A
About on SuperTechFans

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);
	 }
 }