Change internal and external sdcard mounts

Search This thread

fuzzynco

Senior Member
Oct 29, 2008
581
35
HTC One Max
Samsung Galaxy S9
Doesn't /sdcard have to be mounted to mount /sdcard/ext_sd?
I mean you have the second level directory being mounted before the
the base on which its mounting?


I still wonder if the internal memory is still a real fat32 partition or like ICS
its a FUSE remounted directory to allow for devices without sd slots.

I'm starting to think maybe its a remount because if it were a separate real partition
erasing /data would not erase it.

If indeed its a 'special case' we need to be careful what we are telling the OS to do.

I was going to exchange the mount points too but still wondering how to determine if its a real fat32 or a media transfer protocol remount via a redirect (fuse).
 
Last edited:

JohnShaft69

Senior Member
Feb 3, 2009
204
24
i just made the edit...weird that the file in system/etc was already edited this way... rebooting/testing as soon as i have backed up with TB...will post results

ok so i am running bamf rom 1.0 with ziggy kernel(1.83).. i only had to modify file that was in the etc folder ONLY...TOTALLY WORKS!
I installed apps...checked sizes...this works GREAT!
Apps seem to load faster off of the class 10 sd i am using!

thanks!
 
Last edited:

maniac2k

Senior Member
Jun 28, 2009
541
112
Code:
dev_mount sdcard2 /mnt/sdcard/ext_sd 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2

That should do it. If not, then it can't be done this way.

Hey this worked. Thanks! Next question, is it a problem to not mount the internal ram sdcard all together? Im thinking to just put the following line in only

dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2
 

feralicious

Senior Member
Jun 9, 2011
1,821
696
City of Angels
i just made the edit...weird that the file in system/etc was already edited this way... rebooting/testing as soon as i have backed up with TB...will post results

ok so i am running bamf rom 1.0 with ziggy kernel(1.83).. i only had to modify file that was in the etc folder ONLY...TOTALLY WORKS!
I installed apps...checked sizes...this works GREAT!
Apps seem to load faster off of the class 10 sd i am using!

thanks!
So you're putting your apps on the external card? Sorry if that's obvious but I didn't understand half of what I read in this thread. :eek:
I've been looking for a good article on how the folder/file structure of Android is laid out since when I look at it seems like a big mess to me but I haven't found one. I'm afraid to root without understanding it more plus I want to figure out where I think I would prefer to have things kept.
 

lennysh

Senior Member
Sep 14, 2007
521
5
White Oak, NC
www.lennysh.com
Code:
dev_mount sdcard2 /mnt/sdcard/ext_sd 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2

That should do it. If not, then it can't be done this way.

Hey this worked. Thanks! Next question, is it a problem to not mount the internal ram sdcard all together? Im thinking to just put the following line in only

dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2

I hate to say this, but this still isn't right even though it appears to be working. When I do this edit, the folders that were in SDCARD that should have moved to SDCARD2, are still in SDCARD. The only difference is SDCARD2 is now empty, and all my old EXT_SD folders are also in SDCARD. So its like a mixture of the two. I even commented out the line to make SDCARD2 (RAM) and only mount the EXT_SD to SDCARD, and they both still mounted and appeared the same way as with the MOD EDIT above. We need another method. This one still isn't even stable for me.

---------- Post added at 07:26 AM ---------- Previous post was at 07:13 AM ----------

First of all, please switch them around. Seems doing that gives me the correct folder structure. Thought I had already done this in this order, but maybe not. Will post back if I have the same issues with them unmounting, and/or showing up as corrupted.

Code:
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2
dev_mount sdcard2 /mnt/sdcard/ext_sd 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0
 
Last edited:

fuzzynco

Senior Member
Oct 29, 2008
581
35
HTC One Max
Samsung Galaxy S9
Still working this out in my head

Code:
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2
dev_mount sdcard2 /mnt/sdcard/int_sd 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0

I guess, in case some semi-aware function looks for /sdcard/ext_sd I should
ln -s /sdcard /sdcard/ext_sd (/sdcard/ext_sd points to /sdcard?)

