5,594,653 Members 33,188 Now Online
XDA Developers Android and Mobile Development Forum

[EXPANDSD] Join your external SD with internal SD!

Tip us?
 
ownhere
Old
#1  
Senior Member - OP
Thanks Meter 285
Posts: 213
Join Date: Jun 2010
Location: Beijing
Default [EXPANDSD] Join your external SD with internal SD!

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, 1048 views)
The Following 13 Users Say Thank You to ownhere For This Useful Post: [ Click to Expand ]
 
harrynghiem
Old
#2  
Senior Member
Thanks Meter 28
Posts: 182
Join Date: Sep 2010
Location: Ho Chi Minh city
Hi mate,

Thks for your shares. I have a question. How run init_expandsd.sh?
 
g2tl
Old
#3  
Senior Member
Thanks Meter 23
Posts: 1,055
Join Date: Nov 2007
Location: Boston
I tried gscript and init.d, but doesn't seem to be working
 
LuffyPSP
Old
#4  
LuffyPSP's Avatar
Senior Member
Thanks Meter 159
Posts: 2,232
Join Date: Aug 2010
woohoo a great dev has come. glad you got here mate! love your work on Desire section.

Current Active Device : Google Nexus 5 D821 32GB
Previous Device : HTC One M7 64GB, Nexus 7 2013 32GB LTE, Google Nexus 4 16GB, HTC One X 32GB, Google Galaxy Nexus 16GB, Google Nexus S 16GB, Asus Transformer TF101, Samsung Galaxy S2 16GB, HTC Desire
 
dexterdave
Old
#5  
dexterdave's Avatar
Member
Thanks Meter 12
Posts: 81
Join Date: Apr 2011
Quote:
Originally Posted by harrynghiem View Post
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: [ Click to Expand ]
 
g2tl
Old
#6  
Senior Member
Thanks Meter 23
Posts: 1,055
Join Date: Nov 2007
Location: Boston
Quote:
Originally Posted by dexterdave View Post
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?
 
TheFirstBen
Old
#7  
Junior Member
Thanks Meter 2
Posts: 22
Join Date: Jan 2008
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: [ Click to Expand ]
 
bartito
Old
(Last edited by bartito; 19th September 2011 at 12:08 PM.)
#8  
bartito's Avatar
Recognized Developer
Thanks Meter 850
Posts: 2,143
Join Date: Dec 2005

 
DONATE TO ME
Default 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
Phone model: LG Nexus 4

Twitter: @matrixppc

Download my Android Apps

 
hfpop
Old
(Last edited by hfpop; 21st September 2011 at 01:43 PM.)
#9  
Senior Member
Thanks Meter 50
Posts: 216
Join Date: Jul 2010
Location: Cluj
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
 
Idan73
Old
#10  
Idan73's Avatar
Senior Member
Thanks Meter 439
Posts: 1,889
Join Date: Jul 2010
Seems abandoned by @ownhere

Sent from my GT-I9100
"Glory is fleeting, but obscurity is forever!!!"

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes