• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[How To] Swap the mounting points on ICS (CM9) for emmc and sdcard.

Search This thread

mattisdada

Senior Member
Feb 28, 2010
268
54
Melbourne
rrelive.com
This is a quick tutorial I want to write up based on a recent experience I've had recently with my micro sd-card. (More info on that below)

This how to shows how to switch between the internal sd card and the external sd cards mounting points (so the external is accessed via /sdcard, and the internal is accessed through /eemc)

The nuts and bolts how to:
0. Perform backups on System, i am not responsible for any damages or boot loops.
1. Download root explorer (or any other file explorer with root privileges)
2. Go to /system/etc, and mount R/W
3. Long press on vold.fstab and select Open With... , select Text Editor
4. You will find a line with sdcard in it a few times, change this section:
dev_mount sdcard /mnt/sdcard
To:
dev_mount emmc /mnt/emmc
5. Do the same thing with the emmc section:
dev_mount emmc /mnt/emmc
To:
dev_mount sdcard /mnt/sdcard
6. But you just flipped the first section around? Yes I did, this changes the mounting points. But not the original location of where it is being mounted......
7. Please don't change anything else in this file....
8. Reboot, enjoy!

I had to do this hax because the current nightly of CM9 doesn't support there being no external sd card, and mine got corrupt (eep!), it then continued to mount the internal sd card location to emmc instead (wtf?). So i did this quick hax so i could take pictures with the stock camera and use several applications which just default to the internal sdcard (and doesn't allow changing that).

Hope that helps some random Googlers......

Note: This has only been tested on CM9 Nightly apr-9th on SGSII, but i see no reason for this not work across all ROMs and devices( with ICS, the emmc thing wasn't on GB and below i don't think) as long as you don't do anything as foolish as change more than the lines specified above.

An example of a swapped file is (DO NOT COPY AND PASTE THIS, YOU PROBABLY WONT BE ABLE TO BOOT):
# internal sdcard
dev_mount emmc /mnt/emmc 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 encryptable_

# external sdcard
dev_mount sdcard /mnt/sdcard auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1

Please note that the latest CM9 nightlies lets you do this from the system menu! This was written pre that advancement. This is for the curious and other ROMs/phones.
 
Last edited:

Zewsan

Senior Member
Mar 25, 2012
189
32
Is it possible to use something in the lines of:
dev_mount emmc /mnt/external_sd ? To just bind the external sd to the stock location?
 
  • Like
Reactions: gnan10

Snakeforhire

Senior Member
Jul 12, 2011
132
21
Sélestat
If I understood your question right, that's the default behavior in CM7/9 so you don't need to change anything.
(internal gets mounted as /sdcard and external as /emmc. At least that's how it always behaved on my device -takes a bit of getting used to but it's manageable once you know the trick)

edit : aw sawry, mistook /mnt/external_sd for /mnt/sdcard. But it changes nothing besides the name of the mountpoint, easily adjustable.. Although why you would want to have it named like that is beyond me, it makes for more keys to hit when typing it... xD
 
Last edited:

mattisdada

Senior Member
Feb 28, 2010
268
54
Melbourne
rrelive.com
Is it possible to use something in the lines of:
dev_mount emmc /mnt/external_sd ? To just bind the external sd to the stock location?

Its the same technique....

So remember this:
Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>

So <label> doesn't really matter, but we may as well keep it sane (and have it the same name as the mount point)! And <mount_point> is where its mounted. Make sure the folder exists first though! leave <part> and <sysfs_path*> alone and it will work correctly.


So if you were to create a folder /mnt/hammertime , then make a line look something like this (taken from my example in first post)
dev_mount hammertime /mnt/hammertime auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
That will work correctly.

Hope that helps! :)
 
Last edited:
  • Like
Reactions: WolfSpider95

gnan10

Senior Member
Apr 16, 2011
594
114
30
andhra-kdp
www.google.co.in
Its the same technique....

So remember this:


So <label> doesn't really matter, but we may as well keep it sane (and have it the same name as the mount point)! And <mount_point> is where its mounted. Make sure the folder exists first though! leave <part> and <sysfs_path*> alone and it will work correctly.


So if you were to create a folder /mnt/hammertime , then make a line look something like this (taken from my example in first post)

That will work correctly.

Hope that helps! :)


is there no any requirement of changing build.prop file after doing this....?????
 

mattisdada

Senior Member
Feb 28, 2010
268
54
Melbourne
rrelive.com
Ok I'll bite, late night tonight I'm going to flash back to AOKP....and give it a shot. It can't be that simple.....
Most certainly appreciate your effort...been looking for this for some time now.l!
:cool:

I didn't think so either, but i had the problem, hoped it was like its Linux cousin and searched for fstab, i found it. Swapped the mounting destinations around. And voila, done.....
 
  • Like
Reactions: WolfSpider95

jeromepaez

New member
Apr 8, 2012
4
0
Mandaluyong
Swapped but CWM Recovery still the same

Hi, first of all nice guide you did here.
Here's the thing: somehow somewhere by flashing nightlies i ended up
with /sdcard being treated as my external SD while /emmc was for internal.
So I wanted to fix that and using your guide although the other way around
I was able to make it as such: /sdcard = internal storage; /emmc = external storage.
ALL IS GOOD however when i booted to CWM recovery:
CWM still mounts my internal storage as /emmc.
SO in recovery internal storage = /emmc while when in CM9 internal storage = /sdcard

Is there anyway i can change CWM so that internal storage = /sdcard? to be more uniform and not confusing
 

mattisdada

Senior Member
Feb 28, 2010
268
54
Melbourne
rrelive.com
Hi, first of all nice guide you did here.
Here's the thing: somehow somewhere by flashing nightlies i ended up
with /sdcard being treated as my external SD while /emmc was for internal.
So I wanted to fix that and using your guide although the other way around
I was able to make it as such: /sdcard = internal storage; /emmc = external storage.
ALL IS GOOD however when i booted to CWM recovery:
CWM still mounts my internal storage as /emmc.
SO in recovery internal storage = /emmc while when in CM9 internal storage = /sdcard

Is there anyway i can change CWM so that internal storage = /sdcard? to be more uniform and not confusing

Yeah CWM doesn't read the /system stuff, it has its own partition....
I've got no idea sorry, but its just a little inconvenient in CWM thats all.... But im sure you can check it out... Just search for fstab when you figure out how to explore the recovery partition (I've got no idea :p, short of modifying a flashable zip first and rekeying it.)
 
  • Like
Reactions: jeromepaez

HAvoktek

Senior Member
Forgot to post back with my results, Got HFS & AOKP to see the changes, however something broke when I did a PC mount. After playing with the lines "Experimentation" if you will, I ended up needing to rebuild my partitions! No fault of yours, I just wanted to see if I can have that functionality through the whole phones usage and features eg. mounting to the PC.
Thanks for the guide though, I'm seeing now that some devs are including the option to use the internal memory via a menu select, I wonder how there implementing that.:cool:
 

mattisdada

Senior Member
Feb 28, 2010
268
54
Melbourne
rrelive.com
Probably something very similar but programmatically instead of the haxy file editing method I'm noting to use :p.

PC mounting is working as per normal for me here though...... (I don't have an external card right now so that may be a variable)
 

hfj00788

New member
Jul 28, 2010
2
0
Purpose

What is the purpose of this? Does it mount the EMMC so that the system thinks EMMC is actually an external sd card?

I am trying to figure out if there is a way to make the above mentioned happen. Or is there a way to re-partition it so that EMMC is used as system memory... or maybe even both? It seems that since ICS better integrates with on board memory, there would be a way to better integrate the internal memory of older devices with the system. :confused:
 

mattisdada

Senior Member
Feb 28, 2010
268
54
Melbourne
rrelive.com
What is the purpose of this? Does it mount the EMMC so that the system thinks EMMC is actually an external sd card?

I am trying to figure out if there is a way to make the above mentioned happen. Or is there a way to re-partition it so that EMMC is used as system memory... or maybe even both? It seems that since ICS better integrates with on board memory, there would be a way to better integrate the internal memory of older devices with the system. :confused:

This guide shows you how to "flip" the points. Several ROMs have it differently preconfigured. But if this is your current situation:
Code:
Emmc: External SD Card
SDcard: Internal SD Card
It will make it:
Code:
Emmc: Internal SD Card
SDcard: External SD Card

And vice versa obviously (its a flip).

This guide will do what your wishing it to do.

The folders sdcard and emmc (or there /mnt varient more closely) are just soft links, meaning they don't really exist, but just point to another location. We can modify which folder they are linked to in the fstab.void file.
 
Last edited:
  • Like
Reactions: hfj00788

bluefa1con

Inactive Recognized Developer
Aug 9, 2011
3,162
9,211
lol you need no guide on cm9
you can switch them in storage settings by a simple checkbox
its mentioned in team hacksung's FAQ
 

mattisdada

Senior Member
Feb 28, 2010
268
54
Melbourne
rrelive.com
Im on CM9. Can someone post the code so i can just do a simple copy and paste? I wanna switch emmc to external_sd
(there is no storage settings simple checkbox for me)
Sent from my SGH-I997 using xda premium

Never use a copy and paste for the file in this operation. You only need to modify partially two lines (which you can copy and paste from the OP).

Your just swapping two words around really. Its fairly easy, just follow the steps and it will work, it looks daunting at first if your not used to doing this sort of thing, but its fairly easy.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    This is a quick tutorial I want to write up based on a recent experience I've had recently with my micro sd-card. (More info on that below)

    This how to shows how to switch between the internal sd card and the external sd cards mounting points (so the external is accessed via /sdcard, and the internal is accessed through /eemc)

    The nuts and bolts how to:
    0. Perform backups on System, i am not responsible for any damages or boot loops.
    1. Download root explorer (or any other file explorer with root privileges)
    2. Go to /system/etc, and mount R/W
    3. Long press on vold.fstab and select Open With... , select Text Editor
    4. You will find a line with sdcard in it a few times, change this section:
    dev_mount sdcard /mnt/sdcard
    To:
    dev_mount emmc /mnt/emmc
    5. Do the same thing with the emmc section:
    dev_mount emmc /mnt/emmc
    To:
    dev_mount sdcard /mnt/sdcard
    6. But you just flipped the first section around? Yes I did, this changes the mounting points. But not the original location of where it is being mounted......
    7. Please don't change anything else in this file....
    8. Reboot, enjoy!

    I had to do this hax because the current nightly of CM9 doesn't support there being no external sd card, and mine got corrupt (eep!), it then continued to mount the internal sd card location to emmc instead (wtf?). So i did this quick hax so i could take pictures with the stock camera and use several applications which just default to the internal sdcard (and doesn't allow changing that).

    Hope that helps some random Googlers......

    Note: This has only been tested on CM9 Nightly apr-9th on SGSII, but i see no reason for this not work across all ROMs and devices( with ICS, the emmc thing wasn't on GB and below i don't think) as long as you don't do anything as foolish as change more than the lines specified above.

    An example of a swapped file is (DO NOT COPY AND PASTE THIS, YOU PROBABLY WONT BE ABLE TO BOOT):
    # internal sdcard
    dev_mount emmc /mnt/emmc 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 encryptable_

    # external sdcard
    dev_mount sdcard /mnt/sdcard auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1

    Please note that the latest CM9 nightlies lets you do this from the system menu! This was written pre that advancement. This is for the curious and other ROMs/phones.
    1
    Is it possible to use something in the lines of:
    dev_mount emmc /mnt/external_sd ? To just bind the external sd to the stock location?
    1
    Is it possible to use something in the lines of:
    dev_mount emmc /mnt/external_sd ? To just bind the external sd to the stock location?

    Its the same technique....

    So remember this:
    Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>

    So <label> doesn't really matter, but we may as well keep it sane (and have it the same name as the mount point)! And <mount_point> is where its mounted. Make sure the folder exists first though! leave <part> and <sysfs_path*> alone and it will work correctly.


    So if you were to create a folder /mnt/hammertime , then make a line look something like this (taken from my example in first post)
    dev_mount hammertime /mnt/hammertime auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
    That will work correctly.

    Hope that helps! :)
    1
    Ok I'll bite, late night tonight I'm going to flash back to AOKP....and give it a shot. It can't be that simple.....
    Most certainly appreciate your effort...been looking for this for some time now.l!
    :cool:

    I didn't think so either, but i had the problem, hoped it was like its Linux cousin and searched for fstab, i found it. Swapped the mounting destinations around. And voila, done.....
    1
    Hi, first of all nice guide you did here.
    Here's the thing: somehow somewhere by flashing nightlies i ended up
    with /sdcard being treated as my external SD while /emmc was for internal.
    So I wanted to fix that and using your guide although the other way around
    I was able to make it as such: /sdcard = internal storage; /emmc = external storage.
    ALL IS GOOD however when i booted to CWM recovery:
    CWM still mounts my internal storage as /emmc.
    SO in recovery internal storage = /emmc while when in CM9 internal storage = /sdcard

    Is there anyway i can change CWM so that internal storage = /sdcard? to be more uniform and not confusing

    Yeah CWM doesn't read the /system stuff, it has its own partition....
    I've got no idea sorry, but its just a little inconvenient in CWM thats all.... But im sure you can check it out... Just search for fstab when you figure out how to explore the recovery partition (I've got no idea :p, short of modifying a flashable zip first and rekeying it.)