android enable通过命令行禁用蓝牙 [英] android enable disable bluetooth via command line
本文介绍了android enable通过命令行禁用蓝牙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用命令行在android设备上启用禁用蓝牙。
I am trying to enable disable bluetooth on android device using command line.
我可以使用
adb shell开始-一个android.bluetooth.adapter.action.REQUEST_ENABLE
但是它提示用户允许或拒绝。
But it prompts user to 'allow' or 'deny'.
我还看到可以先启动ble设置,例如
I also see there is option to launch ble settings first like
adb shell开始-a android.settings.BLUETOOTH_SETTINGS
然后启用禁用 adb shell输入keyevent ** $code>
但它不会与设备无关。
But it won't be device independent.
推荐答案
要启用:
adb shell service call bluetooth_manager 6
要禁用:
adb shell service call bluetooth_manager 8
这篇关于android enable通过命令行禁用蓝牙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文