SD mount swap! - HTC Rezound

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 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

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?

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$$

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!

maniac2k said:
Why can't ext_sd (internal ram) just be mounted as mnt/sdcard2? Thanks!
Click to expand...
Click to collapse
+1!
10char

maniac2k said:
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!
Click to expand...
Click to collapse
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.

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?

maniac2k said:
.Why can't ext_sd (internal ram) just be mounted as mnt/sdcard2? Thanks!
Click to expand...
Click to collapse
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

maniac2k said:
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?
Click to expand...
Click to collapse
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

maniac2k said:
.Why can't ext_sd (internal ram) just be mounted as mnt/sdcard2? Thanks!
Click to expand...
Click to collapse
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.
maniac2k said:
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?
Click to expand...
Click to collapse
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
mrcrusha829 said:
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.
Click to expand...
Click to collapse
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!

maniac2k said:
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?
Click to expand...
Click to collapse
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.

installed bamf cubed rezound 1.0.1 and got it to work. heres the zip

mrcrusha829 said:
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.
Click to expand...
Click to collapse
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.

maniac2k said:
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.
Click to expand...
Click to collapse
im in process of making that work, might be a couple days before i get it all working

Related

[Q] Internal /sdcard

can the internal sdcard be formatted from a PC just like an external sdcard ?
I dont care about anything data I have on it, I just need to know if i wipe it I am not effing anything up that needs to run.
Thanks!
The "Internal SD" is not really an SD card in the sense of a removable or separate device. It is part of the internal memory, but from the stand point of the system is treated as a separate drive. Kind of like the way you can take a hard drive a partition it into two "logical" drives that can be separately addressed.
In any case the formatting of the internal SD is a function of the Android system and not the PC. I'm not sure what happens if you try to format while the device is plugged in via USB. I know there are several hidden directories that Android needs on the SD card and if you try to format from the PC they are likely to be destroyed.
If you look at "Settings-Storage" you should find the formatting tool.
mbamberg said:
The "Internal SD" is not really an SD card in the sense of a removable or separate device. It is part of the internal memory, but from the stand point of the system is treated as a separate drive. Kind of like the way you can take a hard drive a partition it into two "logical" drives that can be separately addressed.
In any case the formatting of the internal SD is a function of the Android system and not the PC. I'm not sure what happens if you try to format while the device is plugged in via USB. I know there are several hidden directories that Android needs on the SD card and if you try to format from the PC they are likely to be destroyed.
If you look at "Settings-Storage" you should find the formatting tool.
Click to expand...
Click to collapse
But, back to the original question: how do you format (wipe) the internal SD card?
This whole issue of the pictures and mp3s that can't be removed is really bugging me.
kevincwelch said:
But, back to the original question: how do you format (wipe) the internal SD card?
This whole issue of the pictures and mp3s that can't be removed is really bugging me.
Click to expand...
Click to collapse
did you try going into root explorer and mounting r/w and then try to delete the files? Just asking because there has been a few bricks on here from people formatting their internal.
Sent from my ADR6300 using xda premium
kevincwelch said:
But, back to the original question: how do you format (wipe) the internal SD card?
This whole issue of the pictures and mp3s that can't be removed is really bugging me.
Click to expand...
Click to collapse
If you remove those files, you may not be able to use the OTA updates....the updates don't seem to like changed or removed files.
Bob
monkey10120 said:
did you try going into root explorer and mounting r/w and then try to delete the files? Just asking because there has been a few bricks on here from people formatting their internal.
Sent from my ADR6300 using xda premium
Click to expand...
Click to collapse
Good thought: I did use Root Explorer to mount R/W. It did NOT let me delete those files.
(I really have no serious intentions of formatting my internal "SD" card; I'm just fuming that I have no control over the files, which show up in my Google music.)
I also can't seem to put a .nomedia file in the directory either.
---------- Post added at 12:27 AM ---------- Previous post was at 12:26 AM ----------
robertg9 said:
If you remove those files, you may not be able to use the OTA updates....the updates don't seem to like changed or removed files.
Bob
Click to expand...
Click to collapse
Not necessarily worried about that. I've found a ROM and kernel that work pretty well, and since this isn't my phone, I don't need it to be running 24-7.
There's nothing in System Settings-Storage?
Sent from my HTC Desire using XDA

Internal Storage messed up

Hey there, I think I broke internal storage
Its not mounted...
What I have done
1.) SBF back to defualt
Any ideas?
So on stock 2.3.4 your internal SD is broke not the ext-sd?
Sorry this should of been posted to the Q&A section.
Travisdroidx2 said:
So on stock 2.3.4 your internal SD is broke not the ext-sd?
Sorry this should of been posted to the Q&A section.
Click to expand...
Click to collapse
My bad,
Yes the internal storage shows up as 0gb and is not mounted
DOH!!!
I had it plugged into my computer.
bijan588 said:
DOH!!!
I had it plugged into my computer.
Click to expand...
Click to collapse
Nice.
Sent from my MB870 using xda premium
Any thoughts?
My problem is the same except I am not hooked up to USB. The issue came when I installed CM7DX2 RC0. See below what happened.
Stock settings
/mnt/sdcard (this was the internal card)
/mnt/sdcard-ext (this was the external card)
After CM7
/mnt/sdcard (this is now the external card)
/mnt/sdcard-ext (it shows up but there is nothing there)
/mnt/emmc (this is the internal card and show 0 bytes free; it has my old files but nothing can be added to it; I assume it is read only at this point)
Is there any way to make the internal read/write again or will I have to SBF? I don't get what happened. I love CM7 except for this issue. Thanks.
Leland
Emmc is supposed to be a external card. Its a flip flop. So if emmc is bad its ur removable SD. Get a new one.
Sent from my MB870 using XDA
Or maybe format? Idk.
Sent from my MB870 using XDA
Moved to proper forum.
emmc is what was my internal SD card; all the files from it are still there exactly as they were before the CM7 installation. I already replaced the external card shortly before installing CM7 and it is working flawlessly as sdcard (previously sdcard-ext before installing CM7). That is why I was asking. I was hoping CM7 was the cause of the issue as it was ok at the SBF before flashing to CM7. Is there a specific way to format the internal SD card? Thanks.
Leland
lgwhitlock said:
emmc is what was my internal SD card; all the files from it are still there exactly as they were before the CM7 installation. I already replaced the external card shortly before installing CM7 and it is working flawlessly as sdcard (previously sdcard-ext before installing CM7). That is why I was asking. I was hoping CM7 was the cause of the issue as it was ok at the SBF before flashing to CM7. Is there a specific way to format the internal SD card? Thanks.
Leland
Click to expand...
Click to collapse
If you are planning on staying on CM7, or any other ROM that uses the flip flop mod, and you are wanting to get everything straightened out, I would recommend backing up your app data with Titanium Backup. Back up your External SD card to your computer (If you have anything else from your INTERNAL card you want to save like pictures, music, videos, etc., back them up to your computer as well). Then format both. You can erase both cards in settings/storage. After you format your internal, the apps you have on your phone already should recreate the folders they need. But wont restore your app data. Thats where you use Titanium Backup to restore the data. Then just move everything back from your computer to your external or internal depending on where you want it. You should be good then.
Thanks jsgraphicart for the advice. I will look at this and attempt the repair. However I have a question first. It seems to me that /mnt/emmc should be showing up as /mnt/sdcard-ext if the cards were truly swapped. However in File Expert with root exploring turned on there is nothing there. It seems to me a symbolic link might need to be reestablished. I think the cards themselves are fine. I was hoping someone might have some ideas how to get /mnt/emmc to point to /mnt/sdcard-ext so the swap is complete. Does anyone have some clues to offer to get things in their proper order? I think I will go read the article about swapping the cards to see if I can find the answer myself but if anyone has an answer I would love to hear from you. Thanks.
Leland
lgwhitlock said:
Thanks jsgraphicart for the advice. I will look at this and attempt the repair. However I have a question first. It seems to me that /mnt/emmc should be showing up as /mnt/sdcard-ext if the cards were truly swapped. However in File Expert with root exploring turned on there is nothing there. It seems to me a symbolic link might need to be reestablished. I think the cards themselves are fine. I was hoping someone might have some ideas how to get /mnt/emmc to point to /mnt/sdcard-ext so the swap is complete. Does anyone have some clues to offer to get things in their proper order? I think I will go read the article about swapping the cards to see if I can find the answer myself but if anyone has an answer I would love to hear from you. Thanks.
Leland
Click to expand...
Click to collapse
I think the emmc is an AOSP thing. I'm not 100% though. I dont know the technical answer to that. The emmc IS your external card and works the same. If you use it long enough, you do get used to it. I think it confused a lot of us when we flashed CM7 for the first time.
Sent from my MB870 using Tapatalk

