Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I recently upgraded my phone to an LG Motion 4G (Android 4 ICS). I see that the sdcard is mounted at /sdcard/external_sd. I also noticed that this appears to be the same with some other newer models. Apps expect the sdcard to be at /sdcard. I assume the manufacturers want to include a lot of internal storage, but why mount internal storage at /sdcard? Shouldn't this be against some form of Android specification standard?

share|improve this question
4  
As to the "specification standard", this should rise no problems: As you can read in the developers documentation on External Storage, apps should determine the location/availibility using API calls (here: getExternalStorageState()), not using hard-coded paths. –  Izzy Nov 10 '12 at 10:43
    
Good point Izzy, but apparently some manufacturers are wrongfully redirecting apps to the internal space via getExternalStorageDirectory(). stackoverflow.com/questions/11281010/… –  Sepero Nov 11 '12 at 5:01
    
Ah, good point as well -- as a non-developer I was not aware of that. But I see Flow provided a very good explanation -- again with points I was not aware of... –  Izzy Nov 11 '12 at 15:39
add comment

3 Answers

up vote 20 down vote accepted

The reason is the history of Android: The first generation of Android devices only had a small amount of internal storage (around 100-400MiB) which was mounted under /data.

Next, devices with a, at that time external, SD-card came out. The SD card was mounted under /mnt/sdcard.

After that, devices with large internal storage came on the market. This storage was portioned, because /mnt/sdcard had become the default place for big data chunks from apps, pictures and such. So the Android environment had to have a /data and /mnt/sdcard directory. Therefore one partition was for /data, the other for /mnt/sdcard. This is the reason why you storage space could become low (the /data partition) even if there is plenty of space on /mnt/sdcard.

This situation was improved with Android 3.0: /data and /mnt/sdcard are now pointing to the same partition. Good job Google, that could have been done versions ago. Which is also the reason why app2sd is no more needed on Android 3.0 or higher: You would only move the data within the same volume.

Now we come to the answer if your question: Since /mnt/sdcard is already mounted on the internal storage, an external SD-card has to use a different mount point. And this mount point is not specified by Google. It could be

  • /mnt/sdcard/ext_sd
  • /mnt/external
  • /mnt/extSdCard
  • /mnt/sdcard/external_sd
  • etc.

The API call getExternalStorageDirectory() usually points to the internal storage directory. This behavior is documented. There are open source projects that provide tools to find the external SD-card directory in a canonical way.

share|improve this answer
    
Does that mean there is no "transparent way" for apps to determine the SD card? Of course, there's isExternalStorageRemovable() to see if the "external" storage is removable, plus one could determine the mount points (using the mount command) and check for mount flags etc. But if I'm not taken wrong here, this still means each developer needs to figure out for his app himself, and there's no simple API call to do that for him? –  Izzy Nov 11 '12 at 17:28
    
That's correct. There are the libraries that I linked that try to add that feature, but there is no official API call to do so. –  Flow Nov 11 '12 at 18:32
    
If both the external storage and the /data partition are merged, how could I safely mount/unmount my SD card to plug it, say, in my PC? It seems to me that having separate partitions is logical and I don't see why all that had to happen. –  jadkik94 Nov 15 '12 at 17:55
    
It's not the external storage, it's the, so called, "internal SD" and the /data partition that get's merged. –  Flow Nov 15 '12 at 22:34
    
This situation was improved with Android 3.0: /data and /mnt/sdcard are now pointing to the same parition. Just FYI, that's NOT true on at least one phone running Android 4.0 (Pantech Burst), where /data is a 1GB ext4 partition and /mnt/sdcard is a 12GB FAT32 partition. –  netvope Mar 11 '13 at 19:43
show 2 more comments

You should be aware (if rooted) you can go into /system/etc/vold.fstab and swap the mount points for /sdcard and /mnt/external_sd....this will allow your sdcard to be on /sdcard as you expect and the remaining "internal storage" will be mounted on /mnt/external_sd or if you prefer /sdcard/external_sd/

share|improve this answer
    
This works with some models of phones, but not all. It doesn't work for my LG Motion 4G, Android 4.0.4. Thx –  Sepero Aug 17 '13 at 11:54
add comment

Forcing external SD mount away from /mnt/sdcard has no technical merit, it is Google's way of helping hardware vendors to create a differentiation point for phones with more internal memory.

There is no reason why applications have to find a way to locate the external card when /mnt/sdcard was clearly the place the sdcard should have been and Google's undefined way of loading external SD card is another less than consumer friendly plot to make external SD card less useful in newer Android devices. There is NO reason why /data and /mnt/sdcard had to be merged into the same partition on newer version of Android except for manufacturer to differentiate phones with larger internal memory from lower cost units with less internal memory. Even if the merge had to be done, Google could have clearly defined a STANDARD new mounting point for the external SD cards instead of leaving it completely vague. This is completely working against preventing further "segmentation" of the Android eco-system by a clumsy design to help vendor differentiation of higher end phones against lower cost units with less built-in memory.

Android app binaries are tiny, phones with 1-2 Gigs of internal memory should have way more than enough space for hundreds of apps, and all the large data could be safely tucked way on an external SD card. But then vendors realized they had to have a way to differentiate their higher end product, and claiming a higher internal memory become part of that scheme and crippling the usefulness of external memory is the other integrated part this scheme required for this to work fully hence the less helpful API to find external sd cards and the unstandardized mounting points.

So: No, mounting SD card at a place other than /mnt/sdcard is nothing but a business strategy for selling higher priced new phones under newer version of Android, nothing more than that. Just imagine, if the Nexus 4 8GB and Nexus 16GB can both use 64GB of external sd card for application and media, is there a reason for anyone to buy the 16 GB version? That extra 8 GB of NAND memory is not surely not worth $50 price difference if external SD cards are involved. Since most components in a smart phone pretty much has to be the same (RAM, processor, radios), the only area left for more profit margin is the internal memory space, and hence the weird external memry mounting point.

Also has everyone also noticed the absence of external SD support from current crop of "Google" branded android devices? This trend will keep expanding in "top tier" Android devices. External SD card support was a key differentiation for Android devices to overtake iPhone's dominance in mobile market. Now with Android ruling supreme in the numbers game, there's little need for this profit sapping practice to be up kept for much longer.

I won't be surprised by Android 5.0, the external SD card support would be a thing of the past. Because if it's hard to apps to find externals SD card, then most program will just simply use the known /data and /mnt/sdcard locations, with most apps use more and more stored data for its operation, a vibrant product mark up strategy is created out of "thin air" simply by not mount external SD card at /mnt/sdcard.

share|improve this answer
    
Now, that is what I call a wall of text. Seems also a bit ranty. Please add some paragraphs to your answer. Also I don't get why there is "no reason to merge /data and /mnt/sdcard", as I clearly see a reason: Avoiding the fragmentation of the internal storage. –  Flow Nov 30 '12 at 11:14
    
That was definitely a rant, Deecee, but regardless, I appreciate your input. Cheers –  Sepero Nov 30 '12 at 14:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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