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

Search This thread

cloud596

Senior Member
Jan 7, 2011
207
43
i tried v 1.08.
i had question. the folder is mounted , cause i see it on my files .
but in directory bind application. suddenly its just disappear are,u sure,its no a bug
 

slig

Senior Member
Sep 14, 2008
131
762
i tried v 1.08.
i had question. the folder is mounted , cause i see it on my files .
but in directory bind application. suddenly its just disappear are,u sure,its no a bug

Hi :) Thanks for posting !

Maybe there is a bug, please post some more details. I uderstand that disappear = turns green->gray or entry disappeared completly from the list ? What are data and target paths ? If it's possible please post steps to reproduce. Also You could enable logging and post content of log file after problem occurence. If there is a bug I'll surely track it.
 
Last edited:

cloud596

Senior Member
Jan 7, 2011
207
43
yep the entry it just disappear completely from aplications, i enable debug log but i thought there wasn't any suspicious yet.

1/00/2012 20:04:20 - Loading database.
1/00/2012 20:04:20 - Checking entry availability.
1/00/2012 20:04:20 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
1/00/2012 20:04:20 - Entry found = unvailable.
1/00/2012 20:04:28 - Loading database.
1/00/2012 20:04:28 - Checking entry availability.
1/00/2012 20:04:28 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
1/00/2012 20:04:28 - Entry found = unvailable.
1/00/2012 20:16:21 - Loading database.
1/00/2012 20:16:21 - Checking entry availability.
1/00/2012 20:16:21 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
1/00/2012 20:16:21 - Entry found = unvailable.
1/00/2012 20:44:05 - Loading database.
1/00/2012 20:44:05 - Checking entry availability.
1/00/2012 20:44:05 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
1/00/2012 20:44:06 - Entry found = unvailable.
1/00/2012 21:06:03 - Service called (onStartCommand).
1/00/2012 21:06:03 - Operation: 5
1/00/2012 21:06:03 - Loading database.
1/00/2012 21:06:03 - Checking entry availability.
1/00/2012 21:06:03 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
1/00/2012 21:06:03 - Entry found = unvailable.
1/00/2012 21:06:03 - Trying to bind all checked.
2/00/2012 7:13:54 - Loading database.
2/00/2012 7:13:58 - Service called (onStartCommand).
2/00/2012 7:13:58 - Operation: 1
2/00/2012 7:13:58 - Loading database.
2/00/2012 7:13:58 - Trying to bind all checked.
2/00/2012 7:14:07 - Loading database.
2/00/2012 7:14:42 - Loading database.
2/00/2012 7:14:45 - Service called (onStartCommand).
2/00/2012 7:14:45 - Operation: 1
2/00/2012 7:14:45 - Loading database.
2/00/2012 7:14:45 - Trying to bind all checked.
2/00/2012 7:14:51 - Loading database.
2/00/2012 7:14:57 - Service called (onStartCommand).
2/00/2012 7:14:57 - Operation: 2
2/00/2012 7:14:57 - Loading database.
2/00/2012 7:14:57 - Trying to UN-bind all.
2/00/2012 7:15:00 - Service called (onStartCommand).
2/00/2012 7:15:00 - Operation: 1
2/00/2012 7:15:00 - Loading database.
2/00/2012 7:15:00 - Trying to bind all checked.
2/00/2012 7:15:19 - Loading database.
2/00/2012 7:15:19 - Checking entry availability.
2/00/2012 7:15:19 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/00/2012 7:15:20 - Entry found = unvailable.
2/00/2012 7:15:25 - Service called (onStartCommand).
2/00/2012 7:15:25 - Operation: 1
2/00/2012 7:15:25 - Loading database.
2/00/2012 7:15:25 - Checking entry availability.
2/00/2012 7:15:25 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/00/2012 7:15:25 - Entry found = unvailable.
2/00/2012 7:15:25 - Trying to bind all checked.
2/00/2012 7:15:40 - Loading database.
2/00/2012 7:15:40 - Checking entry availability.
2/00/2012 7:15:40 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/00/2012 7:15:40 - Entry found = unvailable.
2/00/2012 7:15:45 - Loading database.
2/00/2012 7:15:45 - Checking entry availability.
2/00/2012 7:15:45 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/00/2012 7:15:45 - Entry found = unvailable.
2/00/2012 7:15:48 - UN-bind, umount process returned OK on /sdcard/gameloft/.
2/00/2012 7:15:48 - Checking entry availability.
2/00/2012 7:15:48 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/00/2012 7:15:48 - Entry not found.
2/00/2012 7:15:52 - Service called (onStartCommand).
2/00/2012 7:15:52 - Operation: 1
2/00/2012 7:15:52 - Loading database.
2/00/2012 7:15:52 - Checking entry availability.
2/00/2012 7:15:52 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/00/2012 7:15:52 - Entry found = unvailable.
2/00/2012 7:15:52 - Trying to bind all checked.
2/00/2012 7:16:11 - Loading database.
2/00/2012 7:16:11 - Checking entry availability.
2/00/2012 7:16:11 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/00/2012 7:16:11 - Entry found = unvailable.
2/00/2012 9:10:19 - Loading database.
2/00/2012 9:10:39 - Loading database.
2/00/2012 9:11:11 - Loading database.
2/00/2012 9:11:14 - Service called (onStartCommand).
2/00/2012 9:11:14 - Operation: 1
2/00/2012 9:11:14 - Loading database.
2/00/2012 9:11:14 - Trying to bind all checked.
2/00/2012 9:11:41 - Loading database.
2/01/2012 9:22:11 - Loading database.
2/01/2012 9:22:19 - Service created (onCreate).
2/01/2012 9:22:19 - Service called (onStartCommand).
2/01/2012 9:22:19 - Operation: 2
2/01/2012 9:22:19 - Loading database.
2/01/2012 9:22:19 - Trying to UN-bind all.
2/01/2012 9:22:21 - Service called (onStartCommand).
2/01/2012 9:22:21 - Operation: 1
2/01/2012 9:22:21 - Loading database.
2/01/2012 9:22:21 - Trying to bind all checked.
2/01/2012 9:22:23 - Service called (onStartCommand).
2/01/2012 9:22:23 - Operation: 1
2/01/2012 9:22:23 - Loading database.
2/01/2012 9:22:23 - Trying to bind all checked.
2/01/2012 9:22:28 - Loading database.
2/01/2012 9:22:51 - Loading database.
2/01/2012 9:22:51 - Checking entry availability.
2/01/2012 9:22:51 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/01/2012 9:22:51 - Entry found = unvailable.
2/01/2012 9:22:57 - Service called (onStartCommand).
2/01/2012 9:22:57 - Operation: 1
2/01/2012 9:22:57 - Loading database.
2/01/2012 9:22:57 - Checking entry availability.
2/01/2012 9:22:57 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/01/2012 9:22:57 - Entry found = unvailable.
2/01/2012 9:22:57 - Trying to bind all checked.
2/01/2012 9:23:05 - Loading database.
2/01/2012 9:23:05 - Checking entry availability.
2/01/2012 9:23:05 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/01/2012 9:23:05 - Entry found = unvailable.
2/01/2012 9:23:59 - Loading database.
2/01/2012 9:23:59 - Checking entry availability.
2/01/2012 9:23:59 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/01/2012 9:23:59 - Entry found = unvailable.
2/01/2012 9:24:14 - Loading database.
2/01/2012 9:24:14 - Checking entry availability.
2/01/2012 9:24:14 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/01/2012 9:24:14 - Entry found = unvailable.
2/01/2012 10:55:26 - Trying to bind all checked.
2/01/2012 11:06:24 - Loading database.
2/01/2012 11:07:27 - Loading database.
2/01/2012 11:08:34 - Loading database.
2/01/2012 11:08:34 - Checking entry availability.
2/01/2012 11:08:34 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/01/2012 11:08:34 - Entry found = unvailable.
2/01/2012 11:24:22 - Loading database.
2/01/2012 11:24:22 - Checking entry availability.
2/01/2012 11:24:22 - Entry /sdcard/gameloft/=/mnt/sdcard/gameloft.
2/01/2012 11:24:22 - Entry found = unvailable.

edit : today after i rebooted my sgs2 , auto bind failed because there is no path entry , so i create new entry again, o u know why.

but this application still great, now i dont need to worry by installing massive game
 
Last edited:

slig

Senior Member
Sep 14, 2008
131
762
Two more things
1. Are You using some kind of task killer ?
2. Application saves database on exit from main activity (on back button press), are You exiting application with back button ?

It look like application is killed multiple times and does not have a chance to save database. If You are using task killer please tell me which one and if possible exclude this application.

Regards
Slig
 
  • Like
Reactions: cloud596

cloud596

Senior Member
Jan 7, 2011
207
43
Two more things
1. Are You using some kind of task killer ?
2. Application saves database on exit from main activity (on back button press), are You exiting application with back button ?

It look like application is killed multiple times and does not have a chance to save database. If You are using task killer please tell me which one and if possible exclude this application.

Regards
Slig
1. no I'm using zdbox and
set this application as exclude from auto kill
by memory management.
2. sometimes i use back button, do you think it will close application.

thanx anyway
 

slig

Senior Member
Sep 14, 2008
131
762
I've uploaded small update.
All logs go to logcat now (if logging enabled), log file select option removed.
Added EXPERIMENTAL option "alternate dbase mgmt" - database is saved as soon as there are any changes (normally on main window exit). No need to enable this option if there are no issues with disappering entries.

