Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,770,363 Members 46,789 Now Online
XDA Developers Android and Mobile Development Forum

[TUTORIAL] Install applications into SD Card for Samsung Galaxy 5 (i5500)

Tip us?
 
r2beta0
Old
(Last edited by r2beta0; 2nd December 2010 at 02:13 AM.) Reason: Add script files
#1  
Senior Member - OP
Thanks Meter 121
Posts: 481
Join Date: Nov 2010
Location: Rio de Janeiro
Post [TUTORIAL] Install applications into SD Card for Samsung Galaxy 5 (i5500)

DISCLAIMER: DO THIS AT YOUR OWN RISK. I AM NOT RESPONSIBLE IF YOU BRICK / RUIN YOUR PHONE IN ANY WAY.

Hi Everyone,

I have some good news for the owners of Samsung Galaxy 5 (i5500) Smartphones.
Doing some research on Google and reading about efforts from other people who could install applications on SD card on other android phones, I was able to develop a method to install application into SD card for the Galaxy 5. Better yet, you won't even need a custom Rom.

Before I get into the specifcs let me state that the following steps are manual and no application is provided to automate the process, so advanced computer skill is required and some knowledge of unix/linux is a plus.

Here we go: PLEASE READ THE WHOLE THING BEFORE YOU START. I MAY HAVE OMMITED SOME COMMANDS OUT OF LACK OF ATTENTION.
1) You'll need to root your phone. There is a lot of guides about this available, just google for it. I've used the SuperOneClick Root to do this.

2) Partition your sd card like this: 1 - FAT, 2 - Linux ext2. Again, there is a lot of guides about this on the net, just google again. I've used Paragon Partition Manager 2010 to lower the size of my FAT partition, leaving a 550MB unallocated space at the end of the card. Then I formatted this space as ext2 in linux, using ubuntu live CD. Most guides around there recommends that you keep this partition between 500~750MB, so I didnít try with greater sizes. Also, i kept my partition 1 as FAT 16, but FAT 32 might actually work too, try that if you want and post me a reply.

3) Download Titanium Backup (or another app backup tool) from market and backup your applications. You may need to restore your applications to correct some permission problems that may occur after completing this guide.

4) Install busybox. BusyBox is a software application that provides many standard Unix tools, which are not available on stock android. You can get a copy of busybox by clicking on ďproblems?Ē button on Titanium Backup main window. It will get installed on /data/data/com.keramidas.TitaniumBackup/files.

5) If you still donít have Android SDK installed on your PC, download and install it from Google. Youíll need ADB (Android Debug Bridge), which is included in the SDK, to proceed. Now open a shell connection with your device by typing:

Code:
adb shell
Just keep in mind that you MUST be logged as root. Root command prompt is recognized by the # character. If you donít have root type the Ďsuí command. If even with Ďsuí you couldnít get root, please review step 1.

6) Create Ďsdí folder int /system:

Code:
cd /system
mkdir sd
7) Mount ext2 partition into /system/sd

Code:
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
8) Create a folder to store the applications into ext2 partition:

Code:
cd /system/sd
mkdir app
9) Copy busybox to /system/bin
Code:
cat /data/data/com.keramidas.TitaniumBackup/files/busybox > /system/bin/busybox
chmod 755 /system/bin/busybox
10) Copy your applications to ext2 partition:

