Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

USB access for Android development (aka adb) #377

Closed
bryanlarsen opened this issue Jun 19, 2015 · 1 comment
Closed

USB access for Android development (aka adb) #377

bryanlarsen opened this issue Jun 19, 2015 · 1 comment

Comments

@bryanlarsen
Copy link

Here's how I got USB access working. (14.04 host and container):

sudo mkdir /dev/bus in the container

vagrant halt

add to Vagrantfile:

 config.vm.provider "lxc" do |lxc, override|
   lxc.customize 'cgroup.devices.allow', 'c 189:* rwm'
   lxc.customize 'mount.entry', '/dev/bus dev/bus none bind,optional 0 0'
 end
@ccope
Copy link
Contributor

ccope commented Jun 20, 2015

You should be able to just use config.vm.synced_folder('/dev/bus', '/dev/bus'). The default mount options for synced folders with LXC are bind,create=dir, which will auto-create the target directory in the container. I don't think you need the optional option, since I think that /dev/bus always exists on the host (that option just makes the container startup continue if the mount can't be created). The vagrant-lxc driver will also helpfully strip the leading / from the target folder. If you need to pass any other options, you can pass your own set of mount options as an array of strings as a third argument to synced_folder.

@ccope ccope closed this as completed Jun 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants