[APP][ROOT] FolderMount - Link folders from internal SD to external to free space

Search This thread

madmack

Senior Member
Features of FolderMount:

  • Root is an absolute MUST. No root, no access to app.
  • Mount internal SD card folders to external SD folders.
  • Move content from internal to external when a pair is added. (Dialog prompt)
  • Support for Android 2.3 - 6.*.
  • Holo themed throughout and an intuitive GUI design.
  • It will check SDCARD mount status and remount if necessary.

Why would you need this app?

Today some apps store big files over the internal SD card (e.g. Games, Podcasts, Offline RSS feeds, Pictures, Offline navigation software). Typically users have a small internal sd card size (~16GB) while the external SD is a lot bigger (~32-64GB). Most of these apps don't have an option to use the external SD card to store data so they starve your internal SD card memory. I'm bringing this solution to fix this issue. In my case, I use this app to mount offline navigation software and some GameLoft games (NFS anyone?).

Doesn't this do the same thing as previous apps?

There are a few apps that already do this. However, my app differs in that:

a) Some of the existing apps aren't maintained anymore. FolderMount will be maintained by me as we go forward.
b) While most of the previous apps work properly in most cases, I found them not very intuitive to setup initially and were lacking some necessary "sanity checks" before linking folders. I intend to keep this app as intuitive and bug free as possible.
c) Support for Android 4.2.2! No app will currently do that for you, so here it is. (dev talk: this uses the debuggerd service trick to get it to work).

Users that buy the premium key will get:
  • Unlimited folder pairs (free version has a limit of 3).
  • Ability to mount any subfolder in the internal sdcard. (free version has restrictions on Android obb and data folders)
  • Get to see the folder sizes in root explorer
  • Support the developer and make him very happy :D

Mini how to
  1. Click add to add a folder pair
  2. Select a source directory that you want to move files from. This should be somewhere in your internal sdcard. Usually located at /mnt/sdcard
  3. Select a destination directory that you want to move files to. This should be some folder in your external sdcard or OTG drive.
  4. FolderMount will offer to move the files to the destination. Click yes.
  5. After the moving process is done, click on the pin. If the pin is green, you're all set.
    Note: The files will appear in both the source and destination after pinning them. This is normal as the files that you see in your internal sdcard are actually located on your external sdcard. This is how FolderMount "tricks" apps that don't have the ability to save explicitly to the external sdcard.

FAQ

Please do read the FAQ before asking questions in this thread. If your question is ignored, it is most likely because the answer to it already exists in the FAQ.

Note to users complaining about FM not working in KitKat with custom ROMs. Before asking any questions or complaining that FM does not work, have your kernel dev (or ROM cooker) look HERE


Screenshots:

1-small.png
2-small.png
3-small.png
4-small.png
5-small.png
6-small.png
7-small.png


Video tutorial(s):

1. by KiaTheKing

Translations:

Want to have FolderMount in your language? Help us by joining our crowdin project. More information here: http://www.devasque.com/foldermount/translations.html

Bug reports:

FolderMount version 2.2 and up support an integrated bug report and submission capability. Use the feature in the Settings menu to submit bug reports.

Changelog:

v2.9.11 (6/26/2016)
  • Broader compatibility with Samsung M devices

v2.9.9 (6/7/2016)
  • Added Android Marshmallow compatibility
  • Android M support for Moto devices (disable sdcardfs module)
  • Cosmetic changes to copy notification (no more white text on white BG)
  • Root dialog has a clear check mark (or x mark if root was not granted)
  • Destination is sometimes not there, FM doesn't ask you to move files back when you delete that pair
  • Ask permissions to write to external sdcard using Storage Access Framework. Copy operations should work now in Android M
  • Initial support for Samsung devices running android M. A patch will be offered to replace two files. If your /data partition is encrypted, you will lose all data on it! There is no way around that at the moment. Once you factory reset, FM should work fine and you'll have AOSP encryption which TWRP can decrypt
  • Migration to new Android M permission granting model. FM will ask you for permission only when it needs these permissions


Rest of changelog



Disclaimer: This app does not guarantee functionality in any way, shape, or form. It is not my responsibility if this app does not work, breaks your sdcard or eats your kittens. User discretion is advised.
 

Attachments

  • FolderMount-v2.9.11.apk
    2.4 MB · Views: 33,009
Last edited:

egingell

Senior Member
Apr 10, 2012
4,755
2,059
47
blog.sophielabuf.com
Creating a new entry only resulted in the "disappearance" of my files, they returned upon reboot which suggests that your command(s) are backward, and the app warned that Source was not empty when, in fact, it was and it "moved" no files, which interestingly had a progress bar, from Source to Destination, then bound them, at which point both Source and Destination showed no files (hence "disappearance" above) until reboot. The files were still in their original location.
 
Last edited:

gelhack

Senior Member
Nov 20, 2012
54
9
How about kicking off a media rescan after the folders are mounted?

Sent from my Nexus 7 using xda app-developers app
 

madmack

Senior Member
Creating a new entry only resulted in the "disappearance" of my files, they returned upon reboot which suggests that your command(s) are backward, and the app warned that Source was not empty when, in fact, it was and it "moved" no files, which interestingly had a progress bar, from Source to Destination, then bound them, at which point both Source and Destination showed no files (hence "disappearance" above) until reboot. The files were still in their original location.

if you've already mounted that source folder using any other means, un mount it first then use my app to bind it correctly.

Source (internal SD.. copying files FROM this).
Destination (external SD.. copying files TO this.. we'll eventually bind that folder to the source so it looks like the source is populated with the dest's files).
 

egingell

Senior Member
Apr 10, 2012
4,755
2,059
47
blog.sophielabuf.com
if you've already mounted that source folder using any other means, un mount it first then use my app to bind it correctly.

Source (internal SD.. copying files FROM this).
Destination (external SD.. copying files TO this.. we'll eventually bind that folder to the source so it looks like the source is populated with the dest's files).

Nope. Not the problem. Nothing is bound to anything on my phone.

Sent from my SPH-D710 using XDA
 
  • Like
Reactions: slimboy77

StephenC82

Senior Member
Jan 10, 2011
289
30
Anyone tried to mount the obb folder? Doesn't work for me.
Love the app otherwise. Looking forward to the updates and to donate.

Sent from my GT-I9300 using xda premium
 

xSoNiCcRaCkErSx

Senior Member
May 29, 2006
96
13
California
+1

Android/data and Android/obb do not work. Also the app shows a green pin and you can't unmount it. (even though its not mounted to begin with)

Besides that it works! I tried it with my TWRP backups folder and Pictures folder and it allows me to mount (green pin) and unmount (white pin) just fine! Awesome job on this madmack, I don't know what kind of magic is going on behind the scenes but you seemed to have solved the issues I have been plagued with these past 2 days. The only thing left is to get those 2 gaming folders going! :D
 
  • Like
Reactions: drhell666

madmack

Senior Member
+1

Android/data and Android/obb do not work. Also the app shows a green pin and you can't unmount it. (even though its not mounted to begin with)

Besides that it works! I tried it with my TWRP backups folder and Pictures folder and it allows me to mount (green pin) and unmount (white pin) just fine! Awesome job on this madmack, I don't know what kind of magic is going on behind the scenes but you seemed to have solved the issues I have been plagued with these past 2 days. The only thing left is to get those 2 gaming folders going! :D

I did extensive testing for subfolders in Android/data and they work fine on my phone. I successfully played NFS from data stored in extSdCard :good:

What folders in Android/data are you trying to mount? If you're trying to mount /data itself then this could explain why it shows the green pin. Try mounting subfolders individually and see if that works.
 

xSoNiCcRaCkErSx

Senior Member
May 29, 2006
96
13
California
I did extensive testing for subfolders in Android/data and they work fine on my phone. I successfully played NFS from data stored in extSdCard :good:

What folders in Android/data are you trying to mount? If you're trying to mount /data itself then this could explain why it shows the green pin. Try mounting subfolders individually and see if that works.

Yes, you are right! I was trying to bind the entire folder. Doh! I tried NFS:MW and Spiderman and they both worked great. The obb folder however, even binding directories as you stated, gives the same result as posted above.
 

madmack

Senior Member
Yes, you are right! I was trying to bind the entire folder. Doh! I tried NFS:MW and Spiderman and they both worked great. The obb folder however, even binding directories as you stated, gives the same result as posted above.

awesome man :good:

I'm gonna look into that obb business later. Scary territory being that it's the "secure" and "protected" partition for private app data.

you guys got obb folders to mount correctly in 4.1 and in ICS/GB?
 

Colton127

Senior Member
Oct 7, 2011
269
50
N/A
Doesn't work for me, Apps always request to re-download data when everything is mounted properly as far as I know. It's already fully downloaded onto my external SD card in a folder, where I mounted it at.

App is also very confusing and obviously not near finished.

GSIII running 4.2.2.

EDIT: The problem only occurs with folders in obb, I tried it with a test folder on my internal and my music folder on external and it worked fine. What could be the issue with obb?
 
Last edited:

xSoNiCcRaCkErSx

Senior Member
May 29, 2006
96
13
California
awesome man :good:

I'm gonna look into that obb business later. Scary territory being that it's the "secure" and "protected" partition for private app data.

you guys got obb folders to mount correctly in 4.1 and in ICS/GB?

Did not try in 4.1 ICS but in 4.1 (4.1.2 + 4.1.2) JB I had just those two folders (data and obb) linked via Directorybind with no issues. I figured as much. When I first started trying to find a way to have all my games without swapping out, I was at first trying to use GL to SD which worked but had it's issues so I sought out other methods. I was messing around with those folders and realized the system had some hold over them when I was trying to remake the folders (to do my own custom links). It was then I found Directorybind and it solved the issues I was having.

I don't know much about how those folders work or are implemented but I know in my struggles to find a solution to this problem I noticed there is a protected obb folder under /mnt/. I wonder what this is for.
 

kakyyabata

Senior Member
Apr 16, 2011
113
36
Perfect app but i have one problem when i press setting nothing happened im trying to makw the app work in boot start

Jp 4.1.2

Sent from my GT-I9300 using xda premium
 

egingell

Senior Member
Apr 10, 2012
4,755
2,059
47
blog.sophielabuf.com
Perfect app but i have one problem when i press setting nothing happened im trying to makw the app work in boot start

Jp 4.1.2

Sent from my GT-I9300 using xda premium

Read the OP.

Things to still do:
  • Make a settings menu !
  • Launch on boot.
  • Possibly unlock the file explorer to navigate to more folders than just internal/external sd.
  • Widget to toggle all mounts on and off (low priority).

Edit: Speaking of reading the OP: you probably don't need a widget, but you might want to handle when the phone is plugged into a computer and USB Storage is on.
 
Last edited:
  • Like
Reactions: canis999

smar

Senior Member
Aug 27, 2005
151
36
London
Write access to bound folder

Looks to be potentially a very useful app!

I'm on 4.2.2 (Carbon ROM), and binding folders to the external SD card seems to work fine for read access. However, I am not able to write to any of the bound folders. Is this a known limitation or is there some work around?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 541
    Features of FolderMount:

    • Root is an absolute MUST. No root, no access to app.
    • Mount internal SD card folders to external SD folders.
    • Move content from internal to external when a pair is added. (Dialog prompt)
    • Support for Android 2.3 - 6.*.
    • Holo themed throughout and an intuitive GUI design.
    • It will check SDCARD mount status and remount if necessary.

    Why would you need this app?

    Today some apps store big files over the internal SD card (e.g. Games, Podcasts, Offline RSS feeds, Pictures, Offline navigation software). Typically users have a small internal sd card size (~16GB) while the external SD is a lot bigger (~32-64GB). Most of these apps don't have an option to use the external SD card to store data so they starve your internal SD card memory. I'm bringing this solution to fix this issue. In my case, I use this app to mount offline navigation software and some GameLoft games (NFS anyone?).

    Doesn't this do the same thing as previous apps?

    There are a few apps that already do this. However, my app differs in that:

    a) Some of the existing apps aren't maintained anymore. FolderMount will be maintained by me as we go forward.
    b) While most of the previous apps work properly in most cases, I found them not very intuitive to setup initially and were lacking some necessary "sanity checks" before linking folders. I intend to keep this app as intuitive and bug free as possible.
    c) Support for Android 4.2.2! No app will currently do that for you, so here it is. (dev talk: this uses the debuggerd service trick to get it to work).

    Users that buy the premium key will get:
    • Unlimited folder pairs (free version has a limit of 3).
    • Ability to mount any subfolder in the internal sdcard. (free version has restrictions on Android obb and data folders)
    • Get to see the folder sizes in root explorer
    • Support the developer and make him very happy :D

    Mini how to
    1. Click add to add a folder pair
    2. Select a source directory that you want to move files from. This should be somewhere in your internal sdcard. Usually located at /mnt/sdcard
    3. Select a destination directory that you want to move files to. This should be some folder in your external sdcard or OTG drive.
    4. FolderMount will offer to move the files to the destination. Click yes.
    5. After the moving process is done, click on the pin. If the pin is green, you're all set.
      Note: The files will appear in both the source and destination after pinning them. This is normal as the files that you see in your internal sdcard are actually located on your external sdcard. This is how FolderMount "tricks" apps that don't have the ability to save explicitly to the external sdcard.

    FAQ

    Please do read the FAQ before asking questions in this thread. If your question is ignored, it is most likely because the answer to it already exists in the FAQ.

    Note to users complaining about FM not working in KitKat with custom ROMs. Before asking any questions or complaining that FM does not work, have your kernel dev (or ROM cooker) look HERE


    Screenshots:

    1-small.png
    2-small.png
    3-small.png
    4-small.png
    5-small.png
    6-small.png
    7-small.png


    Video tutorial(s):

    1. by KiaTheKing

    Translations:

    Want to have FolderMount in your language? Help us by joining our crowdin project. More information here: http://www.devasque.com/foldermount/translations.html

    Bug reports:

    FolderMount version 2.2 and up support an integrated bug report and submission capability. Use the feature in the Settings menu to submit bug reports.

    Changelog:

    v2.9.11 (6/26/2016)
    • Broader compatibility with Samsung M devices

    v2.9.9 (6/7/2016)
    • Added Android Marshmallow compatibility
    • Android M support for Moto devices (disable sdcardfs module)
    • Cosmetic changes to copy notification (no more white text on white BG)
    • Root dialog has a clear check mark (or x mark if root was not granted)
    • Destination is sometimes not there, FM doesn't ask you to move files back when you delete that pair
    • Ask permissions to write to external sdcard using Storage Access Framework. Copy operations should work now in Android M
    • Initial support for Samsung devices running android M. A patch will be offered to replace two files. If your /data partition is encrypted, you will lose all data on it! There is no way around that at the moment. Once you factory reset, FM should work fine and you'll have AOSP encryption which TWRP can decrypt
    • Migration to new Android M permission granting model. FM will ask you for permission only when it needs these permissions


    Rest of changelog



    Disclaimer: This app does not guarantee functionality in any way, shape, or form. It is not my responsibility if this app does not work, breaks your sdcard or eats your kittens. User discretion is advised.
    23
    OK guys. Here is your first beta for MM. Please test it out thoroughly and report back ! It seems to work fine on my device for now.

    Warning: The copy/paste functionality is not thoroughly tested. Please do not use the FM copy/paste operation (from source to target, when offered) on your precious family photos/sensitive data. This warning is only for users running Android M. The rest of you should be ok.

    1. FM will ask you to kindly grant it access to the root path of your external sdcard on first launch. Do that.
    2. SuperSU by Chainfire is a must

    If you fulfill these two requirements, everything should work. I also added some minor cosmetic changes to users on Android M. The notification's "moving files" text shouldn't appear as white anymore.

    Enjoy and don't forget to report back on your experience.
    17
    Sorry guys it's been a while since I wrote (two months?). That is really because I am get swamped with work/life that I have very little time to dedicate to FM. Unfortunately the changes that Marshmallow requires are not a few lines of code. This is especially true given Samsung's recent mess with their M firmwares. Anyway, I have been working over the last week in whatever little time I have in my days to fix these issues and v2.9.3b is the result of this work. Change log is as following:

    • FolderMount copy operation has been improved immensely. Copying the entire Whatsapp folder (2.9G) in my device took about ~7 m instead of 2 days ! The reason why FM was so slow copying was because of the recent migration to SAF (Storage Access Framework) which Google is enforcing in android M. This new framework has many bugs, some of the methods they supply are extremely slow and inefficient so I took my time profiling these methods and optimizing them. I think this is acceptable at the moment. The only "slow" thing in my framework is the initial population of folder content. If you have a folder of 1000+ files, this operation might take ~10s but everything else is relatively acceptable.
    • Samsung ! You are killing me. This version is tested and working with Android M on the S7 edge. The previous beta version shipped with arm x64 binaries, hence why it didn't work on some of the earlier samsung phones. This one ships with the correct arm binaries so in theory it should work correctly with all Samsung ARM based devices 32/64bit.
    • Samsung: here is a big fat warning and there is very little I can do about it: If you accept the patches that FM proposes and your /data partition is encrypted (which is the default) then all your data and settings will be lost and you'll have to reformat your internal sdcard! Why you might ask? Well, I need to get rid of the custom fuse module that Samsung implements. Their fuse model is linked with the proprietary encryption tool they use. If I want to replace their proprietary encryption algorithm, I need to restore the AOSP encryption tools and there you go. Once you format your /data partition (either in recovery, or by simply rebooting), everything should work fine from that point on. You will end up with the AOSP encryption which, by the way, TWRP can decrypt.
    • exFAT ? No problem ! The new binaries support exFAT so at least your external sdcard don't have to be formatted too !

    Please test. Sorry if I didn't reply to any of your posts. I barely had time to put this in.

    I'll look at feedback on this beta in case something terrible happens ! So please keep posting your feedback in any case.
    14
    I actually did have a bit of time today and I got most issues worked out:
    • App now uses DocumentFile APIs to access external sdcard. Basically FM can now write to your external sdcard in MM. A lot of changes to the framework had to be incorporated here. I still have to "clean up" some of the code and make the write-access granting scheme a little more intuitive. Yes, you will have to explicitly grant access to the root directory of the ext_sdcard to FM.
    • Some commands changed in MM: Tools like "mount" have moved from "toolbox" to "toybox" (Thanks Google!!) so FM correctly adapts to this new change.
    • Mounting and unmounting works as long as you have SuperSU and not any other root app.

    One issue remains. Although the folders are mounted correctly, non-rooted apps aren't able to write into the target. The reason is the newly set permission (umasks) on these external sdcard mount points. It could be an issue that is local to CM-13.0, which is what I'm basing my work on, or the NTFS filesystem which is what my sdcard is formatted to. I need a bit more time to debug these problems and will post a beta APK once these issues are worked out.

    As always, no ETA. Just stay tuned.
    14
    Newly baked version is out. v2.9.4b addresses some of your comments so thanks for your invaluable feedback !

    • Fixed the ugly switch. No ugly artifacts anymore.
    • More optimizations to the SAF (Storage Access Framework). Copy operations should flow smoothly now.
    • Fixed a bug were if destination folder doesn't exist and you delete the pair, FM asks you to move files back to source. It now doesn't.
    • Android M? FolderMount will now not let you use the app unless it has the proper access rights to the external sdcard root path. If you give FM any other folder, it'll just keep popping the same dialog again until you do so. This is critical because a lot of the functionality of the app -such as the file browser- depends on this critical step being done correctly.

    As always, your feedback is very important. I am particularly worried about these versions breaking compatibility with pre-M releases of Android. I haven't tested that at all in these beta releases given that all my devices now have Android M. :cool: