[G1 Android Development] cj chitwood:
What do you mean, "requires 86meg system"? Do I need to repartition my SD card again?

TL-DNR near the end....

I see this answered a lot, and usually simply and adequately ("use DangerSPL and you'll be fine"), but it's rarely explained. Maybe not necessary, but I think understanding it helps understand at least some of what's going on here.

.

.

.

.

The phone is a computer. Period.

.

.

.

.

Just like your Macintosh, PC, or SPARC Workstation, it has internal file storage similar to a hard drive. On our phones, it's solid-state NAND flash media.** Just like Windows, Mac OS, Linux, or whatever you use, your important system files go on that internal media.

** I don't want to confuse terms and after thinking about it, I think 'media' probably fits best. The NAND flash chip can be used for both system storage (like a hard drive) as well as system memory (like the RAM in a computer), depending on the ROM you're using and how the chip's storage area is partitioned. However, in this post, I'm referring in majority to the area of the NAND flash media that is used for storage of the operating system. I'd rather you not, but if you must, think of it in analogy to the hard drive inside your laptop or desktop computer.​

Now, enter thumbdrives on the computer. Great for storing things. Also great for transporting things without networks. Removable, portable. NOT great for things like your operating system (Try putting Windows on a thumbdrive then removing that thumbdrive -- computer would crash even if you succeeded at doing it) (unless you know how to make a bootable PE thumbdrive -- beyond the scope of this post -- and even that's not failproof).

On our phones, the operating system is Android (basically Linux rewritten in a variant of Java -- which is why so many Linux/UNiX commands work in ADB Shell or the Terminal Emulator) and the hard drive on which it is stored is the phone's internal NAND flash media. The analogy to the PC's thumbdrive is the phone's MicroSD card. Again, you don't want important operating system files (like your apps) on your removable media. Unless you (a) know what you're doing and (b) never remove that media.

Here's where it gets a little in-depth: the operating system is written to split the internal flash (one big hard drive as it were) into several smaller sections of a definite size. These are called partitions. The operating system then uses these partitions for different things. The benefit of partitions (instead of making it where it just uses one big space) is that no one section of the system will grow large enough to cause the others to stop working due to lack of space. So, if one gets full, the others can maintain at least some functionality with what space they have "reserved" for them.

On any phone, the amount of space available for these partitions is finite, though some are larger than others. Now, if we can find a way to remove the need for one of these partitions, or at least the need for it to be so big, we can reuse that left-over space to make the other partitions a larger size (including using part of that space to gain extra RAM capacity like we do with the newer radio versions)**.

**What I don't know here is if the radio image gets put on the same NAND media as the system, or if there's a second chip just for radio that also hosts RAM space as well. I'm also not sure where to find this answer, and I assume that it varies from phone to phone.​

Just like Windows, or programs that run in Windows, your Android system requires a certain amount of space. The more stuff you build into the ROM, the more space it needs in these partitions. This ROM (the FULL version, at least) has simply gotten larger than the stock phone can handle, and requires a larger-than-normal partition for SYSTEM files (e.g., it needs 86MB at least, and I think stock was 78MB, which is too small). BUT, by moving e.g. the apps that we install to the MicroSD card (removable, yes, but we never remove ours really), we can remove the need for one of the other partitions on the phone's internal flash media (or at least make it smaller), and we can resize the others to accomodate a larger ROM such as COS-DS.

On a side-note, this is part of the reason why stock G1 phones never got past Donut Android -- the repartitioning is necessary to make room enough, but most users wouldn't understand why they can no longer safely remove their MicroSD cards. MyTouch 3G phones had larger Flash media, so the repartitioning was unnecessary and the updates to Eclair and FroYo could safely be installed OTA.

TL-DNR

Back to your questions, you do not need to make another partition on the SD card for this to work. As long as you have already a FAT partition and at least an EXT partition (ext4 preferably) with optionally a 32-64MB or so swap partition, you'll be fine as far as the MicroSD is concerned. What we're talking about here WRT the system partition is the partition on the phone's internal NAND flash media, which is mounted as "/system" by Android. Some of the SPLs we use take care of this requirement for us. I've personally used "DangerSPL", as well as SPL 1.33.0013d with no issues. I believe both have a 90 MB /system partition.

I hope this isn't too in-depth and if I have anything incorrect in here, please, someone correct me. I just want to help.