Open vafagh opened 5 years ago
I have experienced exactly the same. For what it's worth, I'm using KVM on an Ubuntu 16.04 host. Seems to work perfectly in live mode with audio. Bluetooth doesn't work in install mode with same hciconfig output as Vafa describes.
Are there any potential fixes?
Similar issue here. Been beating my head against the wall trying to find a solution. This was the first thing I found that describes the issue even close to what I'm seeing.
All looks fine with hciconfig & hcitool, but the GUI doesn't seem able to turn it on, it only shows the switch in the off position when you go to that setting. Oh you can change the position of the toggle switch to "on", but it will remain gray. Going out & coming back in shows it in the left or disabled state.
I can bring the device "up", but when I scan it sees no remote devices and there are at least 2 very close by. Same with hcitool lescan
In my case I'm running under a VirtualBox VM, but USB is being seen by the VM so I know there's not an issue seeing the device, since hciconfig & hcitool sees it and can bring it "up" and hciconfig -a info changes appropriately.
Same here with android-x86-9.0-r2.iso in VirtualBox. The Bluetooth works fine in LiveCD mode but not after installation on hard drive. In installed mode I can have hciconfig and hcitool working from terminal only after 'su', not in user mode
Same for me with android-x86-9.0-r2.iso and android-x86_64-9.0-r2.iso with installed versions. Also, I was able to get the live version to fail if I enable/disabled bluetooth and capture/uncapture bluetooth dongles enough.
On Ubuntu 20.04 with internal intel bluetooth. Interface can be brought up with hciconfig and lescan performed with hcitool. GUI doesn't work, keep getting "Bluetooth keeps stopping" warning from Android.
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
gsudo hciconfig hci0 down
gsudo pm disable com.android.bluetooth
gsudo pm enable com.android.bluetooth
gsudo service call bluetooth_manager 6
gsudo hciconfig hci0 up
Extra Commands:
gsudo service call bluetooth_manager 9
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 Your comments are very useful. I recently installed the Bliss OS 14.03 with GMS support. VPN, WIFI, Sound output via HDMI all works fine, except the blue tooth.
I followed your step one by one, when execute: "pm disable com.android.bluetooth" found there no com.android.bluetooth package in my system. Do you think this is a problem?
@cetsupport Do you get a bluetooth stopped responding message? You should be able to tap the dialog for more info to see what the package/app is that handles bluetooth. You may be able to find the package name then after finding the app in the Play Store and checking the URL of the page.
You can also check this answer on Stack Overflow for a way to get a list of all package names. There is even a pm
command that handles that it appears.
You could run something like pm list packages -f bluetooth
to perhaps see packages related to bluetooth. If you don't see anything, you might just run pm list packages -f
without the search filter and scan and see what you find.
A final alternative that may work is searching the Play Store for "package name" and find an app that lists out package names for you.
Hope this is helpful. Definitely great once bluetooth starts working. I am successfully using a FitBit with Android-x86 in a VM on VirtualBox. I admittedly have to run the terminal commands from time to time, but it is worth it to have the functionality of my FitBit. My next step is creating an executable bash file that will run the commands automatically. I just have not gotten around to it since every time I create a file, it is not there on reboot.
Kernel: 4.19.15-android-x86_64-g321974c6234b Android 8.1.0 Device: Notebook iView Ultima 13”
Bluetooth working fine with live version of android(not installed)
With installed version of same android, Bluetooth not functioning on UI, I turn it on, the Off status became a gray On, the toggle button stay disabled and nothing else happens (like device list or mac address, ….) I tried terminal, everything looks good but not able to connect my sound system. There are some error after executing those commands.