Open projectbtle opened 3 years ago
Attached logcat
and dmesg
outputs for Nougat (where Bluetooth works) and Pie (where Bluetooth doesn't work).
logcat_nougat.txt dmesg_nougat.txt logcat_pie.txt dmesg_pie.txt
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.Well, I'll be darned! Thanks Jikodis for the above post. I really need to have BT working inside my Android x86 Guest and for some reason, this does the trick. I never would have figured this out myself. I had managed to find the hciconfig -a and hciconfig chi0 up myself somehow and I was able to run hcitool scan and lescan and see results. So I thought I had it made. But that was not sufficient. I now have Tasker running this command line (with root) at boot:
_hciconfig hci0 down; sleep 5;pm disable com.android.bluetooth;sleep 5;pm enable com.android.bluetooth;sleep 5;service call bluetoothmanager 6;sleep 5;hciconfig hci0 up
Thanks a lot Jikodis, bluetooth worked successfully on my android x86 7.0-R5!
Firstly, thanks for this great project. Very useful for researchers.
I'm trying to test Bluetooth on Android Pie, but am unable to get it to work.
Environment:
Problem:
Troubleshooting:
hcitool lescan
works (i.e., shows advertising devices in the vicinity), so it can't be a problem with the CSR adapter.logcat
showscouldn't write 1002 to /config/sdcardfs/com.android.bluetooth/appid
, but it says the same (with different appids) for all the apps that were on /config/sdcardfs in older Android versions. It looks like that folder doesn't have app-specific sub-folders on Android v9.When we try to turn on Bluetooth within Settings,
logcat
shows:The same setup with Android x86 Nougat (android-x86-7.1-r4) works.