Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,806,408 Members 53,213 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
mattisdada
Old
(Last edited by mattisdada; 23rd May 2012 at 01:10 AM.)
#1  
mattisdada's Avatar
Senior Member - OP
Thanks Meter 49
Posts: 257
Join Date: Feb 2010
Location: Melbourne
Default [How To] Swap the mounting points on ICS (CM9) for emmc and sdcard.

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:
Quote:
dev_mount sdcard /mnt/sdcard
To:
Quote:
dev_mount emmc /mnt/emmc
5. Do the same thing with the emmc section:
Quote:
dev_mount emmc /mnt/emmc
To:
Quote:
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):
Quote:
# 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.

Samsung Galaxy S 4: Cyanogenmod 10. JB 4.2
Samsung Galaxy Tab 10: Stock CM10.1 JB 4.2
Launcher:Nova Launcher Prime
SMS:AOSP SMS / Facebook Messenger
Video Player:MX Video Player / DICE player / VLC (in that order)
Audio Player:Spotify
News:Pulse
Backup:Titanium Backup(apps)

The Following 18 Users Say Thank You to mattisdada For This Useful Post: [ Click to Expand ]
 
Zewsan
Old
#2  
Senior Member
Thanks Meter 33
Posts: 188
Join Date: Mar 2012
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?
The Following User Says Thank You to Zewsan For This Useful Post: [ Click to Expand ]
 
Snakeforhire
Old
(Last edited by Snakeforhire; 17th April 2012 at 08:44 PM.)
#3  
Senior Member
Thanks Meter 20
Posts: 131
Join Date: Jul 2011
Location: SÚlestat

 
DONATE TO ME
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
 
gnan10
Old
#4  
gnan10's Avatar
Senior Member
Thanks Meter 91
Posts: 441
Join Date: Apr 2011
Location: andhra-kdp
Quote:
Originally Posted by Zewsan View Post
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?
same doubt raised here ...is it possible to mount external sdcard to /mnt/external_sd instead of mnt/emmc...???
please need solution
 
mattisdada
Old
(Last edited by mattisdada; 16th April 2012 at 09:10 AM.)
#5  
mattisdada's Avatar
Senior Member - OP
Thanks Meter 49
Posts: 257
Join Date: Feb 2010
Location: Melbourne
Quote:
Originally Posted by Zewsan View Post
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:
Quote:
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)
Quote:
dev_mount hammertime /mnt/hammertime auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
That will work correctly.

Hope that helps!

Samsung Galaxy S 4: Cyanogenmod 10. JB 4.2
Samsung Galaxy Tab 10: Stock CM10.1 JB 4.2
Launcher:Nova Launcher Prime
SMS:AOSP SMS / Facebook Messenger
Video Player:MX Video Player / DICE player / VLC (in that order)
Audio Player:Spotify
News:Pulse
Backup:Titanium Backup(apps)

The Following User Says Thank You to mattisdada For This Useful Post: [ Click to Expand ]
 
gnan10
Old
#6  
gnan10's Avatar
Senior Member
Thanks Meter 91
Posts: 441
Join Date: Apr 2011
Location: andhra-kdp
Quote:
Originally Posted by mattisdada View Post
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....?????
 
HAvoktek
Old
#7  
HAvoktek's Avatar
Senior Member
Thanks Meter 43
Posts: 242
Join Date: Jan 2010
Location: Cleveland, OH
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!
LG G3 "SnowGhost" D850 Edition

I've worked with those guys for years. They may seem like Apple IOS sheep errr'.....victims, but they're loyal!!
 
mattisdada
Old
#8  
mattisdada's Avatar
Senior Member - OP
Thanks Meter 49
Posts: 257
Join Date: Feb 2010
Location: Melbourne
Quote:
Originally Posted by HAvoktek View Post
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!
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.....

Samsung Galaxy S 4: Cyanogenmod 10. JB 4.2
Samsung Galaxy Tab 10: Stock CM10.1 JB 4.2
Launcher:Nova Launcher Prime
SMS:AOSP SMS / Facebook Messenger
Video Player:MX Video Player / DICE player / VLC (in that order)
Audio Player:Spotify
News:Pulse
Backup:Titanium Backup(apps)

The Following User Says Thank You to mattisdada For This Useful Post: [ Click to Expand ]
 
jeromepaez
Old
#9  
jeromepaez's Avatar
Junior Member
Thanks Meter 0
Posts: 4
Join Date: Apr 2012
Location: Mandaluyong
Question 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
Old
#10  
mattisdada's Avatar
Senior Member - OP
Thanks Meter 49
Posts: 257
Join Date: Feb 2010
Location: Melbourne
Quote:
Originally Posted by jeromepaez View Post
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.)

Samsung Galaxy S 4: Cyanogenmod 10. JB 4.2
Samsung Galaxy Tab 10: Stock CM10.1 JB 4.2
Launcher:Nova Launcher Prime
SMS:AOSP SMS / Facebook Messenger
Video Player:MX Video Player / DICE player / VLC (in that order)
Audio Player:Spotify
News:Pulse
Backup:Titanium Backup(apps)


The Following User Says Thank You to mattisdada For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes