google / google/bumble

Android Emulator and Virtual HCI socket connection issue

Open
#662 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
555
Forks
138
Avg merge
3d 15h
Merged PRs (30d)
9

Description

Hi,

I am trying to connect android emulator to Bluetooth controller created using btvirt (https://manpages.debian.org/unstable/bluez-test-tools/btvirt.1.en.html).

OS: Ubuntu
Android Emulator: v34
Steps:
1. I created a virtual Bluetooth controllers using command `sudo btvirt -d -l3`. It has working virtual BLE devices which communicates with each other

![Image](https://github.com/user-attachments/assets/d846ba33-c8ed-490a-a7fd-1017b1cbe900)

2. I am trying to connect android emulator to that virtual environment over hci using bumble hci bridge
`sudo capsh --caps="cap_net_admin+eip cap_setpcap,cap_setuid,cap_setgid+ep" --keep=1 --user=$USER --addamb=cap_net_admin -- -c "$(which bumble-hci-bridge) android-netsim:_:8880,mode=controller hci-socket:2"`
`emulator -avd Android1 -accel auto -gpu auto -packet-streamer-endpoint localhost:8080 -no-snapshot-load`

However, the android emulator shows missing Bluetooth adaptor and I am not able to turn it on in emulator (Note: The Android app works with a physical Bluetooth dongle, so the issue lies with the virtual dongles created using btvirt.)

Do you know what might be the issue?

![Image](https://github.com/user-attachments/assets/9f7a9425-9f4f-4d8d-ad2f-f560e2dc90be)
![Image](https://github.com/user-attachments/assets/dcb1cb5d-610b-4536-b2f0-3e10f9e3fa8b)

![Image](https://github.com/user-attachments/assets/ddc7e527-d601-4e6c-bde8-411b0aafa4d1)

![Image](https://github.com/user-attachments/assets/cd65779f-e02b-4ced-9711-a2d689d42e41)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.