I have attempted to search this but always come up a little short. I trying to understand the filing system Android uses. I have a Moto G (2015) running Marshmallow with an 16 gig external memory card set to portable.
I use ES Explorer to view the filing structure. Using the tree I select the "/ device" option. I see several folders and files. One is "sdcard". I understand this is not the memory card, but seems exactly like the "storage emulated 0" folder listed in the tree's "0" option. It does not however appear to be the same folder as listed in the "/device/storage/emulated" folder. What' up with that?
I also think the external memory card is located in "Device/storage" Is that true?
I am really having a time wrapping my head around this. Thanks for any help.
To get the actual locations of the mount points just run the command "mount" in a terminal or ADB shell. In many places there are just symlinks to the actual mount points, which looks like the SD card does exist in different places. E.g. /sdcard is typcially only a link to the mount point of the SD card.
If you run the command "ls -l" in a directory you can see where such a symlink is actually pointing to.
I don't have access to my Moto G3 right now. Writing this on another device running CM.
Here the sdcard is natively mounted at /mnt/media_rw/sdcard1 and then again virtually with a fuse layer at /storage/sdcard1. Everything else are just symlinks. I would assume that on a Moto G3 running CM it's the same. On stock rom probably a bit different.
Anyway with the commands mentioned above you can easily check this.
Maybe this will help.
http://android.stackexchange.com/qu...d-by-the-many-locations-of-the-virtual-sdcard
u42671 said:
To get the actual locations of the mount points just run the command "mount" in a terminal or ADB shell. In many places there are just symlinks to the actual mount points, which looks like the SD card does exist in different places. E.g. /sdcard is typcially only a link to the mount point of the SD card.
If you run the command "ls -l" in a directory you can see where such a symlink is actually pointing to.
I don't have access to my Moto G3 right now. Writing this on another device running CM.
Here the sdcard is natively mounted at /mnt/media_rw/sdcard1 and then again virtually with a fuse layer at /storage/sdcard1. Everything else are just symlinks. I would assume that on a Moto G3 running CM it's the same. On stock rom probably a bit different.
Anyway with the commands mentioned above you can easily check this.
Click to expand...
Click to collapse
Thanks but your answer is a little above my paygrade. I was mainly wanting to check if an app had stored data on an internal storage and minor stuff like that.
riggerman0421 said:
Maybe this will help.
http://android.stackexchange.com/qu...d-by-the-many-locations-of-the-virtual-sdcard
Click to expand...
Click to collapse
Thanks.
That does help a little bit.
With ES explorer:
When I open "Device /", I see a lot of folders and such.
When I open "Device / storage", I see three folders, One seems to the external memory card, emulated, and self.
When I open "device / storage / emulated", it is empty.
From the ES explorer tree if I select the 0 option, it appears to open "Device/ storage / emulated / 0", that includes what appears to be a bunch of folders.
In the first scenerio, the emulated folder is empty.
In the second scenario, the emulated folder has at least folder folder (0).
Why is that?
Also when I select the 0 from the ES explore option, then, back up one level to "emulated" the folder appears to empty.
Why is that?
Thanks again.
Related
I have seen this mentioned but no solution. (It's been causing mild headaches for lots of things from storing camera pics to flashing ROMs)
Is there a way to get the Transformer to use the SDCARD as the actual default storage point?
It's a severe pain that everything defaults to the internal storage that it thinks is external then I have to move everything to the external SDCARD after that.
It would be a moot point but I have a 32GB SDCARD that sits empty while my internal storage fills up. I store a lot of music and movie files for editorial, etc and the Transformer is great for that. . .except for the dumb mount points of the sdcard.
You could make a soft link in /sdcard/ that points to /Removable/MicroSD/ but your sdcard has to be formatted NTFS to support it. I would assume the mount points for removable media are located in /etc/fstab
This drives me a tad crazy as well. That and the naming convention. Should be under /media/ or /mnt/ but "/Removable/MicroSD/" is a ginormous pain when you're using to unix/linux media mounting conventions or navigating under the shells
Oh well.
Sent from my Transformer TF101 using XDA Premium App
This was done for other devices such as the Notion Ink Adam so I know it's possible.
sent from a device using an app
uncorq said:
This drives me a tad crazy as well. That and the naming convention. Should be under /media/ or /mnt/ but "/Removable/MicroSD/" is a ginormous pain when you're using to unix/linux media mounting conventions or navigating under the shells
Oh well.
Sent from my Transformer TF101 using XDA Premium App
Click to expand...
Click to collapse
I'll agree with that, but its something I can over look. I'm assuming you would has to change this line in /etc/vold.fstab
Code:
dev_mount microsd /Removable/MicroSD auto /devices/platform/sdhci-tegra.2/mmc_host/mmc1
just have to get the docks sdcard to mount into the devices internal memory "sdcard" in the same manner the microsd does, should be fairly easy to do, just have to poke around a bit to see how microsd is being mounted
I try link 2 sd and data root 2 sd on the market, but the apps would not recognize the microsd. So there no way of linking to the sd by apps.
Sent from my Transformer TF101 using Tapatalk
I try link 2 sd and data root 2 sd on the market, but the apps would not recognize the microsd. So there no way of linking to the sd by apps.
Click to expand...
Click to collapse
Exactly. I would consider this a fairly obvious flaw to Asus that they change the accepted behavior being used everywhere else. Overall happy with the device but this is causing a headache since it's the only android device I have that operates this way it's not something I can just "get used to" as the odd man out. Why include external storage (a major reason for this over the Galaxy Tab 10.1 for me) and then make it a pain to use?
I'm assuming you would has to change this line in /etc/vold.fstab
Click to expand...
Click to collapse
Will see if that helps but wondering if this would cause a conflict elsewhere.
I'm making this too complicated in my head.
Simply: The internal and external mount points should be swapped.
Anything I want on the internal storage I can move, but that's fewer and further between than the sdcard. Maybe some music or whatnot.
This would solve other problems like ROM managements, etc.
one more thing... if it's just photos you are wanting to move, you could
"ln -s /sdcard/DCIM /Removable/SD/DCIM"
all new photos taken will end up on SD I might have that backwards? type ln in terminal with no arguments, and it will tell you what you need
do this for any folders you want on SD, then androids core stuff that apps need, and you don't need elsewhere still stays internal
I get "operation not permitted" for some reason. I have root permissions. Sudo, etc.
bitter1 said:
I get "operation not permitted" for some reason. I have root permissions. Sudo, etc.
Click to expand...
Click to collapse
FAT32 doesn't support symlinks.
Try this instead.
Regards,
Dave
Oh yeah, duh. Will give the other a shot.
I have to stick to FAT32 because I occasionally have to use OSX to shuffle things around.
dan-htc-touch said:
one more thing... if it's just photos you are wanting to move, you could "ln -s /sdcard/DCIM /Removable/SD/DCIM"
Click to expand...
Click to collapse
You also need to be root or prefix that with sudo
foxmeister said:
FAT32 doesn't support symlinks.
Try this instead.
Regards,
Dave
Click to expand...
Click to collapse
cd /mnt/sdcard
mkdir fssd
mount -o bind /Removable/SD /mnt/sdcard/fssd
yeap that works.. Thanks..
If your running Prime (Or something that supports init.d scripts), you could add that command to one of the files in /system/etc/init.d/ to make it automatically run at boot
Tortel1210 said:
If your running Prime (Or something that supports init.d scripts), you could add that command to one of the files in /system/etc/init.d/ to make it automatically run at boot
Click to expand...
Click to collapse
I just did that to 07 and no joy
After reboot no effect. I'll play some more later.
which command did you add? you only need to add the last one.
brando56894 said:
which command did you add? you only need to add the last one.
Click to expand...
Click to collapse
sure. only that one.
maybe the MicroSD (yeah changed it) is not mounted yet when the script runs?! or does the script run at all?!
off to bed now. tomorrow is another hot day.
I think you need to prefix it with /system/xbin. Heres the command I used in my init scripts:
Code:
/system/xbin/mount -o bind /Removable/MicroSD/DCIM/ /sdcard/DCIM/
That code will make pictures save on the micro sd card instead of internal memory.
Also, make sure the folder in the internal memory where you want it to bind to the external storage is empty.
Is there a safe, proven method for moving apps out of internal storage and into an external SD on the Galaxy Tab 2 10.1 GT-P5113, or more generally for Android 4.2? I've seen a few scripts that look a bit dangerous. The closest I've gotten so far is the FolderMount app, but even on a rooted tab, this app only seems to have access to the `/storage/emulated/0/` internal path, and all the apps I install are going into `/data/app/`.
deesto-xda said:
Is there a safe, proven method for moving apps out of internal storage and into an external SD on the Galaxy Tab 2 10.1 GT-P5113, or more generally for Android 4.2? I've seen a few scripts that look a bit dangerous. The closest I've gotten so far is the FolderMount app, but even on a rooted tab, this app only seems to have access to the `/storage/emulated/0/` internal path, and all the apps I install are going into `/data/app/`.
Click to expand...
Click to collapse
You can use FolderMount to access the root file system. I have /data/media/ bound with it as we speak.:laugh:
When you are on the screen to select the Source directory tap the menu button in the top right corner, select "/ Path" from the menu, and say OK to the warning. You should be able to select any folder on your device now.
Caldair said:
You can use FolderMount to access the root file system. I have /data/media/ bound with it as we speak.:laugh:
When you are on the screen to select the Source directory tap the menu button in the top right corner, select "/ Path" from the menu, and say OK to the warning. You should be able to select any folder on your device now.
Click to expand...
Click to collapse
Doh! Thanks! Yep, that works! But then I got the prompt: "source isn't empty. want me to move the contents?" (paraphrase), I answered "yes", and ended with "Unfortunately, FolderMount has stopped." Does the dir have to be empty before you can do this? Or do you have to move apps one at a time, with a unique mount pair for each? I was trying to "move" /data/app/ dir itself to SD; maybe that's a bad idea.
deesto-xda said:
Doh! Thanks! Yep, that works! But then I got the prompt: "source isn't empty. want me to move the contents?" (paraphrase), I answered "yes", and ended with "Unfortunately, FolderMount has stopped." Does the dir have to be empty before you can do this? Or do you have to move apps one at a time, with a unique mount pair for each? I was trying to "move" /data/app/ dir itself to SD; maybe that's a bad idea.
Click to expand...
Click to collapse
Oh yeah! Sorry I should have said I moved everything to the destination manually, then i mounted the folder in FolderMount and do not let it move anything for you! Though to be completely honest I don't think I would recommend mounting /data/app/. I don't think foldermount mounts the directory early enough at boot for that to work. Many of the large files that applications use are stored on the emulated sd card, in /sdcard/Android/data/ & .../obb/. Moving these will free up a lot of space probably. But like I have, mounting /data/media/ will let you move all of the contents of what used to be your "real" internal sd to some folder on your external sd. Android settings/storage sees me with INTERNAL STORAGE:Total Space: 4.59GB, Available: 3.68GB, Apps (app data & media content): 4.19GB, Music,Downloads,Pictures,etc.:~12GB! In system tuner my internal storage, /storage/emulated/0/ shows 23GB used, 36GB free with my 64GB card.
After moving everything that was in /data/media/ to my external it is easy to format my internal sd partition in recovery to clear away the now redundant files, and free up that space for the rest of my data.
Using on CM11, should work for any android build above 4.#.#
If you are having trouble mounting folders like I did like SuperMount, FolderMount didn't work for me
Even if they work, they require payment for most important features
Get BusyBox (Most custom ROMs already have it, like CM)
I used busybox mount because regular mount didn't work
Get the SManager app
Move the contents of obb folder to somewhere in external SD, (Or you can move the entire obb folder and create an empty obb folder in sdcard/Android)
Create new script from SManager (or any other text editor and save it with .sh extension) and type the mount command in it
Lets say I moved the folders inside obb to storage/sdcard1/obbfolders, then command is:
busybox mount -o bind /storage/sdcard1/obbfolders/ storage/sdcard0/Android/obb
Save the file (in SManager you press back after typing and it asks if you want to save)
Click on the file you created and check the Su and Boot boxes and Save
Script should be good to go, click Run
I use FX File Explorer to verify it (obbfolders should be shown on the main page)
Reason I created this thread, I searched this for a quite good amount of time and couldn't find anything
All "mount folder android", "mount bind android" searches either come up dead or show me an app that doesn't work for me
needo2 said:
Using on CM11, should work for any android build above 4.#.#
If you are having trouble mounting folders like I did like SuperMount, FolderMount didn't work for me
Even if they work, they require payment for most important features
Get BusyBox (Most custom ROMs already have it, like CM)
I used busybox mount because regular mount didn't work
Get the SManager app
Move the contents of obb folder to somewhere in external SD, (Or you can move the entire obb folder and create an empty obb folder in sdcard/Android)
Create new script from SManager (or any other text editor and save it with .sh extension) and type the mount command in it
Lets say I moved the folders inside obb to storage/sdcard1/obbfolders, then command is:
busybox mount -o bind /storage/sdcard1/obbfolders/ storage/sdcard0/Android/obb
Save the file (in SManager you press back after typing and it asks if you want to save)
Click on the file you created and check the Su and Boot boxes and Save
Script should be good to go, click Run
I use FX File Explorer to verify it (obbfolders should be shown on the main page)
Reason I created this thread, I searched this for a quite good amount of time and couldn't find anything
All "mount folder android", "mount bind android" searches either come up dead or show me an app that doesn't work for me
Click to expand...
Click to collapse
Trying to follow your guide....can't get it to work ?
1: Moved the entire OBB folder to my SD
2: Installed busybox, started it, software says it is installed, there's a button to install again....don't know what else it does ? If I click install, well, it installs again
3: Created the new script, saved it, ran it. It seems OK
4: When I open FX File explorer, I don't know what I'm looking for, I don't see anything going on, no operations running ?
...I didn't want to delete the original OBB directory since I don't have confirmation of this working ?
Thanks for your help
almost there...
Hi there
Had the same problem and found your thread after quite some surfing. Following your instructions, all seemed to work fine, just had to inject an "su" before the busybox mount command, then the whole external_sd (/storage/sdcard1/) was mounted to an existing (empty) folder on the internal sd (/storage/emulated/legacy/External_SD)... at least that's how it looks in SManager. When checking the target folder via file explorer, it still looks empty.
My setup:
- Samsung S4 mini on Cyanogenmod 10.2
- phone is not fully rooted, but root is granted to SManager and Busybox
- external sd card has permissions "d---rwxr-x" and is owned by "system" whereas the internal storage has permissions "drwxrwxr-x" and is owned by "root"
do I face a permission issue?
If yes, how to solve that (tried to change permissions of the External_SD folder recursively using chmod -R under root... but didn't suceed)
If not, any ideas...???
Thanks for any hint!
cheers
I'm using Lucky Patcher to bind oob folder, you should try.
@needo2: Is it required to mount the folder? This could cause problems on rejecting sd card. Maybe it does work replaceing the source directory with a simple link ("ln -s") to sd?
There have been lots of posts and articles and questions about the dreaded SD Card access changes in KitKat, and how the SD card can no longer be freely written.
And there is an excellent thread here http://forum.xda-developers.com/showthread.php?t=2684188 about a great app that can fix it.
However, whether you fix your permissions manually, or using this app, there is still a very subtle difference.
I've been using rsync for Android for several years. I have a central Linux server at my house, on which I keep all my files, and I periodically rsync FROM my server, TO my Android Device (in this case, a Galaxy Note 3 SM-900 4G running 4.4.2) to a structure on the external SD card. That way I can keep a local copy of my files with me at all times. I pretty much fill a 64GB SD card this way.
Under 4.3 and earlier, I used /storage/extSdCard (or /mnt/extSdCard ) as my mount point to access my external SD card, and everything worked fine.
However, under KitKat, rsync was having a very strange issue. Attempts to rsync a file would result in:
rsync - failed to set time on file
for any file that it tried to transfer. It seemed like it was transferring the file, but was unable to change the timestamp on the file.
The solution turns out to be visible if you run Android Terminal Emulator and look at the output of the mount command. Tracing through that, I discovered that there is also a less-obvious alternate mount point, which is:
/mnt/media_rw/extSdCard
And, indeed, using that as an rsync target solves the timestamp problem.
Felt this should be posted somewhere, hope this is the right place.
Thanks.
Glen
Nice find bro!!
Sent from my SM-G900W8 using XDA Premium 4 mobile app
Amazing. Thank you.
I'm having the same problem on Lollipop and I don't have that mount point. I tried both /mnt/extSdCard and /storage/sdcard1 and both still get the error. Any ideas?
Forgive me if this is in the wrong place.
I'm using EDS Lite to mount an EncFs directory. That works fine. I can access the directory from file managers when it's mounted. That's fine. I don't have any trouble accessing the encrypted files when I want them.
BUT:
Suppose I'm using a program that doesn't have one of those simple sidebars that lets you access different things. A program like App2SD. Suppose I can access any directory from the Root, but I don't have a nice shortcut that takes me directly to a mounted file system. So the important question is:
What is the path to the mounted EncFs system?
With other mounted file systems, I know a couple ways to get there. For example, I can get to the SD card from Root/storage/###-####, or from Root/mnt/media_rw/####-####. With the second partition on my SD card, I can get there using Root/data/sdext2. But now, what about the mounted EncFs file system I have? How could I reach that from the root directory? How could I get there?