Mar 5, 2008

iPhone Hacks: Running out of Application space on your iPhone or touch?

Both the iPhone and the iPod touch include relatively limited space on the OS partition (the part of your iPhone's memory that stores the operating system and associated files). It's where Apple, by default, adds its factory-installed Applications but you can save space by installing your Apps on the Media partition instead (that's the part of your your touch or phone that contains your iTunes musics and videos). Here's how:

Your iPhone or iPod touch knows about a folder called "/Widgets". Any Application installed into /Widgets gets recognized and loaded into SpringBoard, just like any app in /Applications. You can fool your iPod or iPhone into thinking you've added a Widgets folder by creating a symbolic link between your media partition and /Widgets.

To do this, you create a folder in your root directory called Applications, or more specifically, /var/root/Applications. You can then add a "symbolic link", a kind of alias, that connects /Widgets with /var/root/Applications. If you install my Erica Utilities and the BSD subsystem, you can create and remove this link by running my xwidg utility.

At this time this is a command-line only operation, however, if you have ssh installed on your system and connect from your computer, just issue the following command: ~/bin/xwidg. The utility looks for an existing symbolic link. If it finds one it removes it, if it does not it creates it. So running xwidg repeatedly just toggles the connection on and off. After each update, it restarts SpringBoard so it reflects the updated link.

The downside is some Applications use absolute paths in their code: Labyrinth and Crossy are two prime examples (They should be using NSBundle calls but that's a completely different matter). Most Applications will run as happily in /Widgets via /var/root/Applications as they will in /Applications and you will save yourself a lot of OS partition space.
Source...

No comments: