I have a rooted Galaxy S 2 (I9100) and was wondering if I can restart the Bluetooth on my phone via the terminal client on my phone.
The following terminal command should enable Bluetooth via adb shell or Terminal Emulator app:
On most versions of Android, this command will present a pop-up window to the user asking to confirm request to enable BT. I believe this was done for security purposes whenever an app that is not system is toggling BT.
I haven't found a way to disable BT via a shell command unfortunately.
With WiFi it's a lot easier, and does not prompt user for permission:
will turn it on, and
will turn it off.
in android.bluetooth.IBluetoothManager, there some parameters
SO, with rooted device, if you want to turn off bluetooth in adb shell super user mode (su)
if you want to turn on bluetooth again