[Galaxy S I9000 General] lunasea:
No need for scripts. Search for GL to SD app, much easier.

------

I'm not a heavy gamer, but usually have tons of games installed on my phone for my kid to play with (trying to resist to the "daddy, I wanna a PSP" while I can, at least with the phone I can control when he plays :D).

With the advent of HD games, it become more and more difficult to manage multiple game installations on sdcard. The last drop was Asphalt6, with its +500M :eek: of downloaded files.... soon will have to use external hard disks to use games on our phones :rolleyes:. Most of the "heavy" games are from Gameloft, and the problem lies on the installation pack that doesn't ask for a location to install additional files, always assuming sdcard.

Looked around, and the only workaround I've found was a crack that opens the game apk and changes the download destination directory. Well, I wasn't very comfortable in using this, and it only worked on some games.

So I configured the following "dirty" workaround, I know it's not perfect, but it resolved my problem so I decided to share here.

Basically I've moved gameloft directory from sdcard to external_sd and created a bind mount point called gameloft on sdcard pointing to external_sd. This has the problem that you can only mount that bind point before using the gameloft games, because if you keep it mounted and use storage usb you'll have problems mounting sdcard.

So I've created two scripts - one to mount it, another to unmount it -, and using script manager created a shortcut (actually is a script manager widget) to both scripts on my screen. Whenever I want to use/install gameloft games I mount it, and in the end dismount the bind.

Additional steps for gamming, but restored my sdcard space and now I can use my 16G external sd for that files. Note that if your external card is slow, the game load will be slower.

EDIT: This procedure needs root and busybox. Sorry forgot to mention earlier, I never had my phone not rooted :p

So, the how-to for anyone who wants to try:

1 - copy /sdcard/gameloft to /sdcard/external_sd/gameloft (if you don't have any GL games installed just create the folder /sdcard/external_sd/gameloft)

2 - remove /sdcard/gameloft/ contents

3 - create the following scripts on sdcard:

mount_gl.sh

#!/system/bin/sh
# mounts bind point

if [ -e /sdcard/gameloft ];
then
if [ -e /sdcard/external_sd/gameloft ];
then
busybox mount -o bind /sdcard/external_sd/gameloft/ /sdcard/gameloft
else
echo "no gameloft dir on external_sd"
fi;
else
echo "no gameloft dir on sdcard"
fi;

umount_gl.sh

#!/system/bin/sh
# UNmounts bind point

if [ -e /sdcard/gameloft ];
then
busybox umount -l /sdcard/gameloft
else
echo "no gameloft dir on sdcard"
fi;

Run first to mount, and check /sdcard/gameloft/ contents. If everything ok, start game and try.

Remember that to simplify you can create shortcuts of the scripts using script manager.

Try not to leave the bind mounted. If by any chance you forget to unmount the bind and use usb storage, you wont be able to mount sdcard, but there's no need to stress ;). Just

unmount usb storage

, open adb shell (or a terminal on phone) and issue the command:

# umount /sdcard/gameloft

after that

mount usb storage

,

unmount it again

, and everything will be back to normal.

If you at some point regret the change, just move the content of /sdcard/external_sd/gameloft to /sdcard/gameloft/.

The usual disclaimer: I provide this to share my findings, use it at your own risk. AFAIK there's no risk on this operation, besides the fact you could have to download files again if something goes wrong, but I didn't test this on any other phones besides mine.

EDIT 08/19: updated scripts with feedback from thread - added busybox to mount/umount and added -l switch to umount.

Cheers