Go Back   Android Forums > Android Phones > Samsung Galaxy S3 > (International) Galaxy S3 - All Things Root

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

Like Tree5Likes
  • 2 Post By SUroot
  • 2 Post By D3K17
  • 1 Post By D3K17

test: Reply
 
LinkBack Thread Tools
Old March 6th, 2013, 05:57 PM   #1 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default [Script][4.2.x] Move /sdcard app data to /extSdCard (Wip) [updated 7th Mar]

What is this?

Hi all,

This is a script that will allow you (with your 4.2.x ROM) to bind the data from any app or game from /sdcard/Android/data to extSdCard. This means, your internal memory is no longer being filled by 6 Games (and their respective data) on the 16 GB versions of the S3.

Hasn't this been done before?

Yes and no. Back in the 4.0.4, 4.1.1 and 4.1.2 days, we could all use an app called "Directory Bind" but this no longer works in 4.2.x because Google have changed the way this works (Permissions). What happens now, is only the app that creates the bind can see it. For example, if you bind one directory to another using terminal, if you cd to the original location, do an "ls" list command and it will list you the data in the new location. However, browse to the original location in a file manager, it will be empty.

So this script works?

Yes it does. It uses what is unfortunately an "ugly" work around, by hijacking a system processes (debugger daemon) to achieve elevated permissions (Above and beyond that of su).

The script is still very much a "Work in Progress". I would even call it a proof-of-concept at this point. It will be tidied up and made more user friendly as time goes on. Right now though, I'm just happy to have it working.

Is this the only way?

No it is not. There are ways of changing the Dalvik cache or patching init.rc and various other technical methods that have found their way into AOSP / CM based roms. This is a way to achieve that on a stock rooted setup (Touchwiz) without high detail patching that the normal root user may not be in a position to do.

Any limitations?
  • It assumes that for app data, you will have one named directory you bind everything to. For example, I have the default set as /extSdCard/bind. The script creates my new app directories within there, then binds the original over to it.
  • You have to set your defaults on first use before you can bind.
  • It uses script manager to run and manage the scripts.
  • There is not yet a way of reversing a bind through the script. It can be done manually however. Scope for future.
  • The option to select defaults, in the terminal display is not a single column, which makes it tricky to see. You need to go to landscape mode for a better view.
  • Very few games have a hidden folder starting "." - These cannot be bound (copy issue)


How does it work?

We have in the attached zip, 2 scripts. 1 manages the set up of your defaults and mounts. The other does the daemon hijacking. The 1st calls the second script when a new mount is added (although I haven't confirmed this 100% working yet).

Script manager to be used to call the primary script but also it can be used to call the secondary too. The hijack needs to occur at every boot too.


Instructions

Depricated

Keeping my work: http://forum.xda-developers.com/showthread.php?t=2178863
Attached Files
File Type: zip mounter.zip (2.1 KB, 44 views)
Shotgun84 and funkylogik like this.

SUroot is offline  
Last edited by SUroot; March 15th, 2013 at 08:23 PM.
Reply With Quote
The Following 4 Users Say Thank You to SUroot For This Useful Post:
D3K17 (March 14th, 2013), funkylogik (March 7th, 2013), Shotgun84 (March 7th, 2013), silentwitness (March 7th, 2013)
sponsored links
Old March 7th, 2013, 01:29 AM   #2 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default Re: [Script][4.2.x] Move /sdcard app data to /extSdCard (Wi

Changes Log

14th March 2013
  • Added "initial install" option which handles all initial debuggerd set up. It also restores an auto-backup debuggered.mnt after a ROM flash
  • Created a "remove all Binds" option which replaces debuggered.mnt with a clean version
  • Finally changed the copy syntax to allow support of hidden files.

-----------------------------------------------------------------------


7th March 2013
  • Added copy function of debuggerd.mnt to script location (to backup if flashing ROM)
  • Expanded main menu to include more options:

1) Set Defaults
2) App Data: End-to-end Bind Wizard
3) App Data: Bind Only (Data already moved)
4) Bind /sdcard/* to /extSdCard/* End-to-end Wizard
5) Bind /sdcard/* to /extSdCard/* (already moved)
6) Quit
SUroot is offline  
Last edited by SUroot; March 14th, 2013 at 06:02 PM.
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
D3K17 (March 14th, 2013)
Old March 14th, 2013, 05:41 PM   #3 (permalink)
New Member
 
Join Date: Mar 2013
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 4
Thanked 2 Times in 1 Post
Default

Hello.

I just wanted to say THANK YOU so much for this, I have been trying to solve the problem with little to no luck on 4.2.2. I even modded the extSD2InternalSD script which worked, but did not allow me to install applications to the extSD (now main SD).

I tried your scripts and it worked but none of the games I try to launch recognize it. File managers also see it as a different partition and the folders in the binded folder as blank files. I bound my Android folder (which contains my data and obb folder respectively). It shows as an alternately mounted device in file managers (FX Explorer, Total Commander) however upon adbing into the file system it shows that the bind did indeed work. (Root Explorer also shows the bind as working perfectly) These two sources show the bind as it was with DirectoryBind but the others do not and the games don't seem to see it either.

I have tried about 10 games and none of them read the data that is present in the bind, which makes me think there is something else small hindering this from going through. The games also state there is 'no space' left to download the game data when I am prompted to do so. I have successfully done this with DirectoryBind on 4.1 but your solution here is the closest I have come to it in 4.2.

Do you have any clues as to how to solve this or fix this? I have a lot of experience with symbolic links on various Linux distributions, but I am dumbfounded as to how to properly implement it within the Android framework. I really appreciate your hard work here, this is awesome and you should turn it into an app once it's in the state you want it to be in.

I will gladly offer any assistance I can to get this working right, a LOT of people need something like this especially gamers like me! Do you have a donation link? I will gladly send you a nice incentive to put some more time into this !(and to thank you for the work you have already done)

Thanks again
SUroot and funkylogik like this.
D3K17 is offline  
Reply With Quote
The Following 2 Users Say Thank You to D3K17 For This Useful Post:
funkylogik (March 14th, 2013), SUroot (March 14th, 2013)
Old March 14th, 2013, 06:00 PM   #4 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default

You're not on AOKP are you?

Please can you run the remount.sh then can you give me the output of "mount" in a terminal please?

It may be a lot of code, so please do use the code tags in your post (looks like a # button in advanced editing mode)

Or have a look at madmack's posts here:

http://forum.xda-developers.com/showthread.php?t=2178863&page=5

He had to remount his sdcard....
SUroot is offline  
Last edited by SUroot; March 14th, 2013 at 06:04 PM.
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
D3K17 (March 15th, 2013)
Old March 14th, 2013, 06:02 PM   #5 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default

14th March 2013
  • Added "initial install" option which handles all initial debuggerd set up. It also restores an auto-backup debuggered.mnt after a ROM flash
  • Created a "remove all Binds" option which replaces debuggered.mnt with a clean version
  • Finally changed the copy syntax to allow support of hidden files.
SUroot is offline  
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
D3K17 (March 15th, 2013)
Old March 15th, 2013, 03:48 AM   #6 (permalink)
New Member
 
Join Date: Mar 2013
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 4
Thanked 2 Times in 1 Post
Default

I am on AOKP and the issue is exactly as Madmack stated. I did not know the thread over here existed, I will switch over to XDA for future inqueries. My name there is xSoNiCcRaCkErSx.

Thanks so much for this and great update! I felt kind of silly having done all that only to see you have automated the process in the newest verson
SUroot likes this.
D3K17 is offline  
Reply With Quote
Old March 15th, 2013, 04:19 AM   #7 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default

I literally came to this thread to declare it "dead" or "depricated" after updating it on XDA and I saw your post.

Wondered if that was you over there.

As you can see, there are no downloads on AF so I will now decalre this thread as:

Depricated

Keeping my work: http://forum.xda-developers.com/showthread.php?t=2178863
SUroot is offline  
Reply With Quote
Old March 15th, 2013, 09:54 AM   #8 (permalink)
share the love peeps ;)
 
funkylogik's Avatar
 
Join Date: Sep 2011
Location: Paisley, Scotland, Western Europe
Gender: Male
Posts: 15,345
 
Device(s): Galaxy S3 (I9300) Carbon nightlies (4.4.2) Nexus 7 (2012) Validus by Ground Zero Roms (4.4.2), Fr
Carrier: 3 (three) UK 15 p/m unltd data/txt

Thanks: 10,999
Thanked 3,901 Times in 3,128 Posts
Default Re: [Script][4.2.x] Move /sdcard app data to /extSdCard (Wip) [updated 7th Mar]

What does depreciated mean in this context mate?
Think its a bit advanced for this forum? its had a good few views. Maybe people have just been rude and not thankd
EDIT "DEPRICATED" sorry, dislexya lol
__________________
http://giffgaff.com/orders/affiliate/funkylogik
For a UK prepay sim with unlimited data, unlimited text, 250mins for 12p/m, no contract, no catch (runs on o2 network)
funkylogik is online now  
Last edited by funkylogik; March 15th, 2013 at 09:57 AM.
Reply With Quote
Old March 15th, 2013, 09:56 AM   #9 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default

I mean I'm not going to support this scipt in future fromt his location. It will no longer be updated.
SUroot is offline  
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
funkylogik (March 15th, 2013)
Old March 15th, 2013, 09:57 AM   #10 (permalink)
share the love peeps ;)
 
funkylogik's Avatar
 
Join Date: Sep 2011
Location: Paisley, Scotland, Western Europe
Gender: Male
Posts: 15,345
 
Device(s): Galaxy S3 (I9300) Carbon nightlies (4.4.2) Nexus 7 (2012) Validus by Ground Zero Roms (4.4.2), Fr
Carrier: 3 (three) UK 15 p/m unltd data/txt

Thanks: 10,999
Thanked 3,901 Times in 3,128 Posts
Default Re: [Script][4.2.x] Move /sdcard app data to /extSdCard (Wip) [updated 7th Mar]

Got ya. Dont blame u tbh. At least the XDA link is here
funkylogik is online now  
Reply With Quote
sponsored links
Old March 15th, 2013, 07:44 PM   #11 (permalink)
New Member
 
Join Date: Mar 2013
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

I am getting following trouble by Bind /sdcard/* to /extSdCard/* (already moved)

/storage/emulated/0/mounter/mounter.sh[379]: /storage/emulated/0/mounter/mounter_defaults/extdir: can't open $() input
Chesterby is offline  
Last edited by Chesterby; March 15th, 2013 at 07:56 PM.
Reply With Quote
Old March 15th, 2013, 08:26 PM   #12 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default Re: [Script][4.2.x] Move /sdcard app data to /extSdCard (Wip) [updated 7th Mar]

Go through the set up menu and set all your defaults...

Follow the link in post 1 to instructions on xda which have been updated.

In the setup menu it appears you skipped option 3.

In the next release I will remove this requirement for this section...
SUroot is offline  
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
Chesterby (March 15th, 2013)
Old March 15th, 2013, 09:16 PM   #13 (permalink)
New Member
 
Join Date: Mar 2013
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thx SUroot, it works fine.
How can I choose folder InternalSD/android/obb/xx xx xx? The script gives only InternalSD/Android.
Chesterby is offline  
Reply With Quote
Old March 15th, 2013, 09:24 PM   #14 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default Re: [Script][4.2.x] Move /sdcard app data to /extSdCard (Wip) [updated 7th Mar]

No worries

I haven't got to obb yet. Not tested. maybe next update? Possibly this weekend sometime but can't promise
SUroot is offline  
Reply With Quote
Old March 15th, 2013, 09:37 PM   #15 (permalink)
New Member
 
Join Date: Mar 2013
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

Sorry, script doesn't work, I just not moved files to extSdCard (have Only created a folder) and I thought it works(((. I don't know what's wrong. I have CM 10.1,I did instruction completely, by option 3 I had chosen /extSdCard

Ps: Can I manually edit debuggerd.mnt to get android / obb/xx xx xx?
Chesterby is offline  
Reply With Quote
Old March 15th, 2013, 09:45 PM   #16 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default Re: [Script][4.2.x] Move /sdcard app data to /extSdCard (Wip) [updated 7th Mar]

Wait, what you used the already moved option without moving it? So the data is still on internal?

So you used wrong option? Where is data now?

Talk about obb later. 1 at a time
SUroot is offline  
Last edited by SUroot; March 15th, 2013 at 09:49 PM.
Reply With Quote
Old March 15th, 2013, 10:05 PM   #17 (permalink)
New Member
 
Join Date: Mar 2013
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

Sorry for my english)))
I will try to explain.
I have folder 123 with some txt file on my InternalSD and i have created 123 folder on extSdCard, but i have forgotten to move txt file to 123 folder and thought bind works. (I used option 5 in main menu to Bind my folders)
By default settings at option3 I choose /extSdCard, is it right?
Chesterby is offline  
Last edited by Chesterby; March 15th, 2013 at 10:16 PM.
Reply With Quote
Old March 15th, 2013, 10:16 PM   #18 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default Re: [Script][4.2.x] Move /sdcard app data to /extSdCard (Wip) [updated 7th Mar]

Create folder "bind" on extSdCard and set this folder in option 3 of set up menu.

This bind folder is not going to be used for the next step but the script demands it is set anyway.

Back to the main menu.

So if you want, move text file manually using file manager from /sdcard/123 to /extSdCard/123....(because you already created new folder)

Then use main menu option 5.

If you had not created /extSdCard/123 you could have used option 4 to create the folder and move the data... so if you delete extSdCard/123 you can still use option 5...


Now if you already ran option 4 or 5 before moving the data, move data manually to extSdCard then reboot
SUroot is offline  
Reply With Quote
Old March 15th, 2013, 10:44 PM   #19 (permalink)
New Member
 
Join Date: Mar 2013
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

At Set Default ExternalSD location (The new location) I have only /extSdCard to choose (but I have created extSdCard/bind)
Chesterby is offline  
Reply With Quote
Old March 15th, 2013, 10:50 PM   #20 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default Re: [Script][4.2.x] Move /sdcard app data to /extSdCard (Wip) [updated 7th Mar]

If you only have extSdCard in setup option 3, what on earth did you choose in set up option 2???


Please upload everything in mounter_defaults
SUroot is offline  
Reply With Quote
sponsored links
Old March 15th, 2013, 11:05 PM   #21 (permalink)
New Member
 
Join Date: Mar 2013
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

I have done with option 3, but i delete accidentally debuggerd and debuggerd.bak from system/bin.
Now I get this by initial install:

Unable to chmod /system/bin/debuggerd: No such file or directory
rm failed for /system/bin/debuggerd, No such file or directory
cp: /system/bin/debuggerd.bak: No such file or directory



Initial install.....complete

Mounter folder
https://www.dropbox.com/s/ej3c3raa8bpmevv/mounter.zip
Chesterby is offline  
Last edited by Chesterby; March 16th, 2013 at 01:12 AM.
Reply With Quote
Old March 16th, 2013, 05:44 AM   #22 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default Re: [Script][4.2.x] Move /sdcard app data to /extSdCard (Wip) [updated 7th Mar]

Don't worry about errors if you deleted the files.

What is the current status? Because now mounter defaults looks fine!
SUroot is offline  
Reply With Quote
Old March 16th, 2013, 10:23 AM   #23 (permalink)
New Member
 
Join Date: Mar 2013
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

It works fine after wipe system and reflash Rom. But I have some trouble. In explore I can see that my navigon folder is mounted, but navigon app request files.
Chesterby is offline  
Reply With Quote
Old March 16th, 2013, 11:59 AM   #24 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default

If you can go into /sdcard/whatever in file manager, and can see /extSdCard/whatever/files, then it is working. This assumes you moved the files first.
SUroot is offline  
Reply With Quote
Old June 9th, 2013, 11:09 AM   #25 (permalink)
New Member
 
Join Date: Jun 2013
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 1 Time in 1 Post
Default

Try out https://play.google.com/store/apps/details?id=com.devasque.fmount&hl=es, works like a charm =)
alejandro1254 is offline  
Reply With Quote
The Following User Says Thank You to alejandro1254 For This Useful Post:
funkylogik (June 9th, 2013)
Old June 9th, 2013, 11:19 AM   #26 (permalink)
share the love peeps ;)
 
funkylogik's Avatar
 
Join Date: Sep 2011
Location: Paisley, Scotland, Western Europe
Gender: Male
Posts: 15,345
 
Device(s): Galaxy S3 (I9300) Carbon nightlies (4.4.2) Nexus 7 (2012) Validus by Ground Zero Roms (4.4.2), Fr
Carrier: 3 (three) UK 15 p/m unltd data/txt

Thanks: 10,999
Thanked 3,901 Times in 3,128 Posts
Default

I miss SU
funkylogik is online now  
Reply With Quote
Reply


Go Back   Android Forums > Android Phones > Samsung Galaxy S3 > (International) Galaxy S3 - All Things Root
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:23 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.