Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
ownhere
Old
#1  
Senior Member - OP
Thanks Meter 282
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, 864 views)
The Following 13 Users Say Thank You to ownhere For This Useful Post: [ Click to Expand ]
 
harrynghiem
Old
#2  
Senior Member
Thanks Meter 27
Posts: 179
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 9
Posts: 1,016
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 146
Posts: 2,180
Join Date: Aug 2010
woohoo a great dev has come. glad you got here mate! love your work on Desire section.
 
dexterdave
Old
#5  
dexterdave's Avatar
Member
Thanks Meter 11
Posts: 79
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 9
Posts: 1,016
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 695
Posts: 2,013
Join Date: Dec 2005
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

ROM: ASYLUM CM 10.1

Twitter: @matrixppc

Download my Android Apps
 
hfpop
Old
(Last edited by hfpop; 21st September 2011 at 01:43 PM.)
#9  
Senior Member
Thanks Meter 48
Posts: 189
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 321
Posts: 1,611
Join Date: Jul 2010
Seems abandoned by @ownhere

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

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
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

Go to top of page...