相关疑难解决方法(0)

android启用通过命令行禁用蓝牙

我正在尝试使用命令行在Android设备上启用禁用蓝牙.

我可以使用它

adb shell am start -a android.bluetooth.adapter.action.REQUEST_ENABLE

但它会提示用户"允许"或"拒绝".

我也看到有一个选项可以首先启动ble设置

adb shell am start -a android.settings.BLUETOOTH_SETTINGS

然后启用禁用 adb shell input keyevent **

但它不会与设备无关.

shell terminal command bluetooth adb

6
推荐指数
5
解决办法
2万
查看次数

ADB shell蓝牙命令

我目前正在考虑自动测试Android手机和其他设备之间的蓝牙连接.

我发现了许多有用的ADB命令,例如

  • adb shell service call bluetooth_manager 6
  • adb shell am start -a android.bluetooth.adapter.action.REQUEST_ENABLE
  • adb shell am start -a android.bluetooth.adapter.action.REQUEST_DISCOVERABLE
  • adb shell service call bluetooth_manager 8

但无法找到以下操作的任何内容:

  • 扫描可发现的蓝牙设备
  • 与给定的发现蓝牙设备配对
  • 忘记早先配对的蓝牙设备
  • 连接早期配对的蓝牙设备
  • 断开与早期配对的蓝牙设备的连接

这些存在吗?或者我是否需要编写可以执行这些操作的包装Android应用程序?

shell android bluetooth adb

6
推荐指数
0
解决办法
7746
查看次数

标签 统计

adb ×2

bluetooth ×2

shell ×2

android ×1

command ×1

terminal ×1