Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 9 down vote accepted

The following terminal command should enable Bluetooth via adb shell or Terminal Emulator app:

am start -a android.bluetooth.adapter.action.REQUEST_ENABLE

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:

svc wifi enable

will turn it on, and

svc wifi disable

will turn it off.

share|improve this answer
Thanks for the answer. I'll try the same. Could you also list the same for WiFi? – Clyde Lobo Apr 5 '12 at 9:43
Edited my answer with the WiFi info. I haven't found a way to disable BT via a terminal command though :( – Chahk Apr 5 '12 at 12:42

in android.bluetooth.IBluetoothManager, there some parameters

TRANSACTION_registerAdapter = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); TRANSACTION_unregisterAdapter = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); TRANSACTION_registerStateChangeCallback = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); TRANSACTION_unregisterStateChangeCallback = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); TRANSACTION_isEnabled = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4); TRANSACTION_enable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5); TRANSACTION_enableNoAutoConnect = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6); TRANSACTION_disable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 7);
TRANSACTION_getAddress = (android.os.IBinder.FIRST_CALL_TRANSACTION + 8); TRANSACTION_getName = (android.os.IBinder.FIRST_CALL_TRANSACTION + 9);


SO, with rooted device, if you want to turn off bluetooth in adb shell super user mode (su)

service call bluetooth_manager 8

if you want to turn on bluetooth again

service call bluetooth_manager 6
share|improve this answer
device I use is HTC One with android 4.4.2 – Jamy Apr 17 '14 at 3:54
Confirm, that this is working on Android 4.2.2 – pevik Feb 4 '15 at 11:29
Service bluetooth_manager does not exist on Android 4.1.2 – davide Aug 16 '15 at 10:30

Enable bluetooth:
service call bluetooth 3

Disable bluetooth:
service call bluetooth 4

share|improve this answer
Negative voter: could you help identifying the issue with this answer (after edit)? These worked in my rooted phone after su - so technically nothing wrong AFAIK. – Narayanan Aug 2 '13 at 11:38
Enable bluetooth: service call bluetooth 3 Disable bluetooth: service call bluetooth 5 is working on my HTC Desire X – Anvesh Yalamarthy Aug 25 '14 at 11:53
service call bluetooth 5 works in my Android 4.2.1 to disable bluetooth. – Firelord Jul 2 '15 at 17:53
On a "Galaxy Fame GT-6810P", the correct numbers are 3 and 5. – davide Aug 16 '15 at 10:32

This works from a shell:

am start -a android.bluetooth.adapter.action.REQUEST_ENABLE & input keyevent 20 & adb shell input keyevent 21 & adb shell input keyevent 23

Basically it causes the dialogue to appear and then sends keystrokes to accept the command

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.