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

[ROOT-APP] [GPL] Folders plug (mount folders like disks)

Search This thread

bartito

Inactive Recognized Developer
Dec 1, 2005
3,937
1,786
Hi,

**
Based on the init script explained in this thread, i've developed a application that allows to plug and unplug folders like device disks.
**

*** This application is in BETA stage ***
*** and requires root privileges ***

Many devices have two storage units (internal and external).

Most programs (games, GPS, etc) do not check this and work with internal storage memory.

This is useful for all users, some of whom prefer to store their data in external memory (removable).

In some cases (not all) can be made for a particular application to work on external memory rather than internal, but this is not always possible, especially because the external memory does not support unix soft-links.

To avoid this, I developed an application that can be mapped to internal memory (in fact in any directory on the device) a directory that is in the external memory (or elsewhere), which allows to solve the problem.

With this application you can access from any location to the data are physically located in another directory and query, modify and even delete them.

In addition, the application detects when you connect the terminal to another computer (PC, laptop, etc) and rolls back the operation to avoid problems. When the connection ends, the links are restored automatically.

INSTRUCTIONS

Start the application and allow to get root privileges
Click the menu key and click preferences menuitem to enable/disable mount on boot, then click back to go the main screen
Click the menu key and click Edit menuitem to edit mountpoints
In the edit mountpoints screen click the menu key in order to activate menu, that shows two options: delete all (deletes all added mountpoints) and insert new.
The insert new mountpoint screen allows to create a new mountpoint.
In the edit mountpoints screen, the defined mountpoints have their own contextual menu, that allows to delete, mount and unmount a mountpoint.

In the edit mountpoints screen, each mountpoint is represented by a icon (grayed or yellow) that indicates if the mountpoint is active (yellow) or inactive (grayed).
Also, i shows the source and target folders and a checkbox that indicates if the mountpoint is automounted on boot (if you've enabled in preferences screen).


********** UPDATE ***********
*** SOURCE CODE RELEASED ***


At this moment I have no time to update this app.
I have uploaded to GitHub and published the source code in GPL.
I agre if any people, can solve the app issues.

https://github.com/RYO-Software/Folders-Plug.git
 

Attachments

  • screenshot-1.jpg
    screenshot-1.jpg
    12.8 KB · Views: 2,238
  • screenshot-2.jpg
    screenshot-2.jpg
    13.9 KB · Views: 2,083
  • screenshot-3.jpg
    screenshot-3.jpg
    11.7 KB · Views: 2,336
  • screenshot-4.jpg
    screenshot-4.jpg
    24.9 KB · Views: 2,650
  • screenshot-5.jpg
    screenshot-5.jpg
    20 KB · Views: 2,279
  • screenshot-6.jpg
    screenshot-6.jpg
    11.2 KB · Views: 1,999
  • screenshot-7.jpg
    screenshot-7.jpg
    12.8 KB · Views: 2,105
  • FoldersPlug-1.0.0-b1.apk
    126.5 KB · Views: 502
  • FoldersPlug-1.0.0-b2.apk
    126.5 KB · Views: 152
  • FoldersPlug-1.0.0-b3.apk
    126.6 KB · Views: 271
  • FoldersPlug-1.0.0-RC1.apk
    126.8 KB · Views: 1,932
Last edited:

bartito

Inactive Recognized Developer
Dec 1, 2005
3,937
1,786
FoldersPlug 1.0.0-beta1 is attached to first post.

I agree to you very much if you test it and report issues (if any :)).
 
Last edited:
  • Like
Reactions: kkkhattak

Leni26

Member
Dec 12, 2010
15
0
I have two phones, Milestone 2 and SGSII. Today I tested on Milestone first but without success. The phone has 8GB build in Flash and 32GB add on SDCard. I tried to link from 'external' SDHC to the build in 8GB, but it doesn't work. The Phone uses the build in 8GB to store the installed apps, this could be the problem.

I tried some directories for the links, but the mount function fails. After some FC's and dead loops I'm now unable to copy manually files to the internal Storage.

Next tests will be on the SGSII, but I don't expect problems due to the easier environment.
 

bartito

Inactive Recognized Developer
Dec 1, 2005
3,937
1,786
I have two phones, Milestone 2 and SGSII. Today I tested on Milestone first but without success. The phone has 8GB build in Flash and 32GB add on SDCard. I tried to link from 'external' SDHC to the build in 8GB, but it doesn't work. The Phone uses the build in 8GB to store the installed apps, this could be the problem.

I tried some directories for the links, but the mount function fails. After some FC's and dead loops I'm now unable to copy manually files to the internal Storage.

Next tests will be on the SGSII, but I don't expect problems due to the easier environment.

hi.
if you have time i agree to you if you send to me a logcat
thx
 

bartito

Inactive Recognized Developer
Dec 1, 2005
3,937
1,786
I hope this is what you need ... I am not really familiar with all the development stuff

http://mueli.de/Android/2012-02-21_23-38-59.log


hi,
first of all: thank's for your time :)
second: i have located the error
seems to me that your "mount" command don't supports my parameters.
you can exec "mount -h" in a terminal emulator or via adb and tell me the results?
thank's

D/23:37:55.393 FoldersPlug(13141)
SuperuserCommandsExecutor: [unknown option -- -mount: invalid option --]
 

Leni26

Member
Dec 12, 2010
15
0
Do I need no more options for the mount command like in Linux with device file and other options?
 

bartito

Inactive Recognized Developer
Dec 1, 2005
3,937
1,786
Do I need no more options for the mount command like in Linux with device file and other options?

hi,
you need a special modifier in order to mount non block devices.
you have busybox intstalled?
please, exec "mount -h" and send me the result
 

Leni26

Member
Dec 12, 2010
15
0
Newest busybox is installed.
I got an invalid option -h error, logcat needs more time ...
 

theligu

Member
Jul 18, 2010
42
2
Skåne
Hi

I can confirm the same output of mount cmd as above on my galaxy p6800.
Is the --bind switch used or how does it work have read the script in the link you reffered to but surely you must have made some changes

/Calle
 

bartito

Inactive Recognized Developer
Dec 1, 2005
3,937
1,786
using p6200 - galaxy tab+

internal storage is known as sdcard and external being name as extStorages

the names are not relevant in the. process :)

Hi

I can confirm the same output of mount cmd as above on my galaxy p6800.
Is the --bind switch used or how does it work have read the script in the link you reffered to but surely you must have made some changes

/Calle

basically --bind with a amount of logic to configure and auto unmount/mount

Newest busybox is installed.
I got an invalid option -h error, logcat needs more time ...


please let me known if "mount --bind" shows a error.
in fact a error was triggered if you don't add the source and
target folders, but I'm interested on parameters error
 

theligu

Member
Jul 18, 2010
42
2
Skåne
This command works for me with the "-o bind", no errors
# mount -o bind /mnt/sdcard/extStorages/SdCard/LINKS/Download /mnt/sdcard/Download
 

bartito

Inactive Recognized Developer
Dec 1, 2005
3,937
1,786
updated apk in op post.
beta2 is working fine even in the emulator
 

Leni26

Member
Dec 12, 2010
15
0
Sorry for being late, now it's working on the Milestone II. But what I want to do will not work properly. The file system I want to use as storage is used by the system. Even if I change to rw, some of the target folder will be deleted and the files are gone.
There are a lot of different combinations I have to test further more.

Is there any way to include an option to change the file system (which holds the target 'mount point') rw as long as the mount is active?
 

bartito

Inactive Recognized Developer
Dec 1, 2005
3,937
1,786
Sorry for being late, now it's working on the Milestone II. But what I want to do will not work properly. The file system I want to use as storage is used by the system. Even if I change to rw, some of the target folder will be deleted and the files are gone.
There are a lot of different combinations I have to test further more.

Is there any way to include an option to change the file system (which holds the target 'mount point') rw as long as the mount is active?

hi,
please, print the mountpoint propierties (source and target) in order to clarify.
thx
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Hi,

    **
    Based on the init script explained in this thread, i've developed a application that allows to plug and unplug folders like device disks.
    **

    *** This application is in BETA stage ***
    *** and requires root privileges ***

    Many devices have two storage units (internal and external).

    Most programs (games, GPS, etc) do not check this and work with internal storage memory.

    This is useful for all users, some of whom prefer to store their data in external memory (removable).

    In some cases (not all) can be made for a particular application to work on external memory rather than internal, but this is not always possible, especially because the external memory does not support unix soft-links.

    To avoid this, I developed an application that can be mapped to internal memory (in fact in any directory on the device) a directory that is in the external memory (or elsewhere), which allows to solve the problem.

    With this application you can access from any location to the data are physically located in another directory and query, modify and even delete them.

    In addition, the application detects when you connect the terminal to another computer (PC, laptop, etc) and rolls back the operation to avoid problems. When the connection ends, the links are restored automatically.

    INSTRUCTIONS

    Start the application and allow to get root privileges
    Click the menu key and click preferences menuitem to enable/disable mount on boot, then click back to go the main screen
    Click the menu key and click Edit menuitem to edit mountpoints
    In the edit mountpoints screen click the menu key in order to activate menu, that shows two options: delete all (deletes all added mountpoints) and insert new.
    The insert new mountpoint screen allows to create a new mountpoint.
    In the edit mountpoints screen, the defined mountpoints have their own contextual menu, that allows to delete, mount and unmount a mountpoint.

    In the edit mountpoints screen, each mountpoint is represented by a icon (grayed or yellow) that indicates if the mountpoint is active (yellow) or inactive (grayed).
    Also, i shows the source and target folders and a checkbox that indicates if the mountpoint is automounted on boot (if you've enabled in preferences screen).


    ********** UPDATE ***********
    *** SOURCE CODE RELEASED ***


    At this moment I have no time to update this app.
    I have uploaded to GitHub and published the source code in GPL.
    I agre if any people, can solve the app issues.

    https://github.com/RYO-Software/Folders-Plug.git
    1
    FoldersPlug 1.0.0-beta1 is attached to first post.

    I agree to you very much if you test it and report issues (if any :)).
    1
    added instructions in first post.
    1
    I'm using the P6800, and mounting directory works nice (e.g. from /mnt/sdcard/extStorages/SdCard/Navigon to /mnt/sdcard/Navigon).

    But unfortunately the automount at boot doesn't work. I have to remount the directories manually all the time.

    Unfortunately logcat gives not a real hint.
    Code:
    I/ActivityManager( 2891): Start proc com.ryosoftware.foldersplug for broadcast com.ryosoftware.foldersplug/.MainReceiver: pid=3825 uid=10128 gids={}
    [...]
    D/FoldersPlug( 3825): MainReceiver: Event 'android.intent.action.BOOT_COMPLETED' received
    [... around 800 hundred lines of logcat ...]
    I/ActivityManager( 2891): Process com.ryosoftware.foldersplug (pid 3825) has died.
    Nothing else from Foldersplug.


    beta3 (posted at first post) solves the automount on boot bug.
    thx for your feedback
    1
    Well, i guess this would transform your app into Link2sd. And in my case it doesn`t start on boot. Also, if i link the app folder to sd, all aps would reside on sd, including launcher, which would make them crash on boot as folders plug won`t be able to start itself and create the link, being on sd.
    The problem i was really trying to solve(workaround) was bootloops when moving too many apps to sd, as i understand android (Linux) cannot handle more than 1-1.5 Gb of external data. So i was hoping that your app could somehow be the solution for that. But if Link2sd failed to do that, i guess this app would do the same.
    Good app for what it`s ment to do though, but curious if it can handle more than 1.5 Gb of external data.

    hi,
    if trubles with the on boot auto-mount option, please send me a logcat.
    when the 1.5 gb of space, this app provides extra space via mount operations, but don't modifies the android limits :)