Post Reply

[EXPANDSD] Join your external SD with internal SD!

OP ownhere

7th September 2011, 12:46 AM   |  #1  
OP Senior Member
Flag Beijing
Thanks Meter: 288
 
213 posts
Join Date:Joined: Jun 2010
More
WARN: For developer only.

attachment is the EXPANDSD script.

Why use it?
So many applications use /sdcard for mass data storage(gameloft, navigation...),
but I9100's internal_sd size is limit to 11G, so we need external_sd's space.
But these applications dosen't know how to use external_sd, old method is hack the apk for external_sd, but this will change apk's signature, and need smali/baksmali to work. My method work in system level, don't need change any apk file.

How to use:
1.make expandsd.ownhere dirctory in external_sd root directory.
2.move internal_sd's directory(for example:/gameloft) to expandsd.ownhere
3.run init_expandsd.sh

Theory:
use 'mount --bind' feature, bind external_sd's dir to internal_sd.
Because the sd card using fat32 partition format, the 'ln -s' command does not work, so the "mount --bind" is the only way to dynamically change the directory content.
Attached Files
File Type: txt init_expandsd.sh.txt - [Click for QR Code] (3.6 KB, 1131 views)
The Following 13 Users Say Thank You to ownhere For This Useful Post: [ View ]
7th September 2011, 04:12 AM   |  #2  
Senior Member
Flag Ho Chi Minh city
Thanks Meter: 47
 
229 posts
Join Date:Joined: Sep 2010
More
Hi mate,

Thks for your shares. I have a question. How run init_expandsd.sh?
8th September 2011, 08:57 AM   |  #3  
Senior Member
Boston
Thanks Meter: 23
 
1,055 posts
Join Date:Joined: Nov 2007
More
I tried gscript and init.d, but doesn't seem to be working
8th September 2011, 11:01 AM   |  #4  
LuffyPSP's Avatar
Senior Member
Thanks Meter: 161
 
2,235 posts
Join Date:Joined: Aug 2010
More
woohoo a great dev has come. glad you got here mate! love your work on Desire section.
9th September 2011, 03:40 AM   |  #5  
dexterdave's Avatar
Member
Thanks Meter: 14
 
89 posts
Join Date:Joined: Apr 2011
More
Quote:
Originally Posted by harrynghiem

Hi mate,

Thks for your shares. I have a question. How run init_expandsd.sh?

you can try to use terminal emu, just type su then navigate to folder where the script located, then type sh init_expandsd.sh then enter. this might do the trick to execute .sh
The Following User Says Thank You to dexterdave For This Useful Post: [ View ]
9th September 2011, 04:24 PM   |  #6  
Senior Member
Boston
Thanks Meter: 23
 
1,055 posts
Join Date:Joined: Nov 2007
More
Quote:
Originally Posted by dexterdave

you can try to use terminal emu, just type su then navigate to folder where the script located, then type sh init_expandsd.sh then enter. this might do the trick to execute .sh

Does it work for you?
9th September 2011, 07:31 PM   |  #7  
Junior Member
Thanks Meter: 2
 
22 posts
Join Date:Joined: Jan 2008
Thumbs up
It's a great idea thanks a lot for your work. I was wondering why ln was not working.

But too bad it does not work for me, i get the following error :
[1] Segmentation fault

Do you have any idea why ?

Thanks again
The Following User Says Thank You to TheFirstBen For This Useful Post: [ View ]
19th September 2011, 12:03 PM   |  #8  
bartito's Avatar
Recognized Developer
Thanks Meter: 1,132
 
2,455 posts
Join Date:Joined: Dec 2005
Donate to Me
problems when connecting phone to pc
hi,
tried the "mount --bind" in order to try your script.
works fine. the directory contents is shared between the 2 path's,
but i have a problem when i connect the phone to a pc.
when i try to disconnect, the sdcard and external_sd are not
available anymore until i reboot the phone

note: the commands that i have executed are:
Code:
mkdir /mnt/sdcard/external_sd/foo
echo "test" > /mnt/sdcard/external_sd/foo/test
mkdir /mnt/sdcard/foo
mount --bind /mnt/sdcard/external_sd/foo /mnt/sdcard/foo
Last edited by bartito; 19th September 2011 at 12:08 PM.
21st September 2011, 01:40 PM   |  #9  
Senior Member
Flag Cluj
Thanks Meter: 50
 
229 posts
Join Date:Joined: Jul 2010
More
Can this script be placed in init.d folder for autorun at boot?

Edit: sorry, already answered above: no, it cannot.

Sent from my GT-P1000 using Tapatalk
Last edited by hfpop; 21st September 2011 at 01:43 PM.
21st September 2011, 08:44 PM   |  #10  
Idan73's Avatar
Senior Member
Thanks Meter: 459
 
1,971 posts
Join Date:Joined: Jul 2010
More
Seems abandoned by @ownhere

Sent from my GT-I9100

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Galaxy S II Original Android Development by ThreadRank