5,596,431 Members 40,052 Now Online
XDA Developers Android and Mobile Development Forum

[Q] How to mount EMMC as SDCARD?

Tip us?
 
lentm
Old
#1  
Senior Member - OP
Thanks Meter 14
Posts: 155
Join Date: Dec 2008
Default [Q] How to mount EMMC as SDCARD?

I am using aosp roms, so there is no way to save my pictures and videos i take to emmc.

I searched some methods on google.

Now i realized i have to fix vold.fstab file in system/etc

but i have no idea on the codes like this.

Is it possible to mount emmc as sdcard, and mount sdcard as emmc or something else such as sdcard2 or something.

one of them i found was talking about how to bypass apps that require an sd card with no sdcard.

but i wanna use both of them, internal and sdcard together.
Samsung Galaxy Nexus of Verizon Wireless
Nexus 7 16GB Wi-Fi
*Why iDisk, when Dropbox is free? CLICK!*
 
alanthemanofchicago
Old
(Last edited by alanthemanofchicago; 11th April 2011 at 02:24 PM.) Reason: spelling fix
#2  
Senior Member
Thanks Meter 29
Posts: 255
Join Date: Dec 2010
Location: 29.e2ade657b84e, -57.9f2a497fa5d4

 
DONATE TO ME
Quote:
Originally Posted by lentm View Post
I am using aosp roms, so there is no way to save my pictures and videos i take to emmc.

I searched some methods on google.

Now i realized i have to fix vold.fstab file in system/etc

but i have no idea on the codes like this.

Is it possible to mount emmc as sdcard, and mount sdcard as emmc or something else such as sdcard2 or something.

one of them i found was talking about how to bypass apps that require an sd card with no sdcard.

but i wanna use both of them, internal and sdcard together.
IF emmc is supported, you can (maybe?) make it work by running the following in a terminal (on the phone). Worked for me in CM 6.0, never tried in Gingerbread. (# is prompt)
*Unmount SD card via menu 1st*
#cd /sdcard
#ls
*Nothing should show up*
If nothing shows up the SD has been unmounted properly
Remove it now if possible
#cd /mnt/emmc
#ls
IF emmc files show up, continue.
If not, your rom doesn’t support emmc, and there is really not much you can do
#mnt /mnt/emmc /mnt/sdcard
Current Phone Galaxy Nexus (toroplus)
Current Radio - Latest
Current Rom - Something
Alternate:
HTC MyTouch 3G (32B)
"Talk is cheap, show me the code" -Linus Torvalds
Yes, I am a Sophomore. No, you are not better than me.
Support those with Taco Bell addictions by donating
 
godsmacked4653
Old
#3  
godsmacked4653's Avatar
Senior Member
Thanks Meter 87
Posts: 446
Join Date: Apr 2010
I think they want to use both the SD card and EMMC together, like in a Sense rom, not replace the SD with EMMC.
AFAIK, you can't *save* pictures and things to EMMC on AOSP roms, but I'm pretty sure they can still read any media from it. So you'd just have to put anything you wanted on the internal storage from your computer. I'm pretty sure that's how CM6 was set up, anyway.
I never really use my internal storage, though, so I could be way off.
 
alanthemanofchicago
Old
#4  
Senior Member
Thanks Meter 29
Posts: 255
Join Date: Dec 2010
Location: 29.e2ade657b84e, -57.9f2a497fa5d4

 
DONATE TO ME
Quote:
Originally Posted by godsmacked4653 View Post
I think they want to use both the SD card and EMMC together, like in a Sense rom, not replace the SD with EMMC.
AFAIK, you can't *save* pictures and things to EMMC on AOSP roms, but I'm pretty sure they can still read any media from it. So you'd just have to put anything you wanted on the internal storage from your computer. I'm pretty sure that's how CM6 was set up, anyway.
I never really use my internal storage, though, so I could be way off.
Depends on the rom. Most AOSP ones now support eMMC scanning, but some still do not. Also, you might not be able to save pictures without using my solution, but you can use any other file manager / save window to navigate to /mnt/emmc and change/save things.
Current Phone Galaxy Nexus (toroplus)
Current Radio - Latest
Current Rom - Something
Alternate:
HTC MyTouch 3G (32B)
"Talk is cheap, show me the code" -Linus Torvalds
Yes, I am a Sophomore. No, you are not better than me.
Support those with Taco Bell addictions by donating
 
ardax
Old
(Last edited by ardax; 13th April 2011 at 09:22 PM.) Reason: Screwed up my example!
#5  
Senior Member
Thanks Meter 65
Posts: 334
Join Date: Jul 2010
Quote:
Originally Posted by lentm View Post
Now i realized i have to fix vold.fstab file in system/etc

Is it possible to mount emmc as sdcard, and mount sdcard as emmc or something else such as sdcard2 or something.
Absolutely. The "easy" way to do it is to modify /system/etc/vold.fstab. Below is the default vold.fstab file from CM7...

Code:
## Vold 2.0 fstab for HTC Incredible
#
## - Koushik Dutta
## 

#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...> 
## label        - Label for the volume
## mount_point  - Where the volume will be mounted
## part         - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################

# Mounts the first usable partition of the specified device
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
dev_mount emmc /mnt/emmc 3 /devices/platform/msm_sdcc.3/mmc_host/mmc2
What you want to do is modify the last two lines and swap the sysfs paths, so it looks like the following:

Code:
dev_mount sdcard /mnt/sdcard 3 /devices/platform/msm_sdcc.3/mmc_host/mmc2
dev_mount emmc /mnt/emmc auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
(Edit: I forgot to include the partition # in the bits of data that need moved. Doh!)

After putting the modified file in place and rebooting, the internal flash (normally known as emmc) will be mounted and labeled as /mnt/sdcard. Everything that uses the sdcard for storage will now be reading and writing to emmc. Likewise, the sdcard will be mounted to /mnt/emmc, so it's still available and readily visible.

The important thing here is to make sure that you have good backups of the content of both storage spaces, and that you remember which is which. It's crucial when you update your ROM, since it will overwrite the vold.fstab file back to default.

Also, before you do this, make sure that you migrate any apps you have stored on SD back to internal storage, or else you'll have to reinstall them afterwards.
The Following User Says Thank You to ardax For This Useful Post: [ Click to Expand ]
 
lentm
Old
(Last edited by lentm; 15th April 2011 at 02:43 AM.)
#6  
Senior Member - OP
Thanks Meter 14
Posts: 155
Join Date: Dec 2008
Quote:
Originally Posted by ardax View Post
Absolutely. The "easy" way to do it is to modify /system/etc/vold.fstab. Below is the default vold.fstab file from CM7...

Code:
## Vold 2.0 fstab for HTC Incredible
#
## - Koushik Dutta
## 

#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...> 
## label        - Label for the volume
## mount_point  - Where the volume will be mounted
## part         - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################

# Mounts the first usable partition of the specified device
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
dev_mount emmc /mnt/emmc 3 /devices/platform/msm_sdcc.3/mmc_host/mmc2
What you want to do is modify the last two lines and swap the sysfs paths, so it looks like the following:

Code:
dev_mount sdcard /mnt/sdcard 3 /devices/platform/msm_sdcc.3/mmc_host/mmc2
dev_mount emmc /mnt/emmc auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
(Edit: I forgot to include the partition # in the bits of data that need moved. Doh!)

After putting the modified file in place and rebooting, the internal flash (normally known as emmc) will be mounted and labeled as /mnt/sdcard. Everything that uses the sdcard for storage will now be reading and writing to emmc. Likewise, the sdcard will be mounted to /mnt/emmc, so it's still available and readily visible.

The important thing here is to make sure that you have good backups of the content of both storage spaces, and that you remember which is which. It's crucial when you update your ROM, since it will overwrite the vold.fstab file back to default.

Also, before you do this, make sure that you migrate any apps you have stored on SD back to internal storage, or else you'll have to reinstall them afterwards.
I was looking for this. will try now. Thank you!


edit: just tried this, it didn't work. had to replace to original one.
Samsung Galaxy Nexus of Verizon Wireless
Nexus 7 16GB Wi-Fi
*Why iDisk, when Dropbox is free? CLICK!*
 
brando56894
Old
#7  
Senior Member
Thanks Meter 153
Posts: 1,404
Join Date: Dec 2010

 
DONATE TO ME
run the following in a terminal or via ADB: mount | grep emmc to figure out what block its named as then run switch to the root account using su then type umount /emmc to unmount the emmc partition. Figure out what sdcards device name is by doing mount | grep sdcard. Unmount it and mount sdcard's device name to /emmc and vice versa.

This wont persist after a reboot but its a good way to try and get it to work without screwing stuff up. Once you get it to work put the values in fstab.
 
avaggo82
Old
#8  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Dec 2008
Default Any suggestions?

Hello all,

Hopefully someone more apt than myself can provide some insight. I am running Synergy 3D version on my DINC. I am trying to either make the eMMc an addition SD card mount point, in order to store apps, etc or partition it to use as vram in some way.

I successfully changed the eMMc into SD card by modding the vold.fstab (per post here), the problem is, DINC will not recognize SD as eMMc.

Any suggestions will be greatly appreciated.

Also, would it even be conceivably possible to partition eMMc as vram?
 
jago25_98
Old
(Last edited by jago25_98; 20th April 2012 at 12:51 AM.)
#9  
Senior Member
Thanks Meter 25
Posts: 360
Join Date: Jul 2007
Darn shame not to be able to use both the emmc and sdcard at the same time. You could do it by converting the sdcard to ext2/3/4 but then when you plug into a non linux box you'll need a ext2/3/4 driver.

Is there a filesystem that is widely readable for both linux and windows?

I guess it might not be a problem if the internal sdcard is ext3 because you could still have the emmc as fat.

Thoughts?

Oh crap... I just tried changing the emmc mount point in fstab to /mnt/sdcard/external_sd and no I've got no boot, presumable because android won't accept a mount point over something that is already mounted (linux can).... I need to find a way to recover...

Would somebody be so kind as to cat /system/etc/vold.fstab here for me? I backed it up... but to the internal sdcard!

Hang on... I can't paste that into vi... vi is bonkers for some reason, not recognising the a key...
I also have nowhere for a non su adb to push the file... or any other files... (permission denied)
and I can't get the CWM recovery mode for some reason....


"Also, would it even be conceivably possible to partition eMMc as vram?"
^ yes it's possible. I'm not that familiar with android yet but I'm sure it's possible
RSS feed for NookTouch Dev forum: http://forum.xda-developers.com/exte...&forumids=1201 Refer to each phone by it's model name where possible - i.e. "i9000", not "Galaxy S" - easier searching
 
mido_love_maker
Old
#10  
Senior Member
Thanks Meter 4
Posts: 128
Join Date: Feb 2011
try Remount sd app =) it worked for me well =) dont forget thanks button =D
http://forum.xda-developers.com/show...1#post30146401

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Force Translucent Status Bar in KitKat ROMs with Xposed

It’s been a while since Android 4.4KitKat wasreleased, and we’re slowly … more

Fix the Ambient Light Issues on Your Google Nexus 5 using Xposed

The Google Nexus 5 is a great and rather popular device. This LG-produced … more

Google Glass XE16 Update Factory Image and Rooted Bootloader Now Available

You may recall that early yesterday, we talked about the XE16 … more