Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,784,443 Members 48,291 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
slig
Old
(Last edited by slig; 18th January 2012 at 08:25 PM.)
#1  
Senior Member - OP
Thanks Meter 748
Posts: 131
Join Date: Sep 2008
Wink [TOOL] DirectoryBind - move data to external_sd (GameLoft, Shadowgun etc.) ROOT req.

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.

screenshot:




Features:
* 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

BUGS REPORTING
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 !
Slig

!!! IF YOU HAVE ISSUE WITH ENTRIES DISAPPEARING AFTER REBOOT !!!
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, 182035 views)
File Type: apk DirectoryBind_0.2.0m.apk - [Click for QR Code] (74.2 KB, 26294 views)
File Type: apk DirectoryBind_0.2.0n.apk - [Click for QR Code] (74.2 KB, 20689 views)
File Type: apk DirectoryBind_0.2.0o.apk - [Click for QR Code] (74.5 KB, 325472 views)
The Following 680 Users Say Thank You to slig For This Useful Post: [ Click to Expand ]
 
Chainfire
Old
#2  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter 49,395
Posts: 9,017
Join Date: Oct 2007

 
DONATE TO ME
Moved to "Themes and Apps" section.
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - DONATE

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

NOTICE: I do not respond to tech support questions through PM.
The Following 28 Users Say Thank You to Chainfire For This Useful Post: [ Click to Expand ]
 
ret-law
Old
#3  
Junior Member
Thanks Meter 4
Posts: 1
Join Date: Dec 2011
Default 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.


ret-law
The Following 4 Users Say Thank You to ret-law For This Useful Post: [ Click to Expand ]
 
slig
Old
#4  
Senior Member - OP
Thanks Meter 748
Posts: 131
Join Date: Sep 2008
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: [ Click to Expand ]
 
TecQuality
Old
#5  
TecQuality's Avatar
Senior Member
Thanks Meter 146
Posts: 1,309
Join Date: Feb 2009
looks promising keep up the great job dude


 
slig
Old
#6  
Senior Member - OP
Thanks Meter 748
Posts: 131
Join Date: Sep 2008
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: [ Click to Expand ]
 
nayparm
Old
#7  
Junior Member
Thanks Meter 9
Posts: 26
Join Date: Nov 2008
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: [ Click to Expand ]
 
aresjan
Old
#8  
Junior Member
Thanks Meter 0
Posts: 4
Join Date: Dec 2011
Default Thank you!!!!

Finally I found a good app to move the data of gameloft games, thank you very much, great job!!!!!
 
slig
Old
#9  
Senior Member - OP
Thanks Meter 748
Posts: 131
Join Date: Sep 2008
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: [ Click to Expand ]
 
slig
Old
#10  
Senior Member - OP
Thanks Meter 748
Posts: 131
Join Date: Sep 2008
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: [ Click to Expand ]
Tags
move data to external sd, move data to sdcard
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes