Tuesday December 11, 2007
Gobs and Gobs
So, you have an iPhone or iPod Touch and want to install applications. You've jailbroken and activated your device as appropriate, installed a few apps, but now it's complaining that you have low disk space. What is one to do?
Well, cheat, that's what.
First let's elaborate on the problem. The iPhone and iPod Touch are like any hard-drive. They're organized into partitions; two, in this case. The first partition is the first 90MB or so and is used for the system and software. The second is the remainder, and is used for your music, movies, photos, books, etc. From now on, any path I give that starts with / (called the root) is the first partition, and ~ (called the home) is the second. The home folder
Now, you can obviously see the problem in the above—90MB is far too small to hold a lot of applications, especially if you install the developer packages like PHP or Python, as they install files in special hidden locations.
To solve this, we're going to trick the device into running applications from the home folder. First, make sure you can SSH into your phone. Once in (and in your home folder by default), type the following to get started:
cp -rv /Applications . cd / mv Applications Applications-old ln -s /private/var/root/Applications
Once this is done, you need to make sure you are allowed to run programs from the home folder. Open up /etc/fstab in your favorite editor (vi, pico, etc.) and make sure the word noexec isn't anywhere to be found. If it is, delete it and save your work.
Reboot your device.
If everything worked, you now have—effectively—unlimited space for applications. Congratulations! If it didn't work, you'll have to re-flash your device with iTunes.
— Alice.