• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

SD mount swap!

Search This thread

pwnwolf117

Member
Dec 11, 2011
31
7
Hey everyone, i prefer stuff saved on my external sd and im to lazy to keep editing apps to save to /sdcard2 (if they even let you!) instead of the usual /sdcard, so i made a zip to flash in recovery that swaps mount points. internal mounts at /mnt/sdcard/ext_sd and external is at /mnt/sdcard.

enjoy this guys! it took me like a day solid to figure out how to swap it and then learn how to make a flashable zip :p be nice to me i had never done this before yesterday/part of today
This has been tested on Ineffabilis (gb version) with dsb OC kernel. should work on any GB rezound rom, and unless something changed that i didnt notice it should work on ICS roms. ill edit this as soon as i check, but it will be tomorrow night before i get a chance
flash SwtichMount.zip to switch
flash RestoreMount.zip to restore to original settings

theoretically this should work on some other phones, shoot me a pm with your phone model and any rom for it (or even better the vold.fstab file in
/system/etc) and i can tell you if it should work/edit it to work for you!

Changelog:
v2.1: adds support for some roms
 

Attachments

  • SwitchMount.zip
    143.9 KB · Views: 96
  • RestoreMount.zip
    143.9 KB · Views: 84
  • SwitchMountV2.1.zip
    143.9 KB · Views: 114
Last edited:

mrcrusha829

Senior Member
May 19, 2007
130
24
Hartford, CT
I have done this as well by editing the vold.fstab file and rebooting. The only problem I had was that after making the change I was unable to mount the internal storage as USB drive. The SDcard mounted fine however. So what I have been doing is copying over the original file that I saved on the SDcard if I needed to copy files over to the internal.

Does your method allow for the internal storage to be mounted as a USB drive?
 

pwnwolf117

Member
Dec 11, 2011
31
7
yea it shows up, it seems to take an extra minute or 2.

i had a different way to do it that mounted internal on /mnt/sdcard2 but it had to do with editing ramdisk and was a pain in the a$$
 

maniac2k

Senior Member
Jun 28, 2009
534
110
So the internal ram is mounted as sdcard/ext_sd? Is there any way around this? Does the name ext_sd have some significance? I mean you have a mnt/sdcard which is sdcard dir and mnt/sdcard/sd_ext which is sdcard2 dir. Why can't ext_sd (internal ram) just be mounted as mnt/sdcard2? Thanks!
 

mrcrusha829

Senior Member
May 19, 2007
130
24
Hartford, CT
So the internal ram is mounted as sdcard/ext_sd? Is there any way around this? Does the name ext_sd have some significance? I mean you have a mnt/sdcard which is sdcard dir and mnt/sdcard/sd_ext which is sdcard2 dir. Why can't ext_sd (internal ram) just be mounted as mnt/sdcard2? Thanks!

If you go to the root directory of the phone you will see sdcard and sdcard2. sdcard2 is the exact same folder as mnt/sdcard/sd_ext. The folder mnt/sdcard/sd_ext is basically like having a shortcut to that sdcard2.

---------- Post added at 04:32 PM ---------- Previous post was at 04:29 PM ----------

By the way pwnwolf117.... I flashed your zip and the changes did not stick. I still had to use my method of copying over an edited vold.fstab file that I created to the /etc folder. I am running BAMF gingerbread ROM.
 

maniac2k

Senior Member
Jun 28, 2009
534
110
I understand that and explained that in my original post so I wouldn't get an answer like yours. Please reread my previous post again. My point is, why should internal ram (in this case, ext_sd which isn't external sd) be mounted inside the sdcard folder?
 
Last edited:
  • Like
Reactions: JohnShaft69

pwnwolf117

Member
Dec 11, 2011
31
7
.Why can't ext_sd (internal ram) just be mounted as mnt/sdcard2? Thanks!
I'm working on getting that but I need yo figure out a script that will create /mnt/Sdcard2 on bootup. I know where to put the script but something isn't mounting properly. I'll try to finish it tonight but since I originally posted I've been taking midterm exams or at robotics practice or a competition which im on my way home from now (8pm here) and I left at 5am so I'm exhausted but I'll see what I can throw together. if anybody understands how to add a script to /etc/init.d/ please pm me or reply! and so you all realize this is my first Android phone EVER which I've had for obit a couple months as well as I have no programming experience. so this was a personal project that I released for those who want to try it.


Sent from my sexy otterboxed ADR6425LVW using Tapatalk
 

pwnwolf117

Member
Dec 11, 2011
31
7
I understand that and explained that in my original post so I wouldn't get an answer like yours. Please reread my previous post again. My point is, why should internal ram (in this case, ext_sd which isn't external sd) be mounted inside the sdcard folder?

because that was the one place I KNOW it will mount on the system correctly, but also will mount as USB correctly. /mnt/Sdcard/ext_sd is the default mount point for the external so I just swapped the internal and external mount points

Sent from my sexy otterboxed ADR6425LVW using Tapatalk
 

pwnwolf117

Member
Dec 11, 2011
31
7
.Why can't ext_sd (internal ram) just be mounted as mnt/sdcard2? Thanks!
I'm working on getting that but I need yo figure out a script that will create /mnt/Sdcard2 on bootup. I know where to put the script but something isn't mounting properly. I'll try to finish it tonight but since I originally posted I've been taking midterm exams or at robotics practice or a competition which im on my way home from now (8pm here) and I left at 5am so I'm exhausted but I'll see what I can throw together. if anybody understands how to add a script to /etc/init.d/ please pm me or reply! and so you all realize this is my first Android phone EVER which I've had for obit a couple months as well as I have no programming experience. so this was a personal project that I released for those who want to try it.

I understand that and explained that in my original post so I wouldn't get an answer like yours. Please reread my previous post again. My point is, why should internal ram (in this case, ext_sd which isn't external sd) be mounted inside the sdcard folder?

because that was the one place I KNOW it will mount on the system correctly, but also will mount as USB correctly. /mnt/Sdcard/ext_sd is the default mount point for the external so I just swapped the internal and external mount points

the way pwnwolf117.... I flashed your zip and the changes did not stick. I still had to use my method of copying over an edited vold.fstab file that I created to the /etc folder. I am running BAMF gingerbread ROM.

hmm im wondering if its a permissions thing, im dling BAMF gb and ill install it and see what i can do as soon as i have a chance!
 

mrcrusha829

Senior Member
May 19, 2007
130
24
Hartford, CT
I understand that and explained that in my original post so I wouldn't get an answer like yours. Please reread my previous post again. My point is, why should internal ram (in this case, ext_sd which isn't external sd) be mounted inside the sdcard folder?

I am not tying to be rude but what does it matter. You can get to SDcard2 from both points... it isn't taking up space on the SDcard.
 

pwnwolf117

Member
Dec 11, 2011
31
7
installed bamf cubed rezound 1.0.1 and got it to work. heres the zip :)
 

Attachments

  • SwitchMountV2.1.zip
    143.9 KB · Views: 23
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Hey everyone, i prefer stuff saved on my external sd and im to lazy to keep editing apps to save to /sdcard2 (if they even let you!) instead of the usual /sdcard, so i made a zip to flash in recovery that swaps mount points. internal mounts at /mnt/sdcard/ext_sd and external is at /mnt/sdcard.

    enjoy this guys! it took me like a day solid to figure out how to swap it and then learn how to make a flashable zip :p be nice to me i had never done this before yesterday/part of today
    This has been tested on Ineffabilis (gb version) with dsb OC kernel. should work on any GB rezound rom, and unless something changed that i didnt notice it should work on ICS roms. ill edit this as soon as i check, but it will be tomorrow night before i get a chance
    flash SwtichMount.zip to switch
    flash RestoreMount.zip to restore to original settings

    theoretically this should work on some other phones, shoot me a pm with your phone model and any rom for it (or even better the vold.fstab file in
    /system/etc) and i can tell you if it should work/edit it to work for you!

    Changelog:
    v2.1: adds support for some roms
    1
    I understand that and explained that in my original post so I wouldn't get an answer like yours. Please reread my previous post again. My point is, why should internal ram (in this case, ext_sd which isn't external sd) be mounted inside the sdcard folder?
    1
    I am not tying to be rude but what does it matter. You can get to SDcard2 from both points... it isn't taking up space on the SDcard.

    Yeah i know it just doesn't make sense to have it this way. No big deal i guess but if someone could fix it, it would be nice. I also wonder if this mod will mess up recovery wipes.