Bug 468532 - Please add udev/pam rules for T-Mobile G1 (Android) USB debugging
Please add udev/pam rules for T-Mobile G1 (Android) USB debugging
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-25 13:06 EDT by Luke Hutchison
Modified: 2009-12-18 01:38 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-18 01:38:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Luke Hutchison 2008-10-25 13:06:42 EDT
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 :

SUBSYSTEM=="usb",ATTR{idVendor}=="0bb4",ATTR{idProduct}=="0c02",SYMLINK+="android_adb"

The following lines need to be added to /etc/security/console.perms.d/50-default.perms :

# under "device classes":
<android>=/dev/android*
# 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.
Comment 1 Harald Hoyer 2008-10-28 04:05:08 EDT
this should be solved with ConsoleKit / HAL rules. pam_console is obsolete
Comment 2 Richard Hughes 2008-10-28 04:31:07 EDT
Can you send the udev rule up to Kay upstream please. I agree that we shouldn't be using PAM for this at all.
Comment 3 Harald Hoyer 2008-10-28 09:40:56 EDT
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?
Comment 4 Harald Hoyer 2008-10-28 09:42:08 EDT
Also the software package which uses /dev/android_adb can also supply the rules file.
Comment 5 Luke Hutchison 2008-10-28 11:56:15 EDT
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?

Thanks!
Comment 6 Harald Hoyer 2008-10-28 12:04:56 EDT
linux-hotplug@vger.kernel.org is the development mailing list

adding Kay to CC :-)
Comment 7 Bug Zapper 2008-11-25 23:14:16 EST
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Fedora Admin XMLRPC Client 2009-04-08 13:00:41 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 9 Bug Zapper 2009-11-18 03:38:23 EST
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Bug Zapper 2009-12-18 01:38:55 EST
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.

Note You need to log in before you can comment on or make changes to this bug.