Red Hat Bugzilla – Bug 468532
Please add udev/pam rules for T-Mobile G1 (Android) USB debugging
Last modified: 2009-12-18 01:38:55 EST
Out of the box, the T-Mobile G1 works as a mass storage device when plugged into a Fedora system, but doesn't work with USB debugging. The problem is that the Android debugging bridge adb scans /dev/bus/usb for an appropriate device, but doesn't scan /proc/bus/usb. When the phone is plugged in, a hotplug entry is created in /proc/bus/usb, but a device node is not created in /proc/bus/usb by udev. Also, when a udev rule is set up to create this device node, the PAM permissions must be set up correctly to allow the console user read/write access.
The following rule needs to be set up in /etc/udev/rules.d/50-android.rules :
The following lines need to be added to /etc/security/console.perms.d/50-default.perms :
# under "device classes":
# under "permission definitions":
<console> 0600 <android> 0600 root
With these changes, the device correctly sets up the device node /dev/bus/usb/###/###, then creates the symlink /dev/android_adb, then gives the console user rw perms on the device node by matching and following the symlink.
/dev/android_adb doesn't seem to be needed by the debugger to run, but it is referenced in the adb source in a couple of places, and makes the pam rule matching work. /dev/android appears to be an older version of /dev/android_adb based on the source, so I used /dev/android* in the pam rule in case future android links are added with this prefix.
this should be solved with ConsoleKit / HAL rules. pam_console is obsolete
Can you send the udev rule up to Kay upstream please. I agree that we shouldn't be using PAM for this at all.
There should be no need for a symlink, only for the permission.
The software can find the usb device itsself. What do you do with multiple phones? enumeration of the symlinks?
Also the software package which uses /dev/android_adb can also supply the rules file.
Done, though I'm not sure if the following is the right place for the bug, the email addr on the udev homepage on kernel.org doesn't exist anymore: http://bugzilla.kernel.org/show_bug.cgi?id=11874 (Not sure how to get hold of Kay either...)
Yes, it seems to work without the symlink -- there is code in adb to run the usb init routine if the link exists (otherwise it tries to init the socket transport for the Android emulator), but there must be other code somewhere that runs the usb init if it detects the device node.
The Android development kit is not currently distributed as a package, otherwise that would be a good place for the rules file -- so it would most beneficially be upstream in udev.
Switching the component to ConsoleKit -- is there enough info here (about vendor/product code) for the ConsoleKit devs to create the correct rule to give the console user rw access to the created device node, or do you need more info?
email@example.com is the development mailing list
adding Kay to CC :-)
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.
More information and reason for this action is here:
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '10'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 10's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 10 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.