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

Search This thread

r2beta0

Senior Member
Nov 8, 2010
482
121
Rio de Janeiro
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!
 

Attachments

  • app2sd_galaxy5.zip
    468 bytes · Views: 1,290
Last edited:
  • Like
Reactions: DashBlacK

a9u5_h

Member
Dec 14, 2009
27
2
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
 
Oct 1, 2010
11
1
@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

Member
Dec 14, 2009
27
2
surabaya
@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 :D:D:D
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 :D:D:D
 
Oct 1, 2010
11
1
@agus
sama2 bro AKA ur welcome bro, have fun with the app2sd hehehe

@nima
search on google, how to format EXT2, if i correct u can use paragon partition for windows user, but if u use macintosh u can just go to disk utility and make partition with EXT2 format

@stasic
go to the /system/etc and see if it already R/W or still R/O
 

r2beta0

Senior Member
Nov 8, 2010
482
121
Rio de Janeiro
@siap
i've rooted my g5 using superoneclick
but i still have R/O in /system/etc :confused:
when i tap R/O on the screen, i wont changed to R/W
what should i do? :mad:

maaf inggris nya acak2an :p

In your PC command prompt execute:
Code:
adb shell

Make sure you are loged in as root and in ADB SHELL try this:
Code:
mount -o rw,remount /dev/stl12 /system

Then execute:
Code:
mount

If your mount result has a line like the one bellow, with the rw set, you'll be able to copy the files.
Code:
/dev/stl12 /system rfs rw,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
 

Mattefacit

New member
Nov 19, 2010
4
0
Hi, nice guide!
I succeded with this the first time I tried but now I have changed to a larger sd card and I can't get it to work.
The log file says that it failed to mount the mmcblk0p2 folder, and now when I check it doesn't even exist. What should I do?

Hope I can get help.. thankful for response. /Mattefacit
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    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!
    1
    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
    1
    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
    1
    i did the steps good and every thing work fine with me but i'm stuck now in step 14
    mv app app_old
    it keep telling me it's used or busy
    can any one help in this :confused: :confused::confused:

    Hmmm. Try this instead (logged as root):
    Code:
    cd /data
    mkdir app_old
    cd app
    mv * ../app_old