[Galaxy S I9000 Android Development] AdamOutler:
Benjamin Dobell, thanks!

Now that I've been able to see my first PIT I have some thoughts

Entry Count: 13
Unknown 1: 1
Unknown 2: 0
Unknown 3: 7508
Unknown 4: 65
Unknown 5: -1312
Unknown 6: 18
Unknown 7: -10232
Unknown 8: 67

--- Entry #0 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 0
Partition Flags: 0 (R)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 1
Unknown 2: 6684783
Unknown 3: 2097268
Partition Name: IBL+PBL
Filename: boot.bin

--- Entry #1 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 1
Partition Flags: 0 (R)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 1
Unknown 2: 0
Unknown 3: 0
Partition Name: PIT
Filename:

--- Entry #2 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 20
Partition Flags: 2 (R/W)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 40
Unknown 2: 0
Unknown 3: 0
Partition Name: EFS
Filename: efs.rfs

--- Entry #3 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 3
Partition Flags: 0 (R)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 5
Unknown 2: 0
Unknown 3: 0
Partition Name: SBL
Filename: sbl.bin

--- Entry #4 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 4
Partition Flags: 0 (R)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 5
Unknown 2: 0
Unknown 3: 0
Partition Name: SBL2
Filename: sbl.bin

--- Entry #5 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 21
Partition Flags: 2 (R/W)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 20
Unknown 2: 0
Unknown 3: 0
Partition Name: PARAM
Filename: param.lfs

--- Entry #6 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 6
Partition Flags: 0 (R)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 30
Unknown 2: 0
Unknown 3: 0
Partition Name: KERNEL
Filename: zImage

--- Entry #7 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 7
Partition Flags: 0 (R)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 30
Unknown 2: 0
Unknown 3: 0
Partition Name: RECOVERY
Filename: zImage

--- Entry #8 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 22
Partition Flags: 2 (R/W)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 1146
Unknown 2: 0
Unknown 3: 0
Partition Name: FACTORYFS
Filename: factoryfs.rfs

--- Entry #9 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 23
Partition Flags: 2 (R/W)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 536
Unknown 2: 0
Unknown 3: 0
Partition Name: DBDATAFS
Filename: dbdata.rfs

--- Entry #10 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 24
Partition Flags: 2 (R/W)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 140
Unknown 2: 0
Unknown 3: 0
Partition Name: CACHE
Filename: cache.rfs

--- Entry #11 ---
Unused: No
Partition Type: 0 (RFS)
Partition Identifier: 11
Partition Flags: 0 (R)
Unknown 1: 0
Partition Block Size: 256
Partition Block Count: 50
Unknown 2: 0
Unknown 3: 0
Partition Name: MODEM
Filename: modem.bin

--- Entry #12 ---
Unused: Yes
Partition Type: 1 (Unknown)
Partition Identifier: 11
Partition Flags: 0 (R)
Unknown 1: 0
Partition Block Size: 0
Partition Block Count: 0
Unknown 2: 0
Unknown 3: 0
Partition Name:
Filename:

What are the "unknowns"?

It looks like Samsung is not using their partitions efficiently.

It would appear that Recovery is a duplicate of Kernel.. Understandable, but why take so much space?

It would appear that SBL2 is a duplicate of SBL.... maybe intended as a backup, but unused?

Now, for the nitty gritty.. The IBL+PBL partition has no duplicate. This could be the cause of the problems we've seen with hard-bricking on our phones. If the IROM or IBL+PBL were programmed to halt on error, restart and use PBL2(which would be eFused) to boot, which in turn would boot SBL2(Also eFused), we'd have unbrickable phones.. Basically, a backup bootloader could be used. In my head, this sounds much more efficient then the current setup.

There's something missing here.. Maybe they are using the SBL as a backup, but the PBL has no redundancy, so when people flash an i9000 bootloader onto an i897, they have no working backup bootloader?

So, I had a chance to play around with LibPit. I think the only important information to me is PartitionName and PartitionNumber.... if I understand correctly, I could create a 2D array of:

public static String[][] Data = { LibPit.PartitionName, LibPitPartitionNumber, MatchedXMLPartitionNumber, MatchedXMLFileName, FullyQualifiedFileName};

Kinda like I did here at the end. http://code.google.com/p/obd-twoner/source/browse/trunk/src/Database.java

Btw... Have you had a chance to look at HeimdallAutomate? Do you have any suggestions or ideas? I'm not a professional programmer, I only do it in my spare time.