@cloud596 - please check it that option helps

If anyone has similar issues with database saving as cloud596 please report with logcat attached (tag: DirectoryBind).

Regards
 

slig

Senior Member
Sep 14, 2008
131
762
Hi all !

New version published. Added functionality to move existing data to external_sd.
Problems, bug reports and feature requests are welcome.
 
Last edited:

elmo180

Member
Sep 25, 2011
21
2
Hi,

great idea for app. Auto moving files to external_sd doesn't work in my case. No matter that i create new directory by your app or by Files Explorer it says that directory is not empty :(
 

slig

Senior Member
Sep 14, 2008
131
762
Hi,

great idea for app. Auto moving files to external_sd doesn't work in my case. No matter that i create new directory by your app or by Files Explorer it says that directory is not empty :(

Hi ! :)
Thans for info. I assume it says "Data directory not empty" ?

To clear things out I'll explain here how this feature works:

For example:
1. You have /sdcard/gameloft folder that contains game data folders
2. In application You choose "New Entry"
3. In Data field type /sdcard/external_sd/gameloft or start directory browser, create and select this directory (/sdcard/external_sd/gameloft)
4. In Target field type /sdcard/gameloft or start directory browser and select /sdcard/gameloft
5. Check Transfer data checkbox and click ADD ENTRY

all content from /sdcard/gameloft/ will be transferred to newly created /sdcard/external_sd/gameloft/ after that new entry in application will be created (transfer will be from target to data)
after that operation data directory will contain files and target will be empty

"Data" is mount data folder and "Target" is mount target folder.
So before operation "Target" should contain program files and Data should be empty.

Please check if You are correct with this steps and report. If it still fail we'll have to figure out what is wrong.

Regards !
Slig
 
Last edited:
  • Like
Reactions: pat357 and demonntl

Amal77

Member
Jul 11, 2009
46
8
One of the most useful apps!

Hope you can include some kind of configuration save file, so that we can restore it easily in the future.

Thanks!
 

slig

Senior Member
Sep 14, 2008
131
762
No problem, today I have some free time so I added a little bit more usability to application.

Version 0.1.9k posted:
* Assistant mode menu option in "add new entry" activity - to ease data transfer process and avoid confusions
* Backup / restore database option in main activity (file can be choosen in preferences, default /sdcard/directorybind_conf.csv)

Many code lines written today to if any bugs found - report (with logcat if possible ;) ).
 

mobilio

Senior Member
Feb 23, 2009
369
19
Great Works!

By the way, have some queries on "mounting" after the mobile reboot.

1. I have marked the "Blind on Boot", but seems the mounting not work after reboot.
2. The entries seem disappear after reboot and need to map everytime.

Anyways, this is great!! as it moved about 3GB data to SD card now :D
 

Amal77

Member
Jul 11, 2009
46
8
No problem, today I have some free time so I added a little bit more usability to application.

Version 0.1.9k posted:
* Assistant mode menu option in "add new entry" activity - to ease data transfer process and avoid confusions
* Backup / restore database option in main activity (file can be choosen in preferences, default /sdcard/directorybind_conf.csv)

Many code lines written today to if any bugs found - report (with logcat if possible ;) ).

GREAT!

Thanks!

---------- Post added at 04:47 PM ---------- Previous post was at 04:45 PM ----------

Great Works!

By the way, have some queries on "mounting" after the mobile reboot.

1. I have marked the "Blind on Boot", but seems the mounting not work after reboot.
2. The entries seem disappear after reboot and need to map everytime.

Anyways, this is great!! as it moved about 3GB data to SD card now :D

Enable or tick the Alternate dbase mgmt
 

slig

Senior Member
Sep 14, 2008
131
762
Great Works!

By the way, have some queries on "mounting" after the mobile reboot.

1. I have marked the "Blind on Boot", but seems the mounting not work after reboot.
2. The entries seem disappear after reboot and need to map everytime.

Anyways, this is great!! as it moved about 3GB data to SD card now :D

Yes, try to enable "Alternate dbase mgmt" in Preferences and report back. It would be great if You could post logcat dump on "DirectoryBind" tag. This is very strange issue I don't fully understand. It does not happen in my case so I need more info on this.
It would be wonderful If You could make log dump with and without "alternate dbase mgmt" ticked. You have to enable logging in program prefs. Logs from opening app, adding new entry (no need to transfer files) and closing main app window are enough. I really need those logs to pinpoint the problem. Look at first post about dumping logcat.

EDIT:
Added option to dump logcat to file - You can use it to easily dump logs and post them here when reporting a bug.
 
Last edited:

mobilio

Senior Member
Feb 23, 2009
369
19
Yes, try to enable "Alternate dbase mgmt" in Preferences and report back. It would be great if You could post logcat dump on "DirectoryBind" tag. This is very strange issue I don't fully understand. It does not happen in my case so I need more info on this.
It would be wonderful If You could make log dump with and without "alternate dbase mgmt" ticked. You have to enable logging in program prefs. Logs from opening app, adding new entry (no need to transfer files) and closing main app window are enough. I really need those logs to pinpoint the problem. Look at first post about dumping logcat.

EDIT:
Added option to dump logcat to file - You can use it to easily dump logs and post them here when reporting a bug.


Thanks for the fast response.

Have updated to 2.0c and using the "alternate dbase mgmt", it's now ok :)

Can have the mapping and the entry setting after reboot.
 

davelinders

Senior Member
Jan 27, 2011
622
83
Thnx works very great even gta3 works with this app.

Also bindings gone after reboot.
Ok with that other setting on its now all good after reboot.

Masterpiece program.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 694
    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:
    SC20111225-111214.png
    SC20120105-183116.png


    SC20120105-183406.png
    SC20120105-183427.png


    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 ;)
    29
    Moved to "Themes and Apps" section.
    15
    How do we get this to work? I've moved my game files to my sd card on my otg cable for my nexus 7 and I've tried to mount the obb folder using this http://xdaforums.com/showthread.php?t=2155363 but my games such as Asphalt still tell me to download data :/

    I haven't tested it with obb folders tbh. I just added my bind commands to the debugger.mnt file then executed remount.sh.

    (I think I'm going to release an app to make everyone's life easier. It'll have a modern GUI, intuitive layout, and compatible with 4.2.2). I'll post a link to it here once it's all finished. :good:
    7
    Later posts seems to sound like the posters are blaming or are angry with the author of the app. This is really sad.

    Anyway, I would like to answer some questions and hope that people would be more polite in the future as the author wrote the app for free and saved a lot of people time and effort. Without the app, people like me usually wrote script to mount the links and now we have nice GUI to do that. I am most thankful for the auto unmount feature. Previously when using script, I must make sure that I unmount the link before unmounting the external card (to mount to pc). If I forgot that, then the external card would later fail to bind anymore until I restart my device.

    On the version, the higher the number, the newer it is. If the number is the same, then the later alphabet is newer, meaning "b" is newer than "a".

    On the app itself, it is a frontend to perform mount/unmount, while allowing moving files automatically. So, whatever limitation you are facing is on the OS, not the app. The app helps you to move files (when creating the link), helps you mount the link (on every reboot), helps you unmount the link when your external card is unmounted (and remount it), and helps you move back the files when you delete the link. It uses mount and umount to perform the linking/unlinking process. They are commands that come with the busybox.

    On why source is the external card and the target is the original path, the author uses the parameter naming used by mount and umount. When mounting, the source is where the data is, while the target is where you want it to appear. Mount also requires that the target directory must exists and empty. If it does not exists, the mounting process would fail.

    For installing app, as long as there are sufficient space to where the OS is installing it to, it will install successfully. If it complains that there are insufficient space while there is plenty, then it has something to do with what you have done, such as rogue odex file (normally caused by cracking apps with Lucky Patcher). There are also cases where the app to be installed is at fault. This would normally be solved when the app is updated.

    So, I hope I clear up some confusion with this post and please, if you can't get any apps developed freely by generous developers to work while others have no problem, try to understand how they work and do some research before bashing the authors.

    Thanks.

    Sent from my GT-N7100 using Tapatalk 2
    6
    ...I've been living the dream ever since a ... scripter produced a solution to the FAT32 limitation on AOSP.
    I doubt that. :) Tech should be working for you, you shouldn't be working for the tech. If you ever are, you should ditch it and use something else.
    Directory Bind no longer works on 4.2 though. There are some workarounds I've been made aware of but they're very technical and I haven't tried them yet​
    BTW, there are fixes, technical is a relative term. I created a workaround to the 4.2 issue and it is what I use. I even attached my proxy wrapper at the bottom of the project so people could play with it.

    ...

    Ok, I'm going to threadjack a bit here. I'm the person who wrote that script. However, I have been informed that there would be more demand for an app like this one -- and slig has been MIA for a little over a year. When I check out Google, I see a bunch of bad instructions on blogs, and people making a bunch of incorrect statements. (Particularly regarding 4.2)

    As an example, I rebound inside data/data manually -- worked fine. It's just that this tool is broken because of the zygote-restricted-slave-mountspace bug/feature. Most of the problems seem to come from the lack of a GUI, not the lack of it being possible.

    I see a need for a New Unified Volume Daemon (NuVold). Something that is (1) GUI/Play Store based (2) portable across devices + integrates in Android Storage Manager for SD (3) mounts + repairs wacky filesystems (4) on partitioned devices (5) can rebind directories (6) softlink/install apps to SD card. [Swapping internal/external storage is not needed (and pointless) if something can do (5) and (6) in a user-friendly way.]

    Currently, multiple utilities do each in a semi-broken and nonconsistent way. (Paragon broken on 4.2, my script can sorta do 2-5 but via command line, Directory Rebind broken, ExtSd2InternalSd hijacks mount at boot...)

    Essentially, I am proposing a merger of my "fuse-mountsd", "Super APP2SD", "Directory Rebind", "Paragon's FS App" (the execution, not the proprietary stuff), "StickMount", "ntfs-3g", and "exfat-fuse". This is possible, but would require a lot of work. Plus there's no way you could charge for it, given all the chefs.