9

I have seen this problem on a Nexus 4 and Nexus 5. Bluetooth is switched on unexpectedly. It can be turned off, but will come back a minute or so later.

Googling around, it seems that this could be due to a misbehaving app, but there doesn't seem to be a good solution for finding out which app.

Is there a way to find out what is responsible for reactivating Bluetooth all the time?


If it is of any use, I captured some of the adb output after disabling Bluetooth.

When disabling:

D/BluetoothManagerService(  578): disable(): mBluetooth = android.bluetooth.IBluetooth$Stub$Proxy@42d29fa0 mBinding = false
D/BluetoothManagerService(  578): Message: 2
D/BluetoothManagerService(  578): Sending off request.
D/BluetoothAdapterState(23958): CURRENT_STATE=ON, MESSAGE = USER_TURN_OFF
D/BluetoothAdapterProperties(23958): Setting state to 13
I/BluetoothAdapterState(23958): Bluetooth adapter state changed: 12-> 13
D/BluetoothAdapterService(23958): Broadcasting updateAdapterState() to 1 receivers.
D/BluetoothAdapterProperties(23958): onBluetoothDisable()
I/BluetoothAdapterState(23958): Entering PendingCommandState State: isTurningOn()=false, isTurningOff()=true
D/BluetoothManagerService(  578): Message: 60
D/BluetoothManagerService(  578): MESSAGE_BLUETOOTH_STATE_CHANGE: prevState = 12, newState=13
D/BluetoothManagerService(  578): Bluetooth State Change Intent: 12 -> 13
D/BluetoothMapService(23958): onReceive
D/BluetoothMapService(23958): STATE_TURNING_OFF
D/BluetoothMapService(23958): MAP Service closeService in
I/BtOppRfcommListener(23958): stopping Accept Thread
I/CompanionService(13584): bluetoothStateChangeReceiver action = android.bluetooth.adapter.action.STATE_CHANGED
D/CachedBluetoothDevice(14368):  Clearing all connection state for dev:Bose SoundLink Wireless Mobile speaker
D/CachedBluetoothDevice(14368):  Clearing all connection state for dev:ANDY
D/CachedBluetoothDevice(14368):  Clearing all connection state for dev:obd2ecu
D/CachedBluetoothDevice(14368):  Clearing all connection state for dev:Glass 6014
D/CachedBluetoothDevice(14368):  Clearing all connection state for dev:P311
D/CachedBluetoothDevice(14368):  Clearing all connection state for dev:Logitech MX5000 Keyboard
W/ContextImpl(14368): Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1487 android.content.ContextWrapper.startService:494 android.content.ContextWrapper.startService:494 com.android.set
tings.bluetooth.DockEventReceiver.beginStartingService:134 com.android.settings.bluetooth.DockEventReceiver.onReceive:115
D/DockEventReceiver(14368): finishStartingService: stopping service
D/BluetoothPbap(14368): Proxy object disconnected
D/PbapServerProfile(14368): Bluetooth service disconnected
W/BluetoothAdapterState(23958): Timeout will setting scan mode..Continuing with disable...
D/BluetoothAdapterState(23958): CURRENT_STATE=PENDING, MESSAGE = BEGIN_DISABLE, isTurningOn=false, isTurningOff=true
E/bt-btif (23958): btif_disable_bluetooth : not yet enabled

Then, moments later:

D/BluetoothAdapterState(23958): CURRENT_STATE=PENDING, MESSAGE = DISABLE_TIMEOUT, isTurningOn=false, isTurningOff=true
E/BluetoothAdapterState(23958): Error disabling Bluetooth
D/BluetoothAdapterProperties(23958): Setting state to 12
I/BluetoothAdapterState(23958): Bluetooth adapter state changed: 13-> 12
D/BluetoothAdapterService(23958): Broadcasting updateAdapterState() to 1 receivers.
D/BluetoothManagerService(  578): Message: 60
D/BluetoothManagerService(  578): MESSAGE_BLUETOOTH_STATE_CHANGE: prevState = 13, newState=12
D/BluetoothManagerService(  578): Broadcasting onBluetoothStateChange(true) to 13 receivers.
D/BluetoothPan(  578): onBluetoothStateChange(on) call bindService
I/BluetoothAdapterState(23958): Entering On State
10
  • Quick question, I am presuming this is for "Stock Rom" for both Nexus devices? If so, could you run adb shell dumpsys meminfo.. It may as well be a package you installed on yourphones which could be the culprit. FYI - I performed the same tests on my Nexus 5 - rooted phone with stock ROM. and all is working for me.. however I find this log line interesting where the state change from 13 -> 10 when I stopped the Bluetooth service... D/BluetoothManagerService( 1683): Bluetooth State Change Intent: 13 -> 10
    – Rushnosh
    Commented Aug 11, 2014 at 0:01
  • @Rushnosh, yes this is stock Google Android on both devices. I'll do the memory dump later and add what I find from that to the question.
    – andypaxo
    Commented Aug 11, 2014 at 0:16
  • ok, also Andriod build version if at all possible?
    – Rushnosh
    Commented Aug 11, 2014 at 0:26
  • 1
    To answer a few questions, I have Android 4.4.4, build KTU84P. The Logitech keyboard is several kilometers away right now, so unless I've really underestimated the abilities of Bluetooth, that shouldn't be causing a problem. (The Nexus 5 has never seen the Logitech either). Also - thanks for your time so far... this is really appreciated!
    – andypaxo
    Commented Aug 11, 2014 at 3:39
  • 1
    Sorry about that, ran out of time last night. I restarted and now the problem has gone away! Which means we don't get an answer as to what was causing that. If / when the problem comes back, I will perform your test on the phone. Thanks for the guidance!
    – andypaxo
    Commented Aug 11, 2014 at 14:05

6 Answers 6

4

It was the Firechat app for me. It'll be one of the most recent apps you installed if the Bluetooth started turning on out if nowhere.

2
  • Suggest you post this as a comment rather than as an answer, since it may not be applicable in OPs case
    – beeshyams
    Commented May 16, 2016 at 9:10
  • 1
    Thanks! Did the job for me. Been looking for weeks of what was wrong! Commented Jun 8, 2016 at 5:44
3

I had the same symptom, and disabling "Bluetooth scanning" in location services resolved it:

https://stackoverflow.com/questions/34414216/using-bluetooth-scanning-for-location-accuracy-android-m

2
  • The question was posted on Aug 2014 when there was no Marshmallow yet, so I can't think if this would help solving the issue...
    – Andrew T.
    Commented Dec 24, 2015 at 1:26
  • I'm on Marshmallow currently and I'm still getting this issue.
    – edwoollard
    Commented Mar 17, 2016 at 10:20
3

You can find out what is activating bluetooth by going to Settings -> Connections -> Bluetooth -> "..." -> Bluetooth control history.

In my case it was the bike rental app for Paris "Velib" and sadly, there seems to be no way to stop it activating bluetooth via permissions settings.

My phone is a Samsung GS7 with Android 7.0.

1

I had the same problem. The app named Automatic that connects to a dongle that plugs into the OBD port of your car was to blame. I hate the app. I just use it occasionally to read check engine codes. Uninstalled Automatic and all is well. It's usually a misbehaving app that is the culprit.

0

I had the same problem. This worked for me. Settings ~Application~All~Bluetooth. The disable button was not highlighted so I just cleared all data. I did the same for bluetooth share. Then I tried turn Bluetooth on an off several times to see if it would stay off and it did

0

I had the same problem and it turned out to be an app containing incorrect codes that kept searching for Bluetooth devices in background even if the app was closed (it was a BT Messaging app).

Not the answer you're looking for? Browse other questions tagged .