[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.
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:
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:
7) Mount ext2 partition into /system/sd
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
8) Create a folder to store the applications into ext2 partition:
9) Copy busybox to /system/bin
cat /data/data/com.keramidas.TitaniumBackup/files/busybox > /system/bin/busybox
chmod 755 /system/bin/busybox
10) Copy your applications to ext2 partition:
busybox cp /data/app/* /system/sd/app/
11) Change permissions of copied applications:
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.
echo "$(date) Starting install-recovery.sh" > $MYLOG
echo "$(date) Waiting SD to become ready..." >> $MYLOG
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:
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:
mv app app_old
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!