[TOOL] DirectoryBind - move data to external_sd (GameLoft, Shadowgun etc.) ROOT req.

131 posts
Thanks Meter: 762
By slig, Senior Member on 25th December 2011, 12:09 PM
Post Reply Email Thread
Hi all !

This is my application to bind directories located on external_sd to directories on internal memory (/sdcard/). This way You can transfer large application data directories to external_sd. Could be usefull with ex.: games from Gameloft, other like Shadowgun, applications like CamScanner.


* Requires ROOT !
* Aimed at specific functionality and features (not idiot-proof)
* You can create any number of Data -> Target directory pairs, mount them manually or choose to mount them on system boot (checkbox does that).
* On/Off switch controls whole mount-on-boot function.
* Diskette icon indicates if mount operation was successful, by taping it You can mount/umount entry.
* Icon changes if application is using mounted entry
* DirectoryBind can tell what application is using this entry (tap at entry in use)
* Long tap on entry (disabled) brings edit/delete window
* App auto umount all entries on USB connected and remount after USB disconnected (for now via BroadcardReceiver UMS_CONNECTED / UMS_DISCONNECTED)
* App shows notification and vibrates if auto umount on USB fails
* If mounting all checked entries (ex. on boot) app is waiting specified time (def. 60 sec) if data directory is not available (happens sometimes at boot)
* Tested sucessfully with Asphalt 6, Shadowgun, DeadSpace, CamScanner

Color statuses:
* GRAY - entry disabled
* RED - mount failed
* BLUE - waiting for data availability
* GREEN - mounted OK

version 0.2.0k
* fixed FC if screen orientation changes during copy/delete
* more extensive logging

version 0.2.0m
* ?? fixed problem with entries marked green on boot, but not mounted (repotred by stone_ship)
* ?? fixed problem with random FC on ICS (reported by Thomas)

version 0.2.0n
* auto create target directory action moved from "bind" action to "add/edit entry" action due to possible problems when data outside "/sdcard"

version 0.2.0o
* added option to control if mount service is run as sticky

*** for now older version kept in case I broke something ***

please do not test data transfer files features on sensitive data they seem to work OK but are not throughly tested

Compiled using API android 2.3.3. Attached as self-signed development apk package. No market link for now.

important info
* Remember ! All entries must be umounted before attempting to use MASS STORAGE MODE. Application will try to do it automatically on USB CONNECT. If it fails and You'll use MASS STORAGE MODE sdcard partition WILL CRASH and reboot will be required to restore normal operations ! Main cause of that is appplication using mounted folder. You have to close that application and retry to umount entry.

* This application requires *root privileges* so it has full control over entire system! Uses root privileges to invoke "mount", "umount", "lsof" and "grep" shell commands via su and it DOES NOT write anything on system partitions.
It DOES NOT apply any permanent changes to the OS, however I cannot guarantee it does not contain BUGS and security issues. I'm not responsible to any damage it can cause. Use it AT YOUT OWN RISK !

application permissions explained
WRITE_EXTERNAL_STORAGE - application automatically creates target path, copy existing files from target to data
RECEIVE_BOOT_COMPLETED - application can perform automatic bind on boot
VIBRATE - application creates notification alert with vibrations when cannot umount all locations on USB connect
READ_LOGS - dump own logcat to file
*ROOT* - invoking "mount", "umount", "lsof" and "grep" commands via su

As every program can contain bugs so this one too. I'm very grateful if someone find and report a bug. No report will go unattended and I'll look into each case. There is just one thing, often report even very detailed is not enough so application has built in logging (logcat) capability - it can be enabled in Preferences.

Logcat can be dumped to file from main app window: menu -> dump logcat to file
So when reporting bug please attach that file to Your post

Regards !

1. In preferences check "alternate dbase mgmt" and try again
2. Report in this thread with informations
- does "alternate dbase mgmt" help ?
- are you using any taskkiller
- what ROM are you using

