android 蓝牙开关设置

frameworks/base/packages/SettingsProvider/res/values/defaults.xml

false

将 def_bluetooth_on 的值设为false(系统默认开启值)

adb动态设置
关闭:adb shell settings put global bluetooth_on 0
打开:adb shell settings put global bluetooth_on 1
查询:adb shell settings get global bluetooth_on
打开蓝牙
am start -a android.bluetooth.adapter.action.REQUEST_ENABLE
查看蓝牙状态
service list | grep bluetooth
dumpsys package com.android.bluetooth | grep “version”
dumpsys bluetooth_manager
logcat -s BluetoothManager

你可能感兴趣的:(test,android)