5

I'm trying to enable Bluetooth on my Android VM using the following

  • Ubuntu 18.04.1
  • Virtual Box 6.0.2 r128162 with Extension Pack 6.0.2 r128162
  • Android-x86 8.1rc2
  • Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

I've added my user to the vboxusers group as mentioned here which allowed me to see the Bluetooth dongle in the VMs list of USB devices. I added a filter and tried booting the device with and without the dongle connected and neither allowed me to toggle bluetooth on.

Terminal Emulator on Android

Running hcitool dev Devices: return no devices.

hciconfig -a
enter image description here

Running hciconfig hci0 up enter image description here

Can't init device hci0: Operation not permitted(1)

Any help appreciated.

asenec4
  • 367
  • 3
  • 16

1 Answers1

1

You may enable Bluetooth only if you have root access. Use su before running hciconfig hci0 up:

No root access:

enter image description here

Wit root access:

enter image description here

JohnyCash
  • 399
  • 1
  • 4
  • 9
  • That's indeed the case. That crappy `dmesg` screenshot just confused me... however, it doesn't really answer the question of how one could expose it to Android x86 on VirtualBox. – Martin Zeitler Jan 20 '21 at 23:03
  • You're right, I can run BT commands like `hcitools lescan` in shell but BT is not really exposed to other apps. – JohnyCash Jan 21 '21 at 04:10
  • In recent versions of the Android emulator, there's even BT ...but it may be fake. And on Linux one often has to load firmware to get it working. I mean, even if the host OS can handle it (as the screenshot suggests), the Android OS still would require the firmware added. Just tried with a BT dongle and a hardware device ...it isn't operational, even if it detects it an USB device. – Martin Zeitler Jan 21 '21 at 06:43