我正在尝试使用命令行在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 **
但它不会与设备无关.
我目前正在考虑自动测试Android手机和其他设备之间的蓝牙连接.
我发现了许多有用的ADB命令,例如
adb shell service call bluetooth_manager 6adb shell am start -a android.bluetooth.adapter.action.REQUEST_ENABLEadb shell am start -a android.bluetooth.adapter.action.REQUEST_DISCOVERABLEadb shell service call bluetooth_manager 8但无法找到以下操作的任何内容:
这些存在吗?或者我是否需要编写可以执行这些操作的包装Android应用程序?