[HOWTO] mount EMMC and External SD on CM7 as it is on Stock ROMs - T-Mobile Samsung Galaxy S II SGH-T989

Hello Everyone.
In this post, I would like to show how to mount Internal SD card and External SD card when using Cyanogenmod 7 ROM.
I had some issues because CM7 mounts the internal SD card under /mnt/emmc and mounts external SD card under /mnt/sdcard.
As you know, there are many applications that download data using /mnt/sdcard as path and if you have CM7 way of mounting these apps won't work.
So to mount Internal SD card to /mnt/sdcard and External SD card to /mnt/sdcard/external_sd as it is done on Stock ROMs proceed with the following:
1 - Open the file /etc/vold.fstab with your preferred text editor (I use root Explorer) and find and modify the last lines as below an then save:
# internal sdcard
dev_mount emmc /mnt/sdcard 28 /devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0
# external sdcard
dev_mount sdcard /mnt/sdcard/external_sd auto /devices/platform/msm_sdcc.3/mmc_host/mmc2/mmc2
# otg sdcard
usb_mount sdcard2 /mnt/sdcard/usbStorage auto /devices/platform/msm_hsusb_host.0
#end line
2 - Open the file /system/build.prop with your preferred text editor and find and modify the following lines as it is show an then save:
# notify vold we have internal and external sd
ro.additionalmounts=/mnt/sdcard/external_sd
ro.vold.switchablepair=/mnt/sdcard/external_sd,/mnt/sdcard
3 - Reboot the phone and voilá
This procedure worked for me and I have no issues to mount both my Internal and External SD cards when plugging the phone on my laptop.

a good guide indeed for the CM7 ROM users
I did something similar for all my Gameloft games, EA games, Glu games, and DATA partition, and Download, and all the other stuff, basically i mounted everything off to my 64 GB SD card instead of internal SD
lets give this topic some flight time, stuck for a month, it'll come off by itself
also added to main INDEX

Thanks AllGamer...

thanks, i was looking for something like this for a while.

Thanks so much for this. Thanks a bunch!!!

ICS
Can someone who had flashed ICS Alpha builds tell us if this procedure works on them?
Thanks and I am glad I'd helped someone by doing this post

Testing this out right now on Isotope, let's all keep our fingers crossed.

talmeida said:
Hello Everyone.
In this post, I would like to show how to mount Internal SD card and External SD card when using Cyanogenmod 7 ROM.
I had some issues because CM7 mounts the internal SD card under /mnt/emmc and mounts external SD card under /mnt/sdcard.
As you know, there are many applications that download data using /mnt/sdcard as path and if you have CM7 way of mounting these apps won't work.
So to mount Internal SD card to /mnt/sdcard and External SD card to /mnt/sdcard/external_sd as it is done on Stock ROMs proceed with the following:
1 - Open the file /etc/vold.fstab with your preferred text editor (I use root Explorer) and find and modify the last lines as below an then save:
# internal sdcard
dev_mount emmc /mnt/sdcard 28 /devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0
# external sdcard
dev_mount sdcard /mnt/sdcard/external_sd auto /devices/platform/msm_sdcc.3/mmc_host/mmc2/mmc2
# otg sdcard
usb_mount sdcard2 /mnt/sdcard/usbStorage auto /devices/platform/msm_hsusb_host.0
#end line
2 - Open the file /system/build.prop with your preferred text editor and find and modify the following lines as it is show an then save:
# notify vold we have internal and external sd
ro.additionalmounts=/mnt/sdcard/external_sd
ro.vold.switchablepair=/mnt/sdcard/external_sd,/mnt/sdcard
3 - Reboot the phone and voilá
This procedure worked for me and I have no issues to mount both my Internal and External SD cards when plugging the phone on my laptop.
Click to expand...
Click to collapse
does it work for other devices cm7 roms??

tried it and didn't work for me. Might have typed it wrong. Will try again.
I only used the file browser to see if i can access both the emmc and the sd card but could only get to the emmc

I will try...

