Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 517744

Summary: dev-util/android-sdk-update-manager - 80-android.rules claims all Samsung devices as android devices, including printers
Product: Gentoo Linux Reporter: William Pettersson <william>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: UNCONFIRMED ---    
Severity: normal CC: dschridde+gentoobugs
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description William Pettersson 2014-07-22 06:21:04 UTC
android-sdk-update-manager has a udev rule (80-android.rules) which claims all USB devices from Samsung (idVendor=04e8) and sets the group owner to "android". However, some Samsung devices (including my USB printer, idDevice=326c) are not android devices.

With the device owned by root:android, my printer does not work (CUPS complains with permission denied). Once I re-set the group ownership of the device to "root:lp" my printer starts working again.

Reproducible: Always

Steps to Reproduce:
1. Have Samsung printer
2. Install android-sdk-update-manager and reboot
3. Try to print
Actual Results:  
CUPS does not print, instead waits for "printer to become available".

Expected Results:  
CUPS prints.

$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 046d:080f Logitech, Inc. Webcam C120
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 0556:0001 Asahi Kasei Microsystems Co., Ltd AK5370 I/F A/D Converter
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 046d:c01b Logitech, Inc. MX310 Optical Mouse
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c30f Logitech, Inc. Logicool HID-Compliant Keyboard (106 key)
Bus 003 Device 006: ID 04e8:326c Samsung Electronics Co., Ltd ML-2010P Mono Laser Printer
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Comment 1 Richard Freeman gentoo-dev 2014-07-22 13:00:04 UTC
Thanks for reporting. I'll be out for a few days but I will figure out what to do about this. 

I had this concern a few months ago when taking a closer look at the rules. These rules are actually recommended by upstream, and they do not provide device-specific ones. They don't cover all phone vendors either.
Comment 2 William Pettersson 2014-07-22 13:32:23 UTC
Yeah my current fix is actually to copy the 80-android.rules file into /etc/udev/rules.d and comment out the Samsung line (since I know I don't currently have a Samsung phone). Having pondered for a few hours now, I have the following two possible solutions:

1. Simply add a warning to the ebuild, warning people of potential problems.

2. Attempt to filter based on ID_USB_INTERFACES.  Printers should have an interface 0701??, so not triggering on those is easy. It'd be nice if phones had an interface class, but they don't. My android phone (HTC) shows up with interfaces 080650 (USB Mass Storage) and FF4201 (Vendor specific). Now these interfaces show up even if USB storage is "off" on my phone, and show up if USB debugging is switched on or off. I don't know of any Android phone which doesn't present itself as mass storage, so adding ENV{ID_USB_INTERFACES}=="*:080650:*" should work. However, I only have one android phone here to test with so more testing would be advised. Also, I feel this will only reduce the number of false positives, rather than stop them completely.