With this, I should see

Code:
/sdcard on /devices/platform/msm_sdcc.3/mmc_host/mmc2 at /mnt/sdcard 

/sdcard2 on /mnt/sdcard/int_sd 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0 @ /mnt/sdcard/int_sd

right?


I'm hoping the normal usb disk selection will still attempt to mount
/sdcard and /sdcard2 to win 7 (with reversed contents).

I'm primarily concerned that wipes erase /sdcard and all the un-updated
GB apps still look for /put user data in /sdcard.

--

a related but off topic question, since ICS has a completely different
partitioning scheme, is it a reasonable to think the ICS official will require
a wipe so it can repartition? If they replace the radio or where ever they store
the lock / unlock bits, will the same unlock.bin re-unlock it?


Thanks
 

maniac2k

Senior Member
Jun 28, 2009
541
112
Ok I did a little testing. Moved everything from internal sdcard to external. Nothing is writing to internal so that's good. Booted into cwm and it sees my actual sdcard as normal. Removed sdcard and booted up phone. Can not access internal sdcard. Somehow it is still related to the mount. Doing some more digging.
 

maniac2k

Senior Member
Jun 28, 2009
541
112
Orig Code that appeared to work but internal ram still mounted inside external sdcard

Code:
dev_mount sdcard2 /mnt/sdcard/ext_sd 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0

dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2

Tried to mount sdcard2 as /mnt/ext_sd but it didnt work.

Code:
dev_mount sdcard2 /mnt/ext_sd 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0

dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2


Can anyone explain the /devices/platform/msm_sdcc.1/mmc_host/mmc0

And how is partition 37 derived in dev_mount sdcard2 /mnt/ext_sd 37
 
Last edited:

carm01

Senior Member
Jun 17, 2011
602
230
Ohio - land of the boring
just poorly designed

I hate to say it, but it seems like this is just a poor design blunder HTC did, and VZW decided not to address.

Talk about quality control; lack of it lolz

edit: hopefully the devs will address when creating roms; assuming i am understanding this correctly?
 
Last edited:

fuzzynco

Senior Member
Oct 29, 2008
581
35
HTC One Max
Samsung Galaxy S9
That's correct

As I understand it, the /sdcard & /sdcard2 (/sdcard/ext_sd) issue is
really implemented in Ice Cream Sandwich's changes.

HTC sort of 'back ported' the idea to the newer HTC devices, hence
the problem with the Rezound.

In ICS /sdcard represents the user writable storage space
which on devices without a real sd card (like Galaxy Nexus)
give them a phoney /sdcard to write to.

The implementation, again, as I understand it, is to have a real
ext3(ext4) file system containing /data (and a subdirectory
named /sdcard), the /sdcard directory is FUSE remounted
as a redirected file system with the filtered attributes behaving like a
FAT32 file system. This is then mounted as /sdcard giving
those other devices a pseudo sd card. The problem is devices
the do have real sd cards, since the name /sdcard is already used
by the 'kludged' file system, we get /sdcard2 (or /sdcard/ext_sd or
both). While ICS does support USB Mass Storage, the Nexus doesn't
have any so it didn't, so USB MTP (Media Transport Protocol over USB)
is used to export the /sdcard file system, in ICS. I'm guessing
the pseudo-sdcard will have to be exported via MTP because
it can co-mount while mass storage has to dedicate the filesystem
to one side or the other and /data has to be available to run the OS.
The real sd card being a fat32 should still export via USB mass storage.



What HTC did for GB, I believe, is still have a real fat32 file system
(partition 32), but 'back port' the concept of /sdcard being internal
and not external space. I'm guessing the ICS OTA, when it comes,
will require a wipe, to facilitate repartitioning the internal flash,
to combine /data and /sdcard and implement the changes to support
the MTP pseudo-partition.

My feeling, is the App Dev's need to update to a more current SDK
to be aware of the changes and support an app setting to tell the app
where to look for its data, rather than assume /sdcard is an sd card.

