4

I flashed a newer (unofficial) version of CM on to my phone, and whenever I try and use this version the SD card disappears moments after it is inserted. The kernel finds the card, vold detects this and does something. I'm not sure what, but it essentially causes the card to disappear from /dev/block before it can be fsck'd.

If I run this script, however:

while true; do
  if ls /dev/block | grep mmc; then
    killall vold
  fi
done

The SD remains visible and also mountable, and it also remains mounted after vold has caused its block files to disappear (/dev/block/mmc* disappear and /dev/block/vold/179:* (the SD card) remains, but in an unusable state, but the mountpoint still writes to the SD card)

The card has one fat32 partition that works in TWRP.

Relevant dmesg sections (lines containing either "sd" or "mmc" in dmesg): http://paste.kde.org/pyrxbgd9z/c5fjco

Logcat output:

D/Vold    (14152): Volume sdcard0 state changing 1 (Idle-Unmounted) -> 2 (Pending)
D/DirectVolume(14152): DirectVolume::handlePartitionAdded -> MAJOR 179, MINOR 1, PARTN 1
D/Vold    (14152): Volume sdcard0 state changing 2 (Pending) -> 1 (Idle-Unmounted)
W/MountService(  440): Duplicate state transition (unmounted -> unmounted) for /storage/sdcard0
D/MountService(  440): sendStorageIntent Intent { act=android.intent.action.MEDIA_UNMOUNTED dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
D/DirectVolume(14152): Checking for bad partition major number
I/Vold    (14152): /dev/block/vold/179:1 being considered for volume sdcard0
D/Vold    (14152): Volume sdcard0 state changing 1 (Idle-Unmounted) -> 3 (Checking)
D/Vold    (14152): Trying to get filesystem type for /dev/block/vold/179:1
D/MountService(  440): volume state changed for /storage/sdcard0 (unmounted -> checking)
D/MountService(  440): sendStorageIntent Intent { act=android.intent.action.MEDIA_CHECKING dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
D/MediaScannerReceiver(  974): action: android.intent.action.MEDIA_UNMOUNTED path: /storage/sdcard0
D/ExternalStorage(  989): After updating volumes, found 0 active roots
D/DirectVolume(14152): Volume sdcard0 /mnt/media_rw/sdcard0 partition 179:1 removed
D/DirectVolume(14152): Volume sdcard0 /mnt/media_rw/sdcard0 disk 179:0 removed
D/Vold    (14152): Volume sdcard0 state changing 3 (Checking) -> 0 (No-Media)
I/PackageManager(  440): Updating external media status from unmounted to unmounted
D/MountService(  440): volume state changed for /storage/sdcard0 (checking -> unmounted)
D/Vold    (14152): Found vfat filesystem on /dev/block/vold/179:1
D/MountService(  440): sendStorageIntent Intent { act=unmounted dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
D/MountService(  440): volume state changed for /storage/sdcard0 (unmounted -> removed)
I/fsck_msdos(14152): FSCK wrapper - calling fsck_msdos with -p -f /dev/block/vold/179:1
D/MountService(  440): sendStorageIntent Intent { act=android.intent.action.MEDIA_REMOVED dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
I/fsck_msdos(14152): ** /dev/block/vold/179:1
I/fsck_msdos(14152): Can't open: No such device or address
I/fsck_msdos(14152): fsck_msdos terminated by exit(8)
E/Vold    (14152): Filesystem check failed (unknown exit code 8)
E/Vold    (14152): /dev/block/vold/179:1 failed FS checks (I/O error)
D/Vold    (14152): Volume sdcard0 state changing 0 (No-Media) -> 1 (Idle-Unmounted)
W/Vold    (14152): Returning OperationFailed - no handler for errno 0
E/VoldConnector(  440): NDC Command {52 volume mount /storage/sdcard0} took too long (792ms)
I/PackageManager(  440): Updating external media status from unmounted to unmounted
W/MountService(  440): Insertion mount failed (-1)
D/MountService(  440): volume state changed for /storage/sdcard0 (removed -> unmounted)
D/MountService(  440): sendStorageIntent Intent { act=android.intent.action.MEDIA_UNMOUNTED dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
D/MediaScannerReceiver(  974): action: android.intent.action.MEDIA_UNMOUNTED path: /storage/sdcard0
D/ExternalStorage(  989): After updating volumes, found 0 active roots

if you need any more info/clarification to help troubleshooting, ask and I will provide :)

  • Cyanogenmod nighlies are riddled with known and new bugs. Maybe flashing a better ROM is the way to go? – RossC Jul 1 '14 at 10:49
  • @RossC - it would be, but there's not much choice in terms of other ROMs for my device. An older build from March had working SD card but other bugs/instabilities. – keepcalm Jul 1 '14 at 11:18
0

I fixed it! Turns out it was a bug with vfat support. I had to format my SD to exfat, but now it's working again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.