04. Bluetooth config file.
# cat /data/misc/bluetooth/bt_config.xml
03. Get Bluetooth MAC.
# adb shell settings get secure bluetooth_address
or # settings get secure bluetooth_address
or # service call bluetooth_manager 10 (10 for Android 4, and 12 for Android 5)
02. Get Bluetooth connection via ADB.
# adb shell am start -a android.bluetooth.adapter.action.STATE_CHANGED
01- Turn ON/OFF Bluetooth via ADB.
Turn ON Bluetooth way 1.
step-1
# am start -a android.bluetooth.adapter.action.REQUEST_ENABLE
(but it required user to accept a dialog)
step-2 (dialog pop-up)
# input keyevent 22 & input keyevent 22
step-3
# input keyevent 23
Turn ON Bluetooth way 2.
# service call bluetooth_manager 6
(and no any accept dialog)
Turn OFF Bluetooth.
# service call bluetooth_manager 8
沒有留言:
張貼留言