android-x86.github.io icon indicating copy to clipboard operation
android-x86.github.io copied to clipboard

Bluetooth keeps stopping

Open dave-fr opened this issue 5 years ago • 1 comments

Updated Android-x80 6.0 to 8.1 on Viewsonic VPad 10 and now I keep getting a message 'Bluetooth keeps stopping' constantly. How do I fix?

dave-fr avatar May 21 '19 06:05 dave-fr

I have had issues in Android X-86 and BlissOS. This is what I have found to fix my specific issue after toying with different commands. You may be able to automate this process on boot following a process similar to https://android.stackexchange.com/a/6560/342111

Also note that I am on Mac and had to get a bluetooth USB adapter since MacOS does not allow you to use the built in bluetooth.

I also had to force Mac to not auto-capture my bluetooth USB dongle, but to let VirtualBox take it over. The command was sudo nvram bluetoothHostControllerSwitchBehavior=never

As to why this is needed, I don't know, but hopefully Bluetooth is more stable in future versions of Android X-86.

Command Chain (w/Sleep delays):

hciconfig && gsudo hciconfig hci0 down && sleep 10 && gsudo pm disable com.android.bluetooth && sleep 10 && gsudo pm enable com.android.bluetooth && sleep 10 && gsudo service call bluetooth_manager 6 && sleep 10 && gsudo hciconfig hci0 up

Commands to Enter and Leave Terminal:

Enter terminal: Alt + F1

Leave terminal: Alt + F7

Ordered Steps Explanation:

  • hciconfig
    • Shows the status of any bluetooth devices
  • gsudo hciconfig hci0 down
    • Puts the bluetooth receiver into an “off” mode.
    • Change hci0 to the ID of your bluetooth receiver if different
  • gsudo pm disable com.android.bluetooth
    • Stops the bluetooth Android package
  • gsudo pm enable com.android.bluetooth
    • Starts the bluetooth Android package
  • gsudo service call bluetooth_manager 6
    • Terminal call to enable bluetooth on the device. It is possible this could be done through the Android UI as well.
  • gsudo hciconfig hci0 up
    • Tells the bluetooth receiver to turn “on” and start transmissions as needed

Extra Commands:

  • gsudo service call bluetooth_manager 9
    • Disables bluetooth setting through terminal. This may be done manually as well, and this command might not be needed at all.

Notes:

  • gsudo is what the sudo command is in BlissOS. It may be the same in Android X-86 as well. gsudo may not be needed in the commands above, but I used it for good measure.

Jikodis avatar Dec 07 '21 01:12 Jikodis