Code:
busybox cp /data/app/* /system/sd/app/
11) Change permissions of copied applications:

Code:
cd /system/sd/app
chown system.system *
chmod 644 *
12) Now comes the tricky part: making Android mount your new partition at boot time. All the hard work would be useless if Android discarded the mount points every time we restarted our phones. To do this weíll need to create 2 scripts and store then into /system/etc. Obviously the scripts should be started by init.rc and need to run as root. Fortunately Androidís init.rc have a gap that makes this possible. The scripts are named install-recovery.sh and init-sd2.sh.

install-recovery.sh content:
Code:
#!/system/bin/sh
/system/etc/init-sd2.sh&
init-sd2.sh content:
Code:
#!/system/bin/sh
MYLOG=/data/install-recovery.log
echo "$(date) Starting install-recovery.sh" > $MYLOG
echo "$(date) Waiting SD to become ready..." >> $MYLOG
sleep 10
mount -t ext2 /dev/block/mmcblk0p2 /system/sd 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG
mount >> $MYLOG
echo "$(date) Finishing install-recovery.sh" >> $MYLOG
If you plan to edit this files on windows I recommend a tool that is capable of keeping UNIX file format, just like notepad++ free tool.

13) After placing the scripts, change their permissions:
Code:
cd /system/etc
chmod 555 install-recovery.sh
chmod 555 init-sd2.sh
14) Rename the default application folder. If everything works fine you can remove this later to save space:

Code:
cd /data
mv app app_old
mkdir app
chown system.system app
chmod 755 app
15) Restart your phone and cross your fingers

16) If you have problems with your widgets donít worry. You just need to remove then from your homescreen and add again.

17) Check if your applications are running as they should. Restore backups youíve made with Titanium Backup for the applications showing problems.

18) If your partition didnít mount at boot, check log file at /data/install-recovery.log

19) From now on your new applications will be installed on your SD Card. You can modify the scripts to store other folders from /data into the ext2 partition as needed. Iíve been running my applications from SD Card for a week now without any problems or bugs.

20) If you canít make it work, post your question here and I will try to help you out.

21) Donations are welcomed, just drop some money into my paypal account. Just kidding :P

Good luck and cya!
Attached Files
File Type: zip app2sd_galaxy5.zip - [Click for QR Code] (468 Bytes, 1179 views)
The Following User Says Thank You to r2beta0 For This Useful Post: [ Click to Expand ]
 
andikasuhendar
Old
#2  
Junior Member
Thanks Meter 1
Posts: 11
Join Date: Oct 2010
can this script use for moving /data/data to EXT2?
if can, from where i should start type the script?
 
a9u5_h
Old
#3  
Junior Member
Thanks Meter 1
Posts: 20
Join Date: Dec 2009
Location: surabaya
i'm still newbie on this
so i'm alittle bit confused, i hope you can help me and sorry for my bad english
i'm already succes from step 1 to step 11
but i'm little confused at step 12
can you explain how to make the script?
should i make those 2 script via notepad++ and then copy it to /system/sd and then continue to step 13?
or should i just type everything on step 12 after step 11 in cmd prompt?
the problem is, if i make the script from notepad++ the android system will just discard my mount point when i restart my phone
and if i just type everything on the step 12 in comand prompt, when i'm type chmod 555 install-recovery.sh and chmod 555 init-sd2.sh like in the step 13, it always say that install-recovery.sh and init-sd2.sh file is not found?
so what should i do?
i'm stuck on step 12
 
andikasuhendar
Old
#4  
Junior Member
Thanks Meter 1
Posts: 11
Join Date: Oct 2010
step 12, type it on notepad++ and then you have to change the extension of the file with .sh, after that copied the 2 files to /system/etc
The Following User Says Thank You to andikasuhendar For This Useful Post: [ Click to Expand ]
 
a9u5_h
Old
#5  
Junior Member
Thanks Meter 1
Posts: 20
Join Date: Dec 2009
Location: surabaya
Quote:
Originally Posted by andikasuhendar View Post
step 12, type it on notepad++ and then you have to change the extension of the file with .sh, after that copied the 2 files to /system/etc
i've already done that
but when i make the script via notepad ++, i'm already make the save type become .sh, so isn't it just the same?
but when i reboot the phone it's still not working
 
stas1c
Old
#6  
Junior Member
Thanks Meter 1
Posts: 18
Join Date: Nov 2010
Location: Vilnius
But how to copy this two script files to system/etc??? it's saying permision denied..
 
a9u5_h
Old
#7  
Junior Member
Thanks Meter 1
Posts: 20
Join Date: Dec 2009
Location: surabaya
Quote:
But how to copy this two script files to system/etc??? it's saying permision denied..
I'm use root explorer to move it to system/etc
The script can be moved but it still doesn't work at all :(
-------------------------------------
Sent via the XDA Tapatalk App
The Following User Says Thank You to a9u5_h For This Useful Post: [ Click to Expand ]
 
stas1c
Old
#8  
Junior Member
Thanks Meter 1
Posts: 18
Join Date: Nov 2010
Location: Vilnius
And i can't move them even with root explorer.. i don't get what i'm doing wrong (
 
andikasuhendar
Old
#9  
Junior Member
Thanks Meter 1
Posts: 11
Join Date: Oct 2010
@agus
about the scripts, u can check with root explorer, try to view the script and make sure it was the exact same from the script above, coz i experience the same problem for the first time i try this. if u sure that the script are same then try to execute it using root explorer and then go to titanium backup and see if there is there is another storage (usually there is internal and SD card only).

@stasic
use the root explorer to copy the script to /system/etc, don't forget to change the root explorer option from R/O to R/W, this option should be on top of the page, just touch it to change from R/O to R/W.
 
a9u5_h
Old
#10  
Junior Member
Thanks Meter 1
Posts: 20
Join Date: Dec 2009
Location: surabaya
Quote:
Originally Posted by andikasuhendar View Post
@agus
about the scripts, u can check with root explorer, try to view the script and make sure it was the exact same from the script above, coz i experience the same problem for the first time i try this. if u sure that the script are same then try to execute it using root explorer and then go to titanium backup and see if there is there is another storage (usually there is internal and SD card only).

@stasic
use the root explorer to copy the script to /system/etc, don't forget to change the root explorer option from R/O to R/W, this option should be on top of the page, just touch it to change from R/O to R/W.
veeeerrrryyyyyyyyy biiiiiiigggggggggggg thaaaaaaannnnnkkkkkssssss brrroooo
you was right, after i check the script via root explorer, the script was not the same, after i fix it, everything works like a charm

Tags
app2sd, application, galaxy, i5500, sd card
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes