Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No /dev/bus/usb virtualization on Mac OS Sierra #8

Closed
felclef opened this issue Oct 4, 2016 · 14 comments

Comments

@felclef
Copy link

commented Oct 4, 2016

Anyone else with the same problem?

Without the device's virtual representation, how can I forward it to docker??

Thanks!

@sorccu

This comment has been minimized.

Copy link
Owner

commented Oct 4, 2016

Unfortunately Docker on Mac does not support USB, since the underlying xhyve doesn't support it. The old boot2docker may have worked by tweaking VM settings.

I think the easiest (perhaps only?) way to get it to work would be to use a Linux VM and run docker there instead.

@tobiastom

This comment has been minimized.

Copy link

commented Mar 16, 2017

When you are talking about xhyve, are you talking about Hypervisor.Framework? Veertu uses this as well and seems to support USB. Maybe things did change in the meantime?

Having this working on Mac OS Sierra would be very very great because I don't have to install Java into the host system.

@sorccu

This comment has been minimized.

Copy link
Owner

commented Mar 16, 2017

@tobiastom

This comment has been minimized.

Copy link

commented Mar 16, 2017

I'm very glad to help here, but unfortunately I have no idea how to confirm it.

A linux inside a Virtual machine can see the device with adb device. docker-adb can't on the same host system.

Any recommendations on how to debug it?

@sorccu

This comment has been minimized.

Copy link
Owner

commented Mar 16, 2017

@tobiastom

This comment has been minimized.

Copy link

commented Mar 16, 2017

Stopping the machine, enabling USB manually in the VirtualBox interface (the machine is based on VirtualBox), and starting it again makes the device appear in lsusb when plugged in:

$ docker-compose run adbd lsusb -v
Bus 001 Device 002: ID 18d1:4ee2
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0003

Removing the device will result in this result:

$ docker-compose run adbd lsusb -v
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0003

Unfortunately adb devices is not able to see it:

$ docker-compose run adbd adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
@sorccu

This comment has been minimized.

Copy link
Owner

commented Mar 16, 2017

@swaroopbalan

This comment has been minimized.

Copy link

commented Jul 21, 2017

the adb devices is not working in 2nd containers . only works in one container
ALl devices are taken by the first container

@sorccu

This comment has been minimized.

Copy link
Owner

commented Jul 21, 2017

@swaroopbalan

This comment has been minimized.

Copy link

commented Jul 21, 2017

thanks for the response ..
Now the issue is i have 2 devices connected and i am using below command to docker ,The device connected would be disconnected during flashing so that i have used below command to always show .
Now issue with this is that i am not able to see any adb device in another container .
So the issue is the device usb port changes when it is disconnected so i am doing this . Hope i am clear in telling the problem i am facing

docker run -it -h basispost101l --name 'basispost101l' -d --privileged -v /dev/bus/usb:/dev/bus/usb --device=/dev/ttyACM0:/dev/ttyRelayCard -p 5001:22 testbench /bin/bash

@swaroopbalan

This comment has been minimized.

Copy link

commented Jul 21, 2017

I want adb to show all devices in all containers
i am not sure if its possible .please let me know

@sorccu

This comment has been minimized.

Copy link
Owner

commented Nov 6, 2017

Closing, since this is more of a Docker for Mac issue.

@sorccu sorccu closed this Nov 6, 2017

@Febin-kg

This comment has been minimized.

Copy link

commented Aug 27, 2018

As mentioned above, using Linux VM seems to the only way.
This post was of help

@sj542484

This comment has been minimized.

Copy link

commented May 22, 2019

What is the situation now? I have the same problem,I don't know how to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.