使用 adb 查找设备蓝牙 MAC 地址 [英] Find device bluetooth MAC address using adb
问题描述
有没有办法使用 adb 查找设备的蓝牙 MAC 地址.我试过用 logcat 找到它.它现在可以工作,但 logcat 最终会被覆盖.所以我想知道是否有一种方法可以让我随时通过 adb 访问蓝牙 MAC 地址.我也试过netcfg",但即使打开蓝牙我也看不到那里的蓝牙界面.
Is there a way to look for a device's bluetooth MAC address using adb. I've tried using logcat to find it. It works right now, but logcat will get overwritten eventually. So I was wondering if there is a way where I can access the bluetooth MAC address anytime I want through adb. I've also tried 'netcfg' but I can't see the bluetooth interface there even when bluetooth is on.
我想通过 adb 来做到这一点.
I want to do this through adb.
谢谢
推荐答案
adb shell settings get secure bluetooth_address
或
adb shell service call bluetooth_manager 10
for Android 4.4.4
adb shell service call bluetooth_manager 10
for Android 4.4.4
adb shell service call bluetooth_manager 12
for Android 5.0+
adb shell service call bluetooth_manager 12
for Android 5.0+
这篇关于使用 adb 查找设备蓝牙 MAC 地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!