[MOD]External SD as Primary/Internal

This is a simple mod to make the external SDcard mount as the primary/internal (/sdcard)
and the internal is mounted as the secondary (/sdcard-ext)
This should work on most (all?) roms but is only tested on MIUIv4 with a GSM RAZR
Just flash the switchSD.zip
To revert the effect, flash reswitchSD.zip
Requested by lukas77 external sd mounted in folder of internal (/sdcard/sdcard-ext)
Some problems though, after each boot you will have to remove and insert SD for it to mounts.
It is safe to remove SD because it isn't mounted but it's a bit of a hazzle.
Flash SDinFolder.zip to revert, just flash reswitchSD.zip as above.
make shore before flashing that you don't have any file or folder named sdcard-ext on internal sdcard.
EDIT:
I have been away for a while and came back to a thread full of pproblems and a bunch of PMs.
Unfortuneatly I don't have time to ivestigate the problems or fix for newer builds.
My recomendations for everyone is: Do Not Use It unless you'r realy know what your doing and can fix it for your build.
work perfect eclipce 1.3 via GSM
Sent from my XT910 using Tapatalk
what is the advantage of doing this?
therazrguy said:
what is the advantage of doing this?
Click to expand...
Click to collapse
Some apps doesn't support external SD (Very noticeable on MIUI as music can't find music on external and file explorer only browses internal).
Some people (me) prefer a storage that is easily movable.
If you always have a larger SD inserted you'll probably find yourself a bit limited with the original mounting options.
pajn said:
Some apps doesn't support external SD (Very noticeable on MIUI as music can't find music on external and file explorer only browses internal).
Some people (me) prefer a storage that is easily movable.
If you always have a larger SD inserted you'll probably find yourself a bit limited with the original mounting options.
Click to expand...
Click to collapse
Can this be done without damaging currently installed programs?
And what does this do? Symbolic links?
sletta said:
Can this be done without damaging currently installed programs?
And what does this do? Symbolic links?
Click to expand...
Click to collapse
If you have programs (or games, mostly games) that is installed on your internal SD they will break. I guess games that download extra data to SD just will have to download it again though...
The good thing is that you can test and then just flash reswitchSD.zip if it didn't work.
This tells vold (the program responsible for mounting the storages) to mount external on /mnt/sdcard and internal on /mnt/sdcard-ext instead of the reverse.
No links.
pajn said:
If you have programs (or games, mostly games) that is installed on your internal SD they will break. I guess games that download extra data to SD just will have to download it again though...
The good thing is that you can test and then just flash reswitchSD.zip if it didn't work.
This tells vold (the program responsible for mounting the storages) to mount external on /mnt/sdcard and internal on /mnt/sdcard-ext instead of the reverse.
No links.
Click to expand...
Click to collapse
Works great! Thanks!
it this just a edited vold.fstab file? or is there more to it?
Boomer187um said:
it this just a edited vold.fstab file? or is there more to it?
Click to expand...
Click to collapse
Just vold.fstab. That is all that is needed
Will we need to reflash this after flashing any roms or are we all set until we undo it manually?
qoncept said:
Will we need to reflash this after flashing any roms or are we all set until we undo it manually?
Click to expand...
Click to collapse
You will for a ROM that erases the whole system partition but won't for a patch. But it doesn't seem like there are that many ROMs that provides patches so you probably will.
can we mount external sdcard as folder inside /sdcard/? (phone memory)
Wysłane z mojego XT910 za pomocą Tapatalk
lukas77 said:
can we mount external sdcard as folder inside /sdcard/? (phone memory)
Wysłane z mojego XT910 za pomocą Tapatalk
Click to expand...
Click to collapse
Great idea! However my testing found out that it wasn't the easiest thing to do as vold will try to mount the external SD before the internal is mounted and the folder present.
It works but after every boot you will have to remove SD (safe as it isn't mounted) and reinsert it. May work better on other ROMs (did some Googeling and found that CM7 on O2X did have problem while stock didn't whit exactly the same thing)
Adding to first post now!
Would it be possible to mount SD as an expansion of your internal? i.e., treating them as the same memory unity?
Haloman800 said:
Would it be possible to mount SD as an expansion of your internal? i.e., treating them as the same memory unity?
Click to expand...
Click to collapse
No, if so we would have to raid them but I have never heard of some raid utilities built for Android.
Even if it's theoretically possible to build the Linux utilities for ARM and run them on Android it would probably be loads of work and customization for each ROM as Android have very bad possibilities of running scripts at boot.
Anyone tried this on stock 2.3.6 ROM?
Szadzik said:
Anyone tried this on stock 2.3.6 ROM?
Click to expand...
Click to collapse
Not tried but should work.
Szadzik said:
Anyone tried this on stock 2.3.6 ROM?
Click to expand...
Click to collapse
I have it working on stock 2.3.6.
pajn said:
Just vold.fstab. That is all that is needed
Click to expand...
Click to collapse
Hey would it be possible for you to edit this vold from a epic 4g touch so i can do this on my phone? Heres the link to my vold file if you can thanks... http://db.tt/2E1QAqVe
iUseJuGGZz said:
Hey would it be possible for you to edit this vold from a epic 4g touch so i can do this on my phone? Heres the link to my vold file if you can thanks... http://db.tt/2E1QAqVe
Click to expand...
Click to collapse
It's actually really simple.
Ofc. this isn't tested so if it doesn't work just let me know.
If you want to push it manually just extract the vold.fstab from the zip.

Nook Tablet- [Q] How to enable internal storage ( appear as My Nook)

i have followed this http://forum.xda-developers.com/showthread.php?t=1531120
And i'm running CM7. I can't access to the internal storage as My Nook like everyone does. I'm a user
Please anyone show me how to make the internal storage mount when plug into the PC ?
I'v read a lot from many threads but mostly for developer so no images at all. I can't follow them step by step and don't know which step i needed to enable mount for the internal storage.
Sorry if this annoy & make people think that i'm lazy
feladenfia said:
i have followed this http://forum.xda-developers.com/showthread.php?t=1531120
And i'm running CM7. I can't access to the internal storage as My Nook like everyone does. I'm a user
Please anyone show me how to make the internal storage mount when plug into the PC ?
I'v read a lot from many threads but mostly for developer so no images at all. I can't follow them step by step and don't know which step i needed to enable mount for the internal storage.
Sorry if this annoy & make people think that i'm lazy
Click to expand...
Click to collapse
What version of CM7?
I cheated...I did a factory reset and took it into B&N and had them repatition. I did get as much storage but also didn't brick my Nook.
Nikkie
Sent from my Nook Tablet using xda app-developers app
NikkieL said:
I cheated...I did a factory reset and took it into B&N and had them repatition. I did get as much storage but also didn't brick my Nook.
Nikkie
Sent from my Nook Tablet using xda app-developers app
Click to expand...
Click to collapse
I don't think he's taking about repartitioning. Correct me if I'm wrong, but it sounds like OP just can't get his /mnt/media partition to mount.
I think you have to change the mounts in your build.prop. The changes were posted somewhere in the CM7 thread by @succulent.
Solar.Plexus said:
I don't think he's taking about repartitioning. Correct me if I'm wrong, but it sounds like OP just can't get his /mnt/media partition to mount.
I think you have to change the mounts in your build.prop. The changes were posted somewhere in the CM7 thread by @succulent.
Click to expand...
Click to collapse
This is pretty easy to do with CM9. All you have do is edit the vold.fstab and swap the mount points. I have emmc mounting to /mnt/sdcard and sdcard mounting to /mnt/emmc.
I then use an app called "Directory Bind" (google it) to mount the sdcard to the internal emmc at /mnt/sdcard/_ExternalSD. You could use something like SManager to do the mounting instead of Directory Bind (it sometimes doesn't work at boot).
Unfortunately it doesn't seem as easy with CM7. I couldn't get it to work properly using the same method.
I don't think this is what he wants either. He wants the /mnt/media (X: My NOOK) partition to mount on the PC. I think you're suggesting he manually mount the partition on his NT.
To allow mounting this partition on your PC, this is what you change:
ro.additionalmounts=/mnt/media
and
ro.vold.switchablepair=/mnt/sdcard,/mnt/media
Also, I know this was the solution when CM7 was in its earlier Alpha stages. I thought Celtic fixed this issue in their next build.

[Q] Can I symlink the ext SD card to internal SD?

So, I just updated to CM10.1 (Deck's 4-6-13 Build) over the weekend. This may apply to any AOSP ROM though. I was coming from a Sense ROM previously so the external SD card was "mounted" or symlinked(?) to /sdcard/ext_sd/
Now it appears that directory is empty and I have to navigate to /mnt/external_sd to get at those files. This usually isn't a problem except for some applications that don't want to let me navigate away from the /sdcard directory.
Hopefully this isn't too much of a newb question for you folks.
Thanks in advance!
I use this on my tablet, should work on the phone
http://forum.xda-developers.com/showthread.php?t=1410262
detcup4evr said:
I use this on my tablet, should work on the phone
http://forum.xda-developers.com/showthread.php?t=1410262
Click to expand...
Click to collapse
That looks to be exactly what I need. Would be nice if this just came built into CM10.1, but hey beggars can't be choosers. Many thanks for the post!

Categories

Resources