I am trying to enable disable bluetooth on android device using command line.
I can enable it using
adb shell am start -a android.bluetooth.adapter.ac
As awm129 has pointed out, solutions using service call aren't device-independent. While I am unable to completely eliminate the use of service call, the following solution should be more device-independent:
To disable:
pm disable com.android.bluetooth
To enable:
pm enable com.android.bluetooth
service call bluetooth_manager 6
I hope someone will eventually find a service call-free solution.