Multiple paths to sdcard and internal - Sprint Samsung Galaxy S 4 Q&A, Help & Troubleshoot

When in. File managers there are multiple paths for my external sdcard and my internal storage.
For example just for my external sdcard there is /external_sd, /ExtSdCard, /storage/sdcard1.
For my internal storage there is /sdcard, and /storage/sdcard0.
Is there a reason for this ?is it taking up more memory ? Can I consolidate these somehow?
BTW I'm rooted and flash a lot of ROMs both touchwiz and aosp

I believe it is to ensure compatibility with older apps that were written for specific paths. As Android evolves the External SD card seems to get a different path name with each flavor.
No extra space is used as they are just symbolic links to the true path.

Yeah, like gharlane00 said, there's only one real path, the rest are links. You'll notice that they'll show something like "->somePath." That arrow indicates a link, sort of like a shortcut in Windows. It's aggravating when browsing, that's for sure. I've been trying to figure out how to get Root Explorer to get the proper path to my SD Card when I click on Storage.

Related

IDEA: Hacking internal/external sdcard mount paths

Hello.
I'm using the latest aurora and I'd like to discuss an idea I had.
Since the U8800 has plenty internal memory and it's quite fast comparing to an average sd card, it'd be great if we could use the internal memory for the tasks that need "speed" instead of "space".
Running apps from the sd card is the perfect example!
So the idea would be, while keeping the external sdcard mounted on /mnt/sdcard, having /mnt/sdcard/Android/data, for instance, point to the «internal sdcard path»/Android/data.
What do you think would be the best solution:
- hacking the mount points?
- using links?
- other solution?
Any developer or filesystem savvy user can point the advantages or dangers of using this solution?
- e.g.: the system or some apps may check if the external sd-card is mounted before trying to read/write to /mnt/sdcard/Android/data... that would mean the system/those apss may think that path isn't reachable with the ext-sdcard unmounted, altough they can be read.
Suggestions? Rants? Ideas?
Regards!
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
VuDuCuRSe said:
Hello.
I'm using the latest aurora and I'd like to discuss an idea I had.
Since the U8800 has plenty internal memory and it's quite fast comparing to an average sd card, it'd be great if we could use the internal memory for the tasks that need "speed" instead of "space".
Running apps from the sd card is the perfect example!
So the idea would be, while keeping the external sdcard mounted on /mnt/sdcard, having /mnt/sdcard/Android/data, for instance, point to the «internal sdcard path»/Android/data.
What do you think would be the best solution:
- hacking the mount points?
- using links?
- other solution?
Any developer or filesystem savvy user can point the advantages or dangers of using this solution?
- e.g.: the system or some apps may check if the external sd-card is mounted before trying to read/write to /mnt/sdcard/Android/data... that would mean the system/those apss may think that path isn't reachable with the ext-sdcard unmounted, altough they can be read.
Suggestions? Rants? Ideas?
Regards!
Click to expand...
Click to collapse
Well this is known for a while now . Quoted from my thread here:
vold.fstab - CHANGE THE DEFAULT SDCARD: -thanks to julle131
There is this file named vold.fstab at your /system/etc/ folder, which controls which of your sdcards (Internal/External) will be mounted when you connect your phone to the PC. The last 2 lines are the only that matter. These are the two possibilities:
EXTERNAL SDCARD MOUNTED (DEFAULT):
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.4/mmc_host
dev_mount emmc /mnt/sdcard1 14 /devices/platform/msm_sdcc.2/mmc_host
INTERNAL SDCARD MOUNTED:
dev_mount sdcard /mnt/sdcard 14 /devices/platform/msm_sdcc.2/mmc_host
dev_mount emmc /mnt/sdcard1 auto /devices/platform/msm_sdcc.4/mmc_host
change them as you wish with a root explorer or before flashing.
Click to expand...
Click to collapse
Make this change and every app will use the internal sdcard. Gallery works ok with images to external sdcard, it just might take a while for the first refresh. But I don't know if you'll notice any difference in terms of speed....
Cheers
spirosbond said:
Well this is known for a while now . Quoted from my thread here:
Make this change and every app will use the internal sdcard. Gallery works ok with images to external sdcard, it just might take a while for the first refresh. But I don't know if you'll notice any difference in terms of speed....
Cheers
Click to expand...
Click to collapse
That's not what he talked, I think. He said that the apparel would be installed on the external sd card, but the data would be moved to the internal one. And we have speed, but the main card would be the external one.
I think its a great idea if I understood it right!
Sent from my U8800 using xda premium
mrasquinho said:
That's not what he talked, I think. He said that the apparel would be installed on the external sd card, but the data would be moved to the internal one. And we have speed, but the main card would be the external one.
I think its a great idea if I understood it right!
Sent from my U8800 using xda premium
Click to expand...
Click to collapse
Oh I see! Sorry about that. As far as I know apps are not choosing were to put their data. They just say to the OS "I want these things to be at the sdcard" and the OS puts them at the correct place. So you can't "hack" the app to "see" at somewhere else. On the other hand the OS initialises on boot which card is the primary and which is the secondary. So my knowledge stops there and I can't imagine a way to make this separation between app data and the rest...
I hope for someone else's help!
PaulMilbank said:
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
Click to expand...
Click to collapse
Maybe this cannot be done, because I think that the mapping of the partitions and mounts comes from the bootloader, but there is already the solution of resizing the data partition using the space of internal storage.
PaulMilbank said:
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
Click to expand...
Click to collapse
That's a great idea!
I almost don't use the so called "internal sd card", therefor I have 2GB of fast empty space being wasted.
Why not simply mounting the internal sd-card partition in the data folder and the data partition on the internal sd card folder?
I only use the internal sd card to hold ringtones and other small stuff that I need to be in accessible 100% of the time, so a few hundred MB are enough!
Me gusta!
Every ROM flashes it's own fstab, right?
So all we'd need to do would be, editing the fstab before flashing it.
-----------------
Regarding the my first idea... I don't think one can simply mount a path on another path. We'd need a "virtual" device pointing to /mnt/sdcard-internal/data/ then mount that virtual device on /mnt/sdcard-external/data/.
My knowledge of unix mount/filesystems is not much more than what's explained here: https://help.ubuntu.com/community/Mount
OK, just found this:
http://askubuntu.com/questions/11079/mount-a-directory-to-look-like-a-drive
there is a FUSE filesystem named bindfs that probably does exactly what you want. For example the following:
bindfs -n /media/USB-HDD-01/ISO/ /home/johnc/ISO-images
Click to expand...
Click to collapse
would result in ISO-images to show up as a mounted filesystem in the Places sidepanel in Nautilus. The -n is required because otherwise bindfs tries to use the allow_other FUSE option, which by default is not allowed for regular users (if you use bindfs in /etc/fstab this is not a problem).
The first directory you give is the existing one, the second directory you give is an empty directory under which the contents of the existing one will appear.
Click to expand...
Click to collapse
So, bindfs depends on FUSE... and there's a port of fuse to android: https://github.com/seth-hg/fuse-android but looking at the README I get the feeling that it's not really working. The last step would be having a kernel with FUSE support... and regarding that, I have no idea, how easy it is to get a kernel like that for our U8800 :\
Finding such a solution to expand the DATA partition indirectly would be great!
I used to apply genokolar's custom partition method as "1.2G DATA + 1.46G INTERNAL SD" before, but i found out that it has some issues with Official 2.3 Roms. One of them -the most important IMHO- is the BOOTLOOP problem occurring in some specific situations!!!
See the details in my post here:
http://forum.xda-developers.com/showpost.php?p=25853141&postcount=134
(Seems that I don't encounter the bootloops on Custom Roms, but i'm not %100 sure and never will be )
So i unfortunately gave up using it, and revert to the stock partition .
I will be grateful to the one who will find a better and reliable solution. Hope to see it soon...
I still have to gather more information on the official update "modus operandi".
My goal is to simply reformat both partitions and then swap their mount points.
If the official update formats the partitions before applying the flashing official ROM files, then partitioning changes shouldn't cause any failure on the official update.
But like I said, I'm still yet to confirm that info.
Gen's idea was great (I learned a lot just by looking at his scripts) but resizing partitions has its dangers.
Since "no one" really uses the internal memory, why not simply exchange its room with /data, right?
This would be awesome! I would love to have 2gb for apps, instead of cluttering my phone.. plus the 2gb of internal storage are just a waste for me.. I never use them.. so this would be great!

[info] gs3 not saving to external storage

I just thought you all should know ( if you didn't already) that if you have a sdcard installed in your gs3, that /sdcard in your file manager is not actually the external memory it's internal. I found that out by viewing my storage availability under settings and seeing that the Items that I thought were going to external storage, were in fact going to internal storage.
As it turns out, if you navigate to the root of your device in whatever file manager that you use (your device must be rooted to do so), you will find another storage by following the path /mnt/extsdcard. That is actually your external sdcard and not /sdcard. I don't know why Samsung did it this way, but there it is.
Most apps (like camera) will let you specify where to save things. Most but not all. Just have to look in each app.
Device does not have to be rooted to navigate to the base. Checked with estrongs and several others. You just have to enable going back to root in app settings. Or even changing where the app starts from (instead of /mnt/sdcard/ change to /mnt/). With es file explorer it is even easier than that. App starts on sdcard. Press favorites, select external sd. When you want to go back, press favorites and select home.
Sent from my SGH-I747M
tek_curious_1 said:
I just thought you all should know ( if you didn't already) that if you have a sdcard installed in your gs3, that /sdcard in your file manager is not actually the external memory it's internal. I found that out by viewing my storage availability under settings and seeing that the Items that I thought were going to external storage, were in fact going to internal storage.
As it turns out, if you navigate to the root of your device in whatever file manager that you use (your device must be rooted to do so), you will find another storage by following the path /mnt/extsdcard. That is actually your external sdcard and not /sdcard. I don't know why Samsung did it this way, but there it is.
Click to expand...
Click to collapse
Most of us who have been with Android for a while now know this, maybe some of the noobs might find it helpful though.

[Q] (Blefish 0516) How to forbid app created file/folder in ext-SD root directory ?

Thank Blefish first ,with your contribution to U8800 ,so we users can enjoy the Kitkat.
I have learned that Kitkat will forbid app create file/folder in ext-SD root directory,instead apps can only created their data in /Sdcad/Android.So my Sdcard directory will be tidy.
When I installed Blefish 0516 edition,I found the feature didn't work.
And I found in dir ./storage , ext-SD was mounted as Sdcard0 while the internal storage was mounted as Sdcard1.I think the irregular mounted sequence between ext-Sd and internal storage is the reason why the feature didn't work.
And I didn't found vold.fstab in ./system/etc , so I can't edit it to change the mount seq.
Dear Blefish guru,I am looking for your help~
Jellybean and forward use a different method now. They are not using vold.fstab anymore. Rather, /fstab.qcom is used (in our phone). It cannot be edited manually, a boot.img must be unpacked and repacked in order to do so.
Did you mention that apps can write to /sdcard/ but cannot write to /storage/sdcard0? This ROM does not enforce write permissions as KitKat does by default, so I am not quite sure.
Blefish said:
Jellybean and forward use a different method now. They are not using vold.fstab anymore. Rather, /fstab.qcom is used (in our phone). It cannot be edited manually, a boot.img must be unpacked and repacked in order to do so.
Did you mention that apps can write to /sdcard/ but cannot write to /storage/sdcard0? This ROM does not enforce write permissions as KitKat does by default, so I am not quite sure.
Click to expand...
Click to collapse
Two days after installed 0516,many folders were created by apps in ext-SD root directory(./storage/sdcard0/),while only two folders were found in internal storage(./storage/sdcard1/).And it seems that the two folders were somthing like being created while using recovery or something like that,unlikely being created by apps.
Cause I am using another rom to find whether the seq between internal and ext-SD is normal,yet I found that in android 4.0.4 there is no ./storage,so I cannot know the seq between internal and ext-SD.
zhuld.lord said:
Two days after installed 0516,many folders were created by apps in ext-SD root directory(./storage/sdcard0/),while only two folders were found in internal storage(./storage/sdcard1/).And it seems that the two folders were somthing like being created while using recovery or something like that,unlikely being created by apps.
Cause I am using another rom to find whether the seq between internal and ext-SD is normal,yet I found that in android 4.0.4 there is no ./storage,so I cannot know the seq between internal and ext-SD.
Click to expand...
Click to collapse
In my ROM external SD (/storage/sdcard0) is the primary storage. This means Android creates it's Pictures, Download, Music & other directories there automatically.
/storage/sdcard1 is just a storage, like USB OTG storage would be. It's not in use if sdcard0 is present (some apps can still write to it manually like Camera).
The /storage is another jb/kk feature. I did not go with the older direct mounting to /mnt/ because it's just deprecated. Mine is configured according to this (Nexus One with internal storage added manually): http://source.android.com/devices/tech/storage/config-example.html
Blefish said:
In my ROM external SD (/storage/sdcard0) is the primary storage. This means Android creates it's Pictures, Download, Music & other directories there automatically.
/storage/sdcard1 is just a storage, like USB OTG storage would be. It's not in use if sdcard0 is present (some apps can still write to it manually like Camera).
The /storage is another jb/kk feature. I did not go with the older direct mounting to /mnt/ because it's just deprecated. Mine is configured according to this (Nexus One with internal storage added manually):
Click to expand...
Click to collapse
Thanks for so detailed reply.
But I still don't understand how to enforce write permission.As a perfectionist , I really don't want to see so many folders created by third-party apps in my ext-SD.
If it is convenient for you,could you inform me the way to enable the write permission in your rom? :fingers-crossed:

Use free space in system partition

Hello,
I really like my G2 but i have one annoying issue:
When using one of those great custom roms i end up with pretty much free space on internal storage (system partition).
Since i'm having the 16GB-version i have ~10GB of usable space and currently ~7GB wasted space.
When using OSM-Maps 10GB is not much so i hope there is a way to utilize the free space on internal storage.
I have several ideas but i'm no dev and i hardly know about linux and even less about android.
So thats what i thought of:
Idea 1: Change partition size.
Well i think not a good idea but on my old HTC HD2 i could choose how the storage is partitioned. Don't know if this is possible on G2 and if changes there are not to risky.
Idea 2: Create a virtual SD-Card.
I know that this is possible somehow because i can do that with androidx86 on my tablet. So why dont write an app or zip-File-Patch that creates a custom-size virtual sd-card on internal storage/system partition. Problem is that i can't do that. Help of a dev would be needed.
Idea 3: Redirect folders.
On Linux and Windows it's possible to create "virtual folders" that are just links to the real folder that is stored somewhere else. Pretty handy on windows to move music-library to sd-card with full functions for example.
I think i've seen such things on android too when browsing my device. So why don't move for example the DCIM-Folder and others to internal storage this way?
But again a dev would be needed.
Idea 4: Copy some stuff with root and file explorer.
Thats maybe the simpliest way but i don't know how and where i can copy things. For example i've around 4GB of music on my device and if i can still access it i would have no problem to move it to internal storage somewhere. Maybe to ringtones folder or something like this.
But i'm not sure where i should put it to be on internal storage and access being still possible.
It would be great to further discuss this ideas with you and find some kind of solution.
Well i was able to evaluate on Android 4.2.2 that you can put your music folder into the system/media folder but it was only possible with aroma file manger in recovery.
Then the free space on internal storage gets decreased and the available storage gets increased. This means my files are now inside the system partition.
But there are problems:
Even with root total commander was not able to write things to this directory and even after setting permissions in aroma-fm after reboot i cant write there. So handling is painful.
The music app doesnt find the music now
Found that tool then to create a "link" on sdcard that links to the folder in system/media but that fails because it cannot link to this path.
Tool: http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
Overwhelming interest ...
Wrong section??
Well I've found your thread! Did you get anywhere with this?

Can we mount ext partitions?

Hello all,
Now that we have root on our aesthetically unique device, I believe our next problem is storage space. I don't know about you all, but my aquos crystal has about 4 gb to work with when it comes to apps. Folder mount works well for me, as far as linking the obb files of large apps to the external sd card, but I still have to store a portion of any particular app on the phone's internal storage, which for me is no bueno. There has to be a better way. (For the sarcastic among you, buying another phone is not an option for me.)
Back in the day of Gingerbread, I remember having a whopping 300 mb of app storage to work with. I was able to partition a portion of my external sd to be used as internal storage for the device, solving all my storage woes. It worked so well, that I was sure that I would be able to find a similar method for the aquos crystal.
Now, I see that Link2sd is able to work with ext2, ext3, ext4, and fat32 partitions, so I figured I would attempt to create a ext2 partition on the micro sd to link to my internal storage directory. I used the Partition Wizard mini tool to create a ext2 partition in windows. Unfortunately after starting up Link2sd and selecting the format of my ext partition (ext2), Link2ds gives me an error telling me that the mount script was unable to be created. I've read that if we get this error, we can select ext4, even if we are using a different partition format. This got rid of the error. Mount script was successfully created. Autolink is selected, which should install new apps directly to the new partition. It doesn't, not for me at least.
I've read several guides around the internet dealing with this issue, as well as completely different methods besides Link2sd, and nothing seems to work for me. My goal in this is to supplement the capacity for apps. I would love to find a way to store all the library, devlik, and app files for each app on the external card, rather than having to keep some of each app on internal, and its larger counterparts on external. As you know, apps are constantly updated, and what seems to happen is if you install an app, then link it to the sd card, and the app gets updated in the future, the updated portion will get installed on the internal card, making your 'linked' app kind of pointless. What I'd really like to do is disregard the phone's internal storage altogether and use something like a 64 gb card as the phones internal storage. This may or may not be possible.
I'm not a programmer. I have a very basic understanding of how these things work. When it comes to things like this, I am literally standing on the shoulders of giants, and benefiting from their tenacity and willingness to share the fruits of their labors. Their exploits, and the internet that tells their story, have allowed me to root and modify practically every console and android device I've ever owned. With that being said, thank you to all that have been involved in unraveling the real potential of this device.
So, do any of you fine saints and scholars know of a way to get around the feeble storage capacity of our aquos crystal?

Categories

Resources