talmeida said:
Hello Everyone.
In this post, I would like to show how to mount Internal SD card and External SD card when using Cyanogenmod 7 ROM.
I had some issues because CM7 mounts the internal SD card under /mnt/emmc and mounts external SD card under /mnt/sdcard.
As you know, there are many applications that download data using /mnt/sdcard as path and if you have CM7 way of mounting these apps won't work.
So to mount Internal SD card to /mnt/sdcard and External SD card to /mnt/sdcard/external_sd as it is done on Stock ROMs proceed with the following:
1 - Open the file /etc/vold.fstab with your preferred text editor (I use root Explorer) and find and modify the last lines as below an then save:
# internal sdcard
dev_mount emmc /mnt/sdcard 28 /devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0
# external sdcard
dev_mount sdcard /mnt/sdcard/external_sd auto /devices/platform/msm_sdcc.3/mmc_host/mmc2/mmc2
# otg sdcard
usb_mount sdcard2 /mnt/sdcard/usbStorage auto /devices/platform/msm_hsusb_host.0
#end line
2 - Open the file /system/build.prop with your preferred text editor and find and modify the following lines as it is show an then save:
# notify vold we have internal and external sd
ro.additionalmounts=/mnt/sdcard/external_sd
ro.vold.switchablepair=/mnt/sdcard/external_sd,/mnt/sdcard
3 - Reboot the phone and voilá
This procedure worked for me and I have no issues to mount both my Internal and External SD cards when plugging the phone on my laptop.
Click to expand...
Click to collapse
Oh man, thank you!
This worked like a charm on my Epic Touch 4G.

tried this in a aokp rom(hydrogen), and it doesn't work.

Why not mount the emmc to /mnt/sdcard/external_sd in addition to /mnt/eemc for backward compatibility?

Does it work on CM9 too?

I had ICS Passion v13 installed on my Samsung Vibrant before, and my vold.fstab file is a bit different from cm7's. I now have cm7 installed but the vold.fstab file doesn't seem to have changed with the change of roms.
It would be great if you could post the fstab and build.prop files somewhere online from where I can download it and replace in my phone because I don't want to mess up again(I encountered the "encryption failed" bug in ICS today and I tore my hair out fixing that..so yeah.)
Thank you.

Anyone else that's on AOKP have any luck getting this to work??? The flip-flooped SD cards on CM9/AOKP is seriously annoying..
Sent from my AOKP'd T989

This is the vold.fstab file in my Samsung Vibrant:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## 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
######################
# internal sdcard
dev_mount emmc /mnt/emmc 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0
# external sdcard
dev_mount sdcard /mnt/sdcard auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2
As you can see, it is differs from the one you posted in the guide. What steps should I take now?

Can anyone show me how to do this with captivate cm7?
Please and thanks!

fresherthanU said:
Anyone else that's on AOKP have any luck getting this to work??? The flip-flooped SD cards on CM9/AOKP is seriously annoying..
Sent from my AOKP'd T989
Click to expand...
Click to collapse
has anyone found a solution for AOKP yet? I find that many of my apps such as google music and my camera don't save files properly. This has caused me to switch back to juggernaut.
major thanks to anyone who can help!

Related

[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.
lentm said:
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.
Click to expand...
Click to collapse
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
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.
godsmacked4653 said:
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.
Click to expand...
Click to collapse
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.
lentm said:
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.
Click to expand...
Click to collapse
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 [b]3 /devices/platform/msm_sdcc.3/mmc_host/mmc2[/b]
dev_mount emmc /mnt/emmc [b]auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1[/b]
(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.
ardax said:
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 [b]3 /devices/platform/msm_sdcc.3/mmc_host/mmc2[/b]
dev_mount emmc /mnt/emmc [b]auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1[/b]
(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.
Click to expand...
Click to collapse
I was looking for this. will try now. Thank you!
edit: just tried this, it didn't work. had to replace to original one.
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.
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?
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
try Remount sd app =) it worked for me well =) dont forget thanks button =D
http://forum.xda-developers.com/show...1#post30146401
Do a nandroid just in case, and then flash this thru recovery. http://dinc.does-it.net/Mods/AOSP_Swap_EMMC_and_SD.zip
And here is a flashable to revert the swap. http://dinc.does-it.net/Mods/AOSP_Original_vold.fstab.zip
please help me (
it didnot work

For all those don't have sd card

if you don't have a sd card and you want to get benefit from your internal storage in froyo b2, you can make the system to deal with internal storage as an external sd card, and you can use gallery,music and camera with your internal storage and enhance your experience>>
yo have to edit the following file
"/system/etc/vold.fstab" with any editor like ASTRO or ES explorer
you have to change the following:
dev_mount sdcard /mnt/sdcard auto /devices/platform/s3c-sdhci.0/mmc_host/mmc0
to:
dev_mount sdcard /mnt/sdcard auto /devices/platform/s3c-sdhci.1/mmc_host/mmc1
and its better to remove mount command of internal storage in "/init.rc"
by comment the following "just put a(sharp #) before it"
#mount vfat /dev/block/mmcblk0p1 /storage
then reboot your android and enjoy !
please be aware that this fix work in case YOU DON'T HAVE AN EXT. SD CARD
in case you have one maybe the changes may not be as above
thank you all.
Hi Louis, could you please advise if there shall be other line to edit, so the new "SDcard" will have the asec folder functions?
something like this
http://forum.xda-developers.com/showthread.php?t=1088474
thank you for your reply.
but would you please explain what is /asec folder functions/
i checked your link but the modded vold.fstab there has some additional lines and i'm really not a professional and i'm not sure if those commands will be applicable in our omnia

[A] CM10 Reverse mounting Internal SD with External, Saving camera pics to SD

I'm not responsible if you do harm to your phone, I'm sure if you mess up you can just reflash cm10 through CWM and be fine though.
backup file /etc/vold.fstab
edit file /etc/vold.fstab (i used ES File Explorer)
towards the end of the file you will see
Original (FYI these mount points are specific to T989)
# internal sdcard
dev_mount sdcard /storage/(some long path)
# external sdcard
dev_mount external_sd /storage/(some long path)
swap the mount points for these 2 dev_mount
Example
# internal sdcard
dev_mount external_sd /storage/(some long path)
# external sdcard
dev_mount sdcard /storage/(some long path)
Save and reboot
Click thanks if this helped

[Q] Merging or changing internal storage partitions?

I am running aokp jb milestone 1 on a Samsung Galaxy s2 (T-Mobile) and ran into a problem with downloading apps. The Play Store said that there was "Insufficient storage available" when i had 10 gb of storage left that i knew of. This led me to the storage section of the settings where i found that it was partitioned. One part for apps and the other part for almost everything else. I wanted to know if there was a way to change the sizes of the partitions or merge them completely. I found a temporary fix with this app called app2sd which can move apps between the partitions, but that's just an annoyance.
Also, just as a side question, why are some apps in the bigger partition and some in the smaller? Shouldn't they all be in the smaller one allocated for apps?
Thanks in advance
groudonrules said:
I am running aokp jb milestone 1 on a Samsung Galaxy s2 (T-Mobile) and ran into a problem with downloading apps. The Play Store said that there was "Insufficient storage available" when i had 10 gb of storage left that i knew of. This led me to the storage section of the settings where i found that it was partitioned. One part for apps and the other part for almost everything else. I wanted to know if there was a way to change the sizes of the partitions or merge them completely. I found a temporary fix with this app called app2sd which can move apps between the partitions, but that's just an annoyance.
Also, just as a side question, why are some apps in the bigger partition and some in the smaller? Shouldn't they all be in the smaller one allocated for apps?
Thanks in advance
Click to expand...
Click to collapse
How about just switching your internal for your external sd? Once you edit your voldfstab file in system/etc you will have your external as your internal and can install whatever files you want to it. So if you have a 32 gb card that will be your internal space once you make the switch.
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## - List of sysfs paths to source devices
## storage_struct - ex) series, "/mnt/sdcard/extStorages" / parallel
######################
# internal sdcard
dev_mount sdcard /storage/sdcard0 28 /devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0
# external sdcard
dev_mount external_sd /storage/sdcard1 auto /devices/platform/msm_sdcc.3/mmc_host/mmc2/mmc2
#otg sdcard
dev_mount sda /mnt/usbdisk auto /devices/platform/msm_hsusb_host.0
All you need to do is change sdcard0 to sdcard1 where it says # internal sdcard
and change sdcard1 to sdcard0 where it says # external sdcard
Reboot and it will be switched. To return to normal just change numbers back and reboot and it will be like it was before the switch

Swap internal SD and ext_sd

Hello,
I have some trouble with a P6 firmware B111
The Phone have 8Go + micro SD of 32Go
/sdcard
/storage/sdcard0
/mnt/sdcard
are shortcut to the "internal SD"
/storage/emulated/0
And
/storage/sdcard0
/mnt/sdcard2
are shortcut to th external SD (of 32go)
/mnt/ext_sdcard
I want use offline GPS tomtom but all maps take 7go.
i can easily put on my exernal SD
But the app install it on the /sdcard
so not enought memory.
Any trick to mount /sdcard to my exernal sd?
I have already change my /system/etc/vold.fstab:
Code:
dev_mount sdcard /mnt/ext_sdcard auto /devices/platform/hi_mci.0/mmc_host/mmc1
but doesn't work even after reboot
Same with the app root external 2 internal SD of codlab.
In official china rom for p6 version B116 has an option already to chose external sd card as primary storage..you can try that rom and copy vold.fstab
Sent from my HUAWEI P6-U06 using Tapatalk 2
Especially for Tomtom this trick helps to me:
Root you device.
Install Tomtom and download map to internal storage first
Install FolderMount from Play
In FolderMount, create pair between /sdcard/tomtom and ext_sdcard/tomtom
This will move map to external SD card and create link from internal storage.
What a great a simple 'out of the box' thought. It works perfect for me!!!
You can use this script, just copy to /system/etc/init.d.
Script:
"mount -t vfat -o umask=0000 /dev/block/vold/179:33 /storage/sdcard0
mount -o bind /data/media /storage/sdcard1"

Categories

Resources