How do I stop linux from trying to mount android phone as usb storage?

Posted by user1160711 on Super User See other posts from Super User or by user1160711
Published on 2012-06-23T14:37:38Z Indexed on 2012/06/23 15:18 UTC
Read the original article Hit count: 229

Filed under:
|
|

When I plug in my Motorola Triumph to my fedora 17 linux box USB port, I get an endless series of errors on the linux box as it desperately attempts to mount the phone as a USB drive. Stuff like this:

Jun 23 10:26:00 zooty kernel: [528926.714884] end_request: critical target error, dev sdg, sector 4
Jun 23 10:26:00 zooty kernel: [528926.715865] sd 16:0:0:1: [sdg]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jun 23 10:26:00 zooty kernel: [528926.715869] sd 16:0:0:1: [sdg]  Sense Key : Illegal Request [current] 
Jun 23 10:26:00 zooty kernel: [528926.715872] sd 16:0:0:1: [sdg]  Add. Sense: Invalid field in cdb
Jun 23 10:26:00 zooty kernel: [528926.715876] sd 16:0:0:1: [sdg] CDB: Read(10): 28 20 00 00 00 00 00 00 04 00

If I go ahead and tell the phone to allow linux to mount the USB storage, the messages stop, and I get a mounted drive, but if all I want to do is use the debug bridge, my log on linux will continue to fill with this junk. Is there some udev magic I can do to make the system ignore this particular device as far as usb storage goes?

I just noticed that if I tell the phone to enable USB storage, let linux recognize the new disk, then tell the phone to disable USB storage again, I get one additional log message about capacity changing to zero, but the endless spew of messages stops, so I guess one work around is to enable and disable USB right away.

© Super User or respective owner

Related posts about android

Related posts about linux