Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I've managed to setup the chroot but I'm unsure how to get the chroot to recognise usb devices. I'll be doing so work with microcontrollers hence I neeed to to recognise my usb based programmer.

For starters how do I populate the dev directory with the host dev directory(android)?

Is it then just a matter of getting the right kernel modules loaded?

I'm running prime1.5 firmware on the asus transformer

share|improve this question
add comment

1 Answer

To populate /dev, use a bind mount (rbind=recursive bind, to catch /dev/pts):

outside# mount --rbind /dev /path/to/chroot/dev

You may also want to bind other things, like /home and /tmp (to make sharing files easier). Just remember to unmount them before rm -Rf'ing your chroot!

You can put bind mounts in fstab. I believe that'd look something like this:

/dev   /chroot/dev   none   rbind   0   0

You may need to set up udev to set proper permissions on your USB device. For example, here are the udev rules I use for my phone:

$ cat /etc/udev/rules.d/local-android.rules
ACTION!="add", GOTO="local-android_rules_end"
SUBSYSTEM=="usb_device", GOTO="local-android_rules_real"
SUBSYSTEM=="usb", GOTO="local-android_rules_real"
GOTO="local-android_rules_end"

LABEL="local-android_rules_real"

# Mot Droid X
ATTR{idVendor}=="22b8", ATTR{idProduct}=="428c", MODE="660", GROUP="plugdev"

LABEL="local-android_rules_end"
share|improve this answer
    
Here's a more complete guide on adding Android devices to udev, for most devices. –  Logos Aug 21 '12 at 17:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.