Amazon's Kindle department told me 3.3.1.1. was supposed to address
this, but failed, so they are working on a fix for the fix. Barnes and Noble
said their Nook app also was being updated to accommodate the OS
changes.
 

derek4484

Senior Member
Jul 15, 2010
641
27
Columbia, SC
I think the way this phone is set up is normal. I had a Samsung Galaxy S for two years and rarely ever had a true microSD card plugged in. The internal 16GB of memory always mounted as /sdcard. When I plugged in a microSD card it always mounted as /sdcard/ext_sd or was at /sdcard2. The only thing that was different is, the sdcard memory was never wiped with factory resets or loading new ROMS at all. You had to manually go in and format the sdcard.
 

babribeiro

Member
Dec 6, 2011
45
4
Either Lisbon or Shanghai
Hi guys , I got some problem which i think it is related with what you guys talking here. I did read the thread but i got quite confused.
After some roms installs and factory resets and so on I got a problem also deleted all the folders in the internal and external and i think i deleted something i should not.

I cannot see the 1.7 gg internal storage
I can only see it when i insert a External SD-card.

Meaning
( When no External SDcard inserted):
at Storage :
SD card :"Unavailable" in all fieds
USB Storage: "Anavailable" in all fields
Device memory: 0.97 GB

(With External SDcard inserted)
SD card: "1.7GB"
USB storage"7.39"


The external card is a 8GB.

With root explorer going to the folder " /sdcard" it shows the space of the 7.4GB and after the "/sdcard/external_sd" shows 1.7gb ( used + free)
if i remove the external card , cannot mount the SDcard(internal).
I wanna ask how can i return to the previous state, factory one , with the 1.7 as internal and the 8gb as external.

Thanks in advance and sorry for my noobness

My phone is a Samsung Galaxy W i8150.
 
Last edited:

andresinibus

Member
Feb 5, 2009
30
0
I kno it's an old thread but I did the swap and it works now I show the internal as 7.39 gigs n the external as 828 MB the thing is I still can't install more apps it's on a tablet and it shows internal storage at 0.99 gig that didn't change at all it also shows the sdcard @ 7.39 gig n the extsd @828 MB how can I increase the internal storage to at least 3 gigs or 4 to install more apps thanks for any help also why does it shows as htc passion?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I do not like how the internal sdcard is the default data storage instead of the external sdcard. I've had to factory reset a couple times now and all app data, downloads, etc.. were erased. That and if something happens to the phone the data would be lost. I remembered it was like this on one of the tabs I had so dug around a bit and found a mod to the vold.fstab file.

    This file is in etc/ and also system/etc/
    (not sure why it says HTC Passion???)

    Code:
    ## Vold 2.0 fstab for HTC Passion
    #
    ## - San Mehat (san@android.com)
    ## 
    
    #######################
    ## 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 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0
    dev_mount sdcard2 /mnt/sdcard/ext_sd auto /devices/platform/msm_sdcc.3/mmc_host/mmc2

    If I read the mod correctly you would have to change the sdcard to sdcard2 and vice versa like this:

    Code:
    dev_mount sdcard2 /mnt/sdcard 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0
    dev_mount sdcard /mnt/sdcard/ext_sd auto /devices/platform/msm_sdcc.3/mmc_host/mmc2

    What I'm not sure on is if it is the same for phones as it is for tablets and is this the correct way to change the sdcard mounts? I am thinking the mod needs to be done on both files and if this is the correct way it may be hit or miss if the mod sticks after a temp root reboot.
    1
    Do u mean like if ur downloading files and how data is stored that way? Just curious, because it is annoying to me as well.

    "BEATin" through "REZOUNDingly"

    Some applications are correctly downloading files to the external SD card where storage is supposed to go. But other applications (usually older not updated) have the tendency to use the internal SD card. This becomes an issue when you factory reset and the internal SD is wiped. Some people have lost their data unexpectedly.
    1
    Code:
    dev_mount sdcard2 /mnt/sdcard/ext_sd 37 /devices/platform/msm_sdcc.1/mmc_host/mmc0
    dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2

    That should do it. If not, then it can't be done this way.