Re: udev rule needed for Android USB debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

Upon further investigation, you are absolutely right.  The rule does
nothing -- at some point my system simply started creating the device
node without the rule, so I never noticed that the rule wasn't serving
a purpose.  I don't know why my system wasn't originally creating the
device node, but typing "ls -lR /proc/bus/usb /dev/bus/usb" and
comparing the two clearly showed the required node missing in
/dev/bus/usb relative to /proc/bus/usb when the device was plugged in,
so I started experimenting with creating udev rules.  A reboot (or
something else) must have fixed the original problem.

At this point this is purely a permissions issue, so I will file a bug
against ConsoleKit (and will let you know if I can reliably duplicate
the "dev node missing" problem again -- although I can't seem to right
now).

Much appreciation for your help!
Luke


On Wed, Oct 29, 2008 at 1:49 AM, Greg KH <greg@xxxxxxxxx> wrote:
> On Wed, Oct 29, 2008 at 12:19:39AM -0400, Luke Hutchison wrote:
>> Debugging the new T-Mobile G1 Android phone over a USB transport
>> doesn't work out of the box on Linux, because udev does not
>> automatically create a device node for the phone in
>> /dev/bus/usb/###/### when the phone is plugged in.  Interestingly, the
>> correct entry is created in /proc/bus/usb by hotplug, and the phone
>> works fine as a mass storage device, but as adb (the Android debugger)
>> scans through /dev/bus/usb for Android devices, it does not detect the
>> phone by default.
>>
>> Adding the following rule causes the device node to be created:
>>
>> SUBSYSTEM=="usb",ATTR{idVendor}=="0bb4",ATTR{idProduct}=="0c02"
>>
>> Why would this rule need to be added for the device node to be
>> created?  Shouldn't udev just create the device node even if it
>> doesn't recognize the device?
>
> Yes, it should, I don't understand what this rule does.  It only
> contains rules to match a device, and then does nothing with it.
>
>> The above rule doesn't give the console user the needed r/w perms on
>> the device, this will still need to be handled by ConsoleKit or
>> similar.
>
> Exactly.
>
> What does running 'udevadm monitor' and then plugging the device in
> show?
>
>> Somehow generically fixing this upstream would be very helpful as
>> (based on various G1 dev forums) the exact udev rule needed to get
>> this working seems to vary across distributions.
>
> No new rule should be needed at all to create the usbfs device node for
> it, the "default" ones should work just fine.
>
> thanks,
>
> greg k-h
>
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux