CyanogenMod
  1. CyanogenMod
  2. CYAN-2869

usb storage unavailable on PC after upgrade to cm-10.2

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Normal Normal
    • Resolution: Unresolved
    • Affects Version/s: 10.2.0
    • Fix Version/s: None
    • Component/s: Kernel
    • Labels:
      None
    • Instructions:
      I have read these instructions
    • Model:
      crespo
    • CM Download source:
    • Radio/baseband:
      I9020XXKB3
    • Kernel version:
      3.0.101-cyanogenmod-g7421011

      Description

      This problem started on updating to cm-10.2-m1 from 10.1.3.

      I had an encrypted storage on the nexus-s. I updated via cwm recovery, and the new install started and showed the 'Optimizing app xx/xxx'. However, after that, it kept spinning, and I had to remove the battery. adb wasn't working at that point, so couldn't get any debug output.

      I then reset everything to factory defaults, but cwm failed to recognise the /media partition. I removed it and added it using parted, and created a file system on it.

      Installing 10.2-m1 worked fine after that (though encryption doesn't work – after asking for confirmation, the encryption screen just sits there and does nothing).

      With the new install, usb storage can't be mounted on my Linux laptop.

      'adb logcat' shows the following.

      Other operations via adb and the phone work well.

      Let me know if any other debug output will be helpful.

      I/PackageManager( 392): Updating external media status from unmounted to unmounted
      I/PackageManager( 392): Updating external media status from unmounted to unmounted
      E/MountService( 392): Failed to share/unshare
      E/MountService( 392): com.android.server.NativeDaemonConnector$NativeDaemonFailureException: command '23 volume share /storage/sdcard0 ums' failed with '401 23 volume operation failed (No such device)'
      E/MountService( 392): at com.android.server.NativeDaemonConnector.execute(NativeDaemonConnector.java:382)
      E/MountService( 392): at com.android.server.NativeDaemonConnector.executeForList(NativeDaemonConnector.java:318)
      E/MountService( 392): at com.android.server.NativeDaemonConnector.execute(NativeDaemonConnector.java:283)
      E/MountService( 392): at com.android.server.MountService.doShareUnshareVolume(MountService.java:658)
      E/MountService( 392): at com.android.server.MountService.access$200(MountService.java:105)
      E/MountService( 392): at com.android.server.MountService$UmsEnableCallBack.handleFinished(MountService.java:376)
      E/MountService( 392): at com.android.server.MountService$MountServiceHandler.handleMessage(MountService.java:487)
      E/MountService( 392): at android.os.Handler.dispatchMessage(Handler.java:99)
      E/MountService( 392): at android.os.Looper.loop(Looper.java:137)
      E/MountService( 392): at android.os.HandlerThread.run(HandlerThread.java:61)

        Activity

        Hide
        DTADS added a comment -

        I also had a similar problem with my encrypted Nexus S after upgrading from 10.1.3 to 10.2.0rc1.

        My device also showed the spinning CM logo after the "Optimizing app" step of the upgrade process (and after asking for, and accepting my encryption password), and after being in this state for close to 30 min I also decided to pull the battery.

        I then did a complete wipe from CWR and installed 10.2.0rc1 along with the Google apps package. On the first boot it didn't ask for the encryption password, even thought the sdcard wasn't wiped. Once it finished booting, CM didn't have access to the encrypted storage. I then did a factory reset from within CM, rebooted, and encrypted the device.

        Subsequent boots asked for the encryption password, and apparently accepted it, but I still couldn't access the sdcard once it finished booting. At this point I reverted back to 10.1.3, re-encrypted the device, and everything worked fine again.

        I haven't tried 10.2.0 final yet because I don't have the time right now to deal with the whole re-install process should the issue still be present.

        I'm commenting here instead of opening a new bug because the issues seem similar enough, and both suspiciously affect the crespo image. I haven't seen similar reports for other models.

        Show
        DTADS added a comment - I also had a similar problem with my encrypted Nexus S after upgrading from 10.1.3 to 10.2.0rc1. My device also showed the spinning CM logo after the "Optimizing app" step of the upgrade process (and after asking for, and accepting my encryption password), and after being in this state for close to 30 min I also decided to pull the battery. I then did a complete wipe from CWR and installed 10.2.0rc1 along with the Google apps package. On the first boot it didn't ask for the encryption password, even thought the sdcard wasn't wiped. Once it finished booting, CM didn't have access to the encrypted storage. I then did a factory reset from within CM, rebooted, and encrypted the device. Subsequent boots asked for the encryption password, and apparently accepted it, but I still couldn't access the sdcard once it finished booting. At this point I reverted back to 10.1.3, re-encrypted the device, and everything worked fine again. I haven't tried 10.2.0 final yet because I don't have the time right now to deal with the whole re-install process should the issue still be present. I'm commenting here instead of opening a new bug because the issues seem similar enough, and both suspiciously affect the crespo image. I haven't seen similar reports for other models.
        Hide
        Borden Rhodes added a comment -

        You might want to look at CYAN-2547, which seems similar to these symptoms. I think the problem is that 10.2 has royally frogged the encryption system.

        Show
        Borden Rhodes added a comment - You might want to look at CYAN-2547 , which seems similar to these symptoms. I think the problem is that 10.2 has royally frogged the encryption system.
        Hide
        Amit Shah added a comment -

        Note that this is without encryption yet – the usb storage not being available is before attempting encryption.

        Show
        Amit Shah added a comment - Note that this is without encryption yet – the usb storage not being available is before attempting encryption.
        Hide
        Amit Shah added a comment -

        If it helps, this is ls -lZ output for the storage:

        1. ls -lZ /

        d---r-x--- system sdcard_r u:object_r:rootfs:s0 storage

        1. ls -lZ /storage/sdcard0

        drwxrwxr-x root sdcard_rw u:object_r:sdcard_internal:s0 sdcard0

        Show
        Amit Shah added a comment - If it helps, this is ls -lZ output for the storage: ls -lZ / d---r-x--- system sdcard_r u:object_r:rootfs:s0 storage ls -lZ /storage/sdcard0 drwxrwxr-x root sdcard_rw u:object_r:sdcard_internal:s0 sdcard0
        Hide
        Dario Bertini added a comment -

        I've been able to reproduce this bug twice by encrypting the device after a fresh install (sdcard accessible after installation, borked after encryption) on a Nexus S

        by looking at this: http://forum.cyanogenmod.com/topic/67850-encrypted-device-now-internal-usb-storage-is-missing/page__hl__encryption
        it seems that a similar bug already happened last year (on a Galaxy Note in that case), and if you read the pages linked there, you'll see that the factory reset can't reformat a borked sdcard

        To make the sdcard usable again, you have to flash a rom with a different *.fstab... this way it will let you reformat it (since we're on JB right now, Gingerbread works... probably also ICS, though I haven't tried it)

        Amit: I'm not sure what you meant with "added it [the media partition] using parted", but to me seems that the usb storage is not available AFTER a fresh install done AFTER upgrading an encrypted system...

        since a factory reset isn't able to reformat the sdcard volume, almost surely the same piece of code borks the volume either during upgrade on an encrypted system, or when encrypting a freshly installed system

        I don't think this is the same bug as https://jira.cyanogenmod.org/browse/CYAN-2547
        The code that is the underlying cause might be the same, but this deals only with problems with the sdcard/usb volume while the other bug has a device that cannot boot at all (but without an sdcard/usb volume afaik, that might explain the difference, or might be unrelated)

        Show
        Dario Bertini added a comment - I've been able to reproduce this bug twice by encrypting the device after a fresh install (sdcard accessible after installation, borked after encryption) on a Nexus S by looking at this: http://forum.cyanogenmod.com/topic/67850-encrypted-device-now-internal-usb-storage-is-missing/page__hl__encryption it seems that a similar bug already happened last year (on a Galaxy Note in that case), and if you read the pages linked there, you'll see that the factory reset can't reformat a borked sdcard To make the sdcard usable again, you have to flash a rom with a different *.fstab... this way it will let you reformat it (since we're on JB right now, Gingerbread works... probably also ICS, though I haven't tried it) Amit: I'm not sure what you meant with "added it [the media partition] using parted", but to me seems that the usb storage is not available AFTER a fresh install done AFTER upgrading an encrypted system... since a factory reset isn't able to reformat the sdcard volume, almost surely the same piece of code borks the volume either during upgrade on an encrypted system, or when encrypting a freshly installed system I don't think this is the same bug as https://jira.cyanogenmod.org/browse/CYAN-2547 The code that is the underlying cause might be the same, but this deals only with problems with the sdcard/usb volume while the other bug has a device that cannot boot at all (but without an sdcard/usb volume afaik, that might explain the difference, or might be unrelated)

          People

          • Assignee:
            Joel Teichroeb
            Reporter:
            Amit Shah
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: