Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Sprint recently pushed and OTA update to my Samsung SPH-M580 Replenish. I accepted it gratefully, hoping it would cure some of the annoying bugs/features of Android v2.2.2 (FroYo). And it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Location
    near Berea, Kentucky (in a tipi)
    Posts
    47

    Android mass storage broken on Linux


    Sprint recently pushed and OTA update to my Samsung SPH-M580 Replenish. I accepted it gratefully, hoping it would cure some of the annoying bugs/features of Android v2.2.2 (FroYo). And it has.
    I was bummed to discover, however, that mass storage (mounting the 'droid's SDcard via USB) is broken. Googleing indicated that this is a know Android 2.3.6 (Gingerbread) bug. Talking to Sprint got me the same (the offered to downgrade my phone to FroYo...)

    More study has revealed that although openSUSE 12.1, which I am running on my laptop cannot mount the SDcard, BackTrack (kernel 2.6.30.9) can, as can CentOS 5.3 Live, and openSUSE 11.3 KDE Live, as well as an old version of DamnSmallLinux (2.4 kernel!) BohdiLinux 1.2.0 cannot.

    What seems to be happening is that upon plugging in USB, Linux recognizes the device as mass storage, but cannot read it (since mass storage mode has not yet been activated by Android). No /dev/sdx gets created on the systems that can't mount the drive.
    If /dev/sdx does get created, the drive can be mounted manually, and works!

    On some (not all) of the failing systems, dmesg reports the device name (sdb, say).

    fdisk -l shows an incomplete partition table until Android sets up mass storage (makes sense). Of course on systems that don't create the device node, fdisk fails to see the disk at all.

    I'm not interested in downgrading either my phone or openSUSE, anyone have an idea how to work around this?

    Thanks!

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    I had a similar problem.
    http://www.linuxforums.org/forum/mob...id-solved.html
    Turns out to be solved (on my end) by using the USB ports directly on the machine and not an USB hub. Hopefully there might be something in the link above that can set you in the right direction.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Just Joined!
    Join Date
    Nov 2006
    Location
    near Berea, Kentucky (in a tipi)
    Posts
    47
    Thanks, Mike! Those are some good pointers.

    If I understand what I read, EHCI may or may not have been and issue but it was mainly resolved by connecting to a port closer to the m/b. Is that right? I am not using and external hub. I can see that my Inspiron 6400 splits the USB to create the four on-board ports and I will experiment with different one. (All of the reported tests with different distro's were done using the same phone, cable and port, though.)

    The experience of seeing fdisk hang is not quite what I'm seeing, but similar in the better cases, that is, where it can be coaxed into working.

    BTW, my dmesg doesn't reveal anything like the kind of detail shown in that post:

    dmesg
    [ 2085.695133] usb 1-7: new high speed USB device number 4 using ehci_hcd
    [ 2085.811925] usb 1-7: New USB device found, idVendor=04e8, idProduct=f000
    [ 2085.811935] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 2085.811942] usb 1-7: Product: Samsung Android USB Device
    [ 2085.811947] usb 1-7: Manufacturer: SAMSUNG Electronics Co., Ltd.
    [ 2085.811953] usb 1-7: SerialNumber: M580fa8f4dc4
    [ 2085.813310] scsi2 : usb-storage 1-7:1.0

    Starting USB Mass Storage at the Android end doesn't add any additional lines to dmesg.

    fdisk -l just shows all my hard drive partitions.

    I'm biased here, of course, but I do believe a work-around can be found. And I sure like to find it!

  4. #4
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    I think removing EHCI from my kernel did help me because I never removed the HUB from my machine until a few weeks later when I got an external USB drive. I only plugged it into the Mobo when I had to re-enable EHCI for my ext drive.

    Your phone doesn't show up in the output of fdisk until you can turn on USB Storage from within Android.
    You can try looking at the kernel .config file and see if EHCI is enabled or not with a command similar to this.
    Code:
    cat /usr/src/linux/.config |grep -i EHCI
    CONFIG_USB_ARCH_HAS_EHCI=y
    CONFIG_USB_EHCI_HCD=y
    CONFIG_USB_EHCI_ROOT_HUB_TT=y
    CONFIG_USB_EHCI_TT_NEWSCHED=y
    Last edited by MikeTbob; 01-20-2012 at 12:33 AM. Reason: Typo
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  5. #5
    Just Joined!
    Join Date
    Nov 2006
    Location
    near Berea, Kentucky (in a tipi)
    Posts
    47
    Again, thanks, Mike for your replies. Very helpful.

    Sure enuf -- kernel 3.2.1-3-desktop has EHCI enabled, just as you suggest.

    If time (and disk space!) permit, I'll try building a custom kernel with EHCI turned off and see 1) if that let's me mount my 'droid and 2) what it breaks!

    Will post my results, if any.

    If EHCI does prove to be the problem is that a bug, or is it Gingerbread that's at fault, do you think (since FroYo worked, more or less)?

  6. #6
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    I'm only using Froyo. I'm not sure who's problem it would be.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  7. #7
    Just Joined!
    Join Date
    Nov 2006
    Location
    near Berea, Kentucky (in a tipi)
    Posts
    47
    There may be many mysteries here. FroYo worked (mostly) for me, sometimes refusing to 'stick' in mass storage mode until I rebooted my phone, but I was able to mount the card (eventually) on Linux and OS X. Now, even the older distro's that do work require a manual mount to work (following a bit of detective work to discover the drive assignment). So I'm pretty sure the 'fault' is with Android.

    An effective fix may require a kernel re-build, possibly with EHCI-HCD loaded as a module for those times when it might be needed for normal USB devices...

  8. #8
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    For what it's worth...I tend to agree that it's an Android problem because my Wife's Laptop (Window 7) does not like to mount it either...and she just got the same phone I have. When she wants to transfer pictures and whatnot, we just hook it up to my machine and do it from there.

    Do let us know how it goes and if you need help rebuilding your kernel, just start a new thread. Good Luck.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  9. #9
    Linux User sgosnell's Avatar
    Join Date
    Oct 2010
    Location
    Baja Oklahoma
    Posts
    467
    On my Debian Sid system, running 3.2-1 Liquorix kernel, mass storage works fine with my AT&T Galaxy S phone. Both the internal SD and the microSD card show up, as separate drives. I recently did an upgrade of the phone from Froyo to Gingerbread, and nothing significant changed. Different carriers seem to use slightly (or sometimes radically) different user interfaces, and the storage drive function might be implemented differently on different phones from different carriers. Plus, different manufacturers do things differently.

  10. #10
    Just Joined!
    Join Date
    Nov 2006
    Location
    near Berea, Kentucky (in a tipi)
    Posts
    47
    Digging, digging.

    usbmon shows lots of traffic that I'm not quite up to speed on interpreting, however,

    Turning on debugging output in SG (SCSI Generic, last line seen in dmesg output when hotplugging phone) pointed me to usb_modeswitch.

    Sure enuf: if I disable modeswitching with DisableSwitching=1 in /etc/usb_modeswitch.conf, sdb gets created and I can mount the SDcard (manually)!

    Looks to me as if what's happening is usb_modeswitch is getting triggered and puts phone in serial (modem) mode, making mass storage un-available. This shouldn't happen unless I select tethering from the phone's menu, right?

    I *think* the pertinent file is /usr/share/usb_modeswitch/04e8:f000 (corresponds to idVendor and IdProduct reported by device).

    I am continuing to wade through all this detail. Any usb_modeswitch experts out there?

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •