Android 4.4服务蓝牙不存在

Android 4.4服务蓝牙不存在,android,shell,service,bluetooth,terminal,Android,Shell,Service,Bluetooth,Terminal,我尝试以root用户身份使用以下命令从终端切换蓝牙: 'service call bluetooth 3' for enable 'service call bluetooth 4' for disable 但是我得到了错误 服务:服务蓝牙不存在 我在服务器列表中搜索了bluetooth,只有bluetooth\u manager 我有一个根Nexus5(安卓4.4) 是否有其他方法通过终端切换蓝牙 可能是“am start com.android.settings…” 我想做的是同时启用W

我尝试以root用户身份使用以下命令从终端切换蓝牙:

'service call bluetooth 3' for enable

'service call bluetooth 4' for disable
但是我得到了错误
服务:服务蓝牙不存在

我在服务器列表中搜索了bluetooth,只有
bluetooth\u manager

我有一个根Nexus5(安卓4.4)

是否有其他方法通过终端切换蓝牙

可能是“am start com.android.settings…”

我想做的是同时启用Wifi和禁用蓝牙,然后反过来。 对于Wifi,svc Wifi启用/禁用作为根用户使用服务呼叫没有问题:

adb外壳su-c服务呼叫蓝牙\u管理器6
打开蓝牙

adb外壳su-c服务呼叫蓝牙\u管理器8
关闭蓝牙

中的
bluetooth\u管理器的详细信息

或使用keyevents作为非根用户:

adb shell am start-a android.settings.BLUETOOTH\u设置

adb外壳输入键事件19

adb shell input keyevent 23

使用Python修复了它。(切换BluetoothState())