I need to know how many people have this issue, maybe it would be good to make "alternate dbase mgmt" default mechanism.
Sorry for that but I'm still learning and doing by best to make this app as much compatible and usable as possible. This is my first public app for android
Attached Files
File Type: apk DirectoryBind_0.2.0k.apk - [Click for QR Code] (74.0 KB, 280737 views)
File Type: apk DirectoryBind_0.2.0m.apk - [Click for QR Code] (74.2 KB, 39437 views)
File Type: apk DirectoryBind_0.2.0n.apk - [Click for QR Code] (74.2 KB, 30607 views)
File Type: apk DirectoryBind_0.2.0o.apk - [Click for QR Code] (74.5 KB, 424504 views)
The Following 694 Users Say Thank You to slig For This Useful Post: [ View ] Gift slig Ad-Free
25th December 2011, 05:52 PM |#2  
Chainfire's Avatar
Moderator Emeritus / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 88,311
Donate to Me
Moved to "Themes and Apps" section.
The Following 29 Users Say Thank You to Chainfire For This Useful Post: [ View ]
26th December 2011, 01:53 AM |#3  
Junior Member
Thanks Meter: 4
Great Tool - but a bit too restrictive
Hi Slig,

I was just scanning the net for such a tool. Alread startet to write my on mounting script and using tasker to swich it on or off. But your tool is much more comfortable. (As a newbi I haven't got it right to unmount a binded directory - always got an error from script manager, maybe someone can explain this as well .. )

I just have an urgent question: I am using a SGSII (that sounds good) and the cyanogenmod 7. And here starts the problem: This mod is not mounting the external SD Card to /sdcard/external_sd.

So I want to mount /mnt/emmc/ to /sdcard/external_sd and some other things like the Gameloft folders as you did etc.

But I always get error "enter valid source directory" - probably because of your limitation to start every dir with /sdcard - so, can you implement an option for advanced users to turn this off?

Otherwise this tool can not be used by myself - which would be a pitty.

Kind regards and thank for the good job - even if it doesn't work with my configuration.

The Following 4 Users Say Thank You to ret-law For This Useful Post: [ View ] Gift ret-law Ad-Free
26th December 2011, 11:53 AM |#4  
OP Senior Member
Thanks Meter: 762
I'll post next version with Your suggestions. There is one more problem I have to correct, sometimes mount on boot fails. Look like external sd card is not ready when app tries to bind. I'm on it now.
The Following 6 Users Say Thank You to slig For This Useful Post: [ View ] Gift slig Ad-Free
26th December 2011, 11:55 AM |#5  
TecQuality's Avatar
Senior Member
Flag Trieste
Thanks Meter: 148
looks promising keep up the great job dude
27th December 2011, 11:20 AM |#6  
OP Senior Member
Thanks Meter: 762
Added version 0.1.3m. I'll add some more configuration options in next releases. Of course it is still in pre-pre-alpha state.
The Following 3 Users Say Thank You to slig For This Useful Post: [ View ] Gift slig Ad-Free
27th December 2011, 01:15 PM |#7  
Thanks Meter: 11
Just what i needed :) seems to be working perfectly so far. Great app mate, thanks.
The Following User Says Thank You to nayparm For This Useful Post: [ View ] Gift nayparm Ad-Free
27th December 2011, 05:14 PM |#8  
Junior Member
Thanks Meter: 1
Thank you!!!!
Finally I found a good app to move the data of gameloft games, thank you very much, great job!!!!!
27th December 2011, 09:16 PM |#9  
OP Senior Member
Thanks Meter: 762
Added another update - now appliction indicates by icon in list if entry is in use by some other application (requires busybox).
The Following 3 Users Say Thank You to slig For This Useful Post: [ View ] Gift slig Ad-Free
28th December 2011, 11:31 PM |#10  
OP Senior Member
Thanks Meter: 762
Another update Added preferences window, now several options are configurable plus some minor fixes and improvements.
The Following 5 Users Say Thank You to slig For This Useful Post: [ View ] Gift slig Ad-Free
29th December 2011, 03:02 AM |#11  
Thanks Meter: 11
Originally Posted by slig

Another update Added preferences window, now several options are configurable plus some minor fixes and improvements.

This just keeps getting better, thanks slig. Gameloft and copilot moved so far. Gave me 5gb back :)
The Following User Says Thank You to nayparm For This Useful Post: [ View ] Gift nayparm Ad-Free
Post Reply Subscribe to Thread

move data to external sd, move data to sdcard

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes