The problem
Both my internal and external SDCards dissapered on my Samsung s2. The external SD Card when I removed it and put it in my windows PC it read normally and had no errors.
Cause
I do not know what the exact cause is but possibly one of the following, but you should consider that both of my SD Cards stopped working.
- Virus
- Corrupt file system
- 3rd party App
- Faulty Hardware
So Basically it appears that the partitions are mounted but the filessytem that is mounted is corrupt so it almost appears as if they are not mounted.
Solution
After days of research I did the following to get my SD Cards to work
External SD Card (sdcard1)
- I copied the stuff of the card to my windows PC
- Formatted the card in my windows PC as FAT32 (or whatever its format was)
If this does not work, change its type FAT32/extFAT and see if it works and then change back again. Only CM11+ supports extFat
Internal Card (sdcard / sdcard0)
This is more tricky because it cannot be removed and this solution is currently the best I could come up with
- Boot in to clockworkmod(CWM)
- Format the sdcard via CWM by doing the following:
- ‘mounts and storage’
- ‘format /sdcard’ (if unsure remove your external SD Card)
- Select default (unless you know what your file system is)
- Do file recovery on the newly visible drive to recover your files
- DiskDigger – Use on the phone itself. The free version will recover images and .mp4 to a selectable location ie your external SD Card. Seems Quite Good
- Windows Based Recovery – Mount SD Cards as USB Mass Storage
(possibly run this from CWM), then runt he software
Research
These are my notes on all of the googleing and trying of different solutions
Works (or partially works)
- How to Fix "E: Can't mount /sdcard/" Issue on Android Devices – this article tells you how to fix this issue by formatting and give some tips on chaging the format type of the card and how that can help. This does not deal with the internal SD Card
Stuff That Does Not Work
- Upgrading the installed version of CM/Android – The problem persists exactly the same
- updating the ROM does not fix the missing internal SD Card issue (cyanogen updates all keep the current files apps etc..)
useful if you cannot boot you can do a repair install. - wiping system partition + re-install of CM
- these apps make no difference to fixing the issue
- mount /system (rw / r0)
- sd card auto remount w/ad
- sd card check
Stuff That Might Have Merit – But I possibly did wrong!
- possibly delete the mount points before recreating them
Stuff To Try
- * Mounting the internal SD Card as a USB device on a PC and then perform data recovery on that.
- Android Revolution HD | Mobile Device Technologies: How to: Fix a corrupted DATA partition on the HTC One – This is method of repairing a corrupt partition without loosing data
- file system - Check and fix SD card errors within Android itself? - Android Enthusiasts Stack Exchange – this article tells you how to fix a file system using fsck
- Other data recovery solutions
- Ease recovery tool for android. Perhaps use this before formatting drives
- Repair the partitions before formatting, perhaps using fsck, the inbuilt linux repair tool. I think it is like windows chkdsk
UseFul Apps
- DiskDigger for android – This can be useful for a couple of reasons
- Can be used to show mount points and their mappings to devices
- Recover files from damaged partitions. The partitions need to be mounted and the free version does images and mp4 videos. It should be noted it does not recover folder structure
- DiskUsage – shows you where all your space is being used
- Diskinfo - this apps shows disk info mounted and unmounted. Excellent for disk diagnostics
- Free Android Data Recovery Software - EaseUS MobiSaver Free for Android. – runs on windows and can dial in to your android handset – I have not used this
Other Notes
Misc
- clockworkmod always stays present - did not work
- use DiskDigger to get mount points
- there is a single disk holding multiple partitions
- read auto mount commands from /etc.../vold.fsab - this suto runs on load up
- /storage/sdcard0 and /mnt/sdcard0 usually are the same
- several different names used in the different android versions for SD Card, see notes an links
- when you update to a different major version of android you must install a newer version of google play. i do not know if this is automatic because my version is crashing after upgrade from 10.1 to 11
- my exact issue - http://forum.cyanogenmod.org/topic/87473-problem-with-mounting-internal-sdcard-samsungs-galaxy-s2/
- Newbie NAPS – Newbie’s Noobguide to Android Partitions and Schematics – a guide on android partition and what they are used for along with other system information
- SD card with ext4 under Android (CM10.1)Technokratie und Zahlenmagie – article on running SD Cards with ext4 on CM 10.1, CM11 now comes with native support
- Android Phone’s SD Card Won’t Mount – article with some basic tips on how to fix this issue
- How to Mount an SD Card: 11 Steps (with Pictures) - wikiHow – this is how to do this normally when your system is performing correctely
- Fixing sdcard bug in CyanogenMOD | technohunk – some version of CM mount the SD Cards as the wrong mount point and this shows you how to fix it
- Android Partitions Explained: boot, system, recovery, data, cache & misc – easy to read
- filesystems - What is the difference between vfat and FAT32? - Stack Overflow
- exFAT - Wikipedia, the free encyclopedia
- Are there USB settings in CyanogenMod 10? If so, where? - Android Enthusiasts Stack Exchange – tells you where the USB settings are
- When you plug in your phone to the PC via USB, a prompt in your taskbar (in CM10 and CM11 at least) asks you if you want to mount your phone as a mass storage controller (USB drive)
- How to change MTP setting? - Android Forums at AndroidCentral.com
Terminal
The terminal is a powerful tool to be able to help diagnose partion and disk issues
- command line - How to delete a non-empty directory in Terminal? - Ask Ubuntu
- How to use the umount command, by The Linux Information Project
Useful Terminal Commands
- cd .. (notice space after cd)
- umount (notice no 'n')
- cd /mnt
- cd mnt
- mount (with not switches shows the active mounts)
- cat /proc/partitions – shows partitions
- df – shows file systems
- fdisk – perfom actions on the disks and partitions
- fsck - ? possibly does disk repair, not native to android?
- dev_mount – device mounting command, might not be readily available in terminal
- df - lists all partitions
- mount – (without any switches) show all mount points
- rmdir
- rm
Mounting
- this artilce shows you how to list your partitions ie vold 259:3
http://forums.androidcentral.com/samsung-galaxy-s3-mini/294206-solved-how-restore-damaged-internal-sd-card-partition-layout-tried-everything.html - http://stackoverflow.com/questions/19999585/how-to-mount-linux-partition-on-android
command:
root@android:/ # fdisk /dev/bloc/mmcblk0
P
= information on the disk/block/partition etc.... - http://forum.cyanogenmod.org/topic/63994-cm101-internal-sd-card-dont-mount/page__st__20
Here /storage/sdcard0 is mounted as /dev/block/vold/259:3. I think it should be the same for you.
mount -t vfat -o rw /dev/block/vold/259\:3 /storage/sdcard0/
mount -t vfat -o rw /dev/block/vold/259:3 /storage/sdcard0/ - this is correct no '\' - http://stackoverflow.com/questions/7450650/how-to-list-additional-external-storage-folders-mount-points
- You can read /proc/mounts to find out what is currently mounted.
- Or you can read /etc/vold.conf or /etc/vold.fstab (it depends on version what config file is present). This files contains config for removable storages. At tablet default storage is not usually present in vold.
- dev mount syntax
http://stackoverflow.com/questions/13813143/what-is-the-contents-of-vold-fstab-or-the-syntax-of-the-dev-mount-line - [SOLVED] How to restore damaged Internal SD card partition layout? Tried everything. - Android Forums at AndroidCentral.com – this article shows how to bring up partition information and uses of: cat /proc/partitions, df, fdisk
- How to use mount command on android | - cleary shows commands to type in the terminal to mount drives
- How to list additional external storage folders (mount points)?
- You can read /proc/mounts to find out what is currently mounted.
- Or you can read /etc/vold.conf or /etc/vold.fstab (it depends on version what config file is present). This files contains config for removable storages. At tablet default storage is not usually present in vold.
- How the Mount SD Card Android Process works - BieMme Italia
- external sd - Why is the SD-card mounted to "/sdcard/external_sd" instead of "/sdcard" (or "/mnt/sdcard")? - Android Enthusiasts Stack Exchange – a useful forum thread explaining why there are different mount points for SD Cards
- android - What is the contents of vold.fstab, or the syntax of the dev_mount line? - Stack Overflow – gives some information on vold.fstab and the use of dev_mount command
- Mount Second Partition on Android Device with vold - Stack Overflow
- external sd - Specifying SD card mount options upon boot - Android Enthusiasts Stack Exchange
- [SOLVED] No unmount command (Page 1) / Newbie Corner / Arch Linux Forums – common issue, people forget that it is umount not unmount
- Mounting points | Samsung Galaxy S II I9100 | XDA Forums – list of mounting points
- cyanogenmod - mount command outputs usage on correct arguments - Android Enthusiasts Stack Exchange – some good syntax examples
- Mount Examples from my vold.fstab
- # internal SDCard
dev_mount sdcard0 /storage/sdcard0 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 nonremovable,encryptable - #usb disk
dev_mount usbdisk0 /storage/usbdisk0 auto /devices/platform/s3cotghcd/usb
- # internal SDCard
** add websites where appropriate to my links directory