gpt4 book ai didi

android - 嗅探/记录您自己的 Android 蓝牙流量

转载 作者:IT老高 更新时间:2023-10-28 13:16:44 26 4
gpt4 key购买 nike

我最近购买了通过蓝牙与安卓手机/平板电脑连接的中国设备。由于没有适用于 windows/linux 的应用程序,我想创建一个供个人使用。

通常手机会连接到设备并交换一些数据。我将 PC 连接到设备并查看串行调试器并设法发现协议(protocol)(仅一种方式)。手机只向设备发送一个命令。但这一次我无法找出它包含的内容。

是否有任何软件可以让我查看通过蓝牙发送的数据?我尝试反编译应用程序,但它看起来非常不友好。

谢谢。

最佳答案

Android 4.4 (Kit Kat) 确实具有新的蓝牙嗅探功能。你应该试一试。

If you don’t own a sniffing device however, you aren’t necessarily out of luck. In many cases we can obtain positive results with a new feature introduced in Android 4.4: the ability to capture all Bluetooth HCI packets and save them to a file.

When the Analyst has finished populating the capture file by running the application being tested, he can pull the file generated by Android into the external storage of the device and analyze it (with Wireshark, for example).

Once this setting is activated, Android will save the packet capture to /sdcard/btsnoop_hci.log to be pulled by the analyst and inspected.

如果 /sdcard/ 不是您特定设备上的正确路径,请键入以下内容:

adb shell echo \$EXTERNAL_STORAGE

We can then open a shell and pull the file: $adb pull /sdcard/btsnoop_hci.log and inspect it with Wireshark, just like a PCAP collected by sniffing WiFi traffic for example, so it is very simple and well supported:

screenshot of wireshark capture using Android HCI Snoop

[source]

您可以通过转到“设置”->“开发者选项”,然后选中“蓝牙 HCI Snoop Log”旁边的框来启用此功能。

关于android - 嗅探/记录您自己的 Android 蓝牙流量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23877761/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com