[Galaxy Note GT-N7000 General] v.cecchetto:
MBR... GPT... what's next?

I started looking at bytes after GPT table...

LBA 34 ... 41

# hd -n4096 -s34b /dev/block/mmcblk0

0004400: 76 98 34 12 0f 00 00 00 00 00 00 00 00 00 00 00 v.4.............
0004410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004420: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004430: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004440: 47 41 4e 47 00 00 00 00 00 00 00 00 00 00 00 00 GANG............
0004450: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004460: 65 6d 6d 63 2e 69 6d 67 00 00 00 00 00 00 00 00 emmc.img........
0004470: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
00044a0: 00 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 ................
00044b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00044c0: 00 00 00 00 42 4f 4f 54 00 00 00 00 00 00 00 00 ....BOOT........
00044d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00044e0: 00 00 00 00 62 6f 6f 74 2e 62 69 6e 00 00 00 00 ....boot.bin....
00044f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
0004520: 00 00 00 00 00 00 00 00 02 00 00 00 04 00 00 00 ................
0004530: 01 00 00 00 00 00 00 00 00 20 00 00 00 a0 00 00 ......... ......
0004540: 00 00 00 00 00 00 00 00 45 46 53 00 00 00 00 00 ........EFS.....
0004550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004560: 00 00 00 00 00 00 00 00 65 66 73 2e 69 6d 67 00 ........efs.img.
0004570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
00045a0: 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 ................
00045b0: 02 00 00 00 00 00 00 00 00 00 00 00 00 c0 00 00 ................
00045c0: 00 0a 00 00 00 00 00 00 00 00 00 00 53 42 4c 31 ............SBL1
00045d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00045e0: 00 00 00 00 00 00 00 00 00 00 00 00 53 62 6c 2e ............Sbl.
00045f0: 62 69 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 bin.............
0004600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
0004630: 02 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 ................
0004640: 00 d0 00 00 00 0a 00 00 00 00 00 00 00 00 00 00 ................
0004650: 53 42 4c 32 00 00 00 00 00 00 00 00 00 00 00 00 SBL2............
0004660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004670: 00 62 6c 2e 62 69 6e 00 00 00 00 00 00 00 00 00 .bl.bin.........
0004680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
00046b0: 00 00 00 00 02 00 00 00 05 00 00 00 00 00 00 00 ................
00046c0: 00 00 00 00 00 e0 00 00 00 40 00 00 00 00 00 00 .........@......
00046d0: 00 00 00 00 50 41 52 41 4d 00 00 00 00 00 00 00 ....PARAM.......
00046e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00046f0: 00 00 00 00 70 61 72 61 6d 2e 6c 66 73 00 00 00 ....param.lfs...
0004700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
0004730: 00 00 00 00 00 00 00 00 02 00 00 00 06 00 00 00 ................
0004740: 00 00 00 00 00 00 00 00 00 20 01 00 00 40 00 00 ......... ...@..
0004750: 00 00 00 00 00 00 00 00 4b 45 52 4e 45 4c 00 00 ........KERNEL..
0004760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004770: 00 00 00 00 00 00 00 00 7a 49 6d 61 67 65 00 00 ........zImage..
0004780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
00047b0: 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 ................
00047c0: 07 00 00 00 00 00 00 00 00 00 00 00 00 60 01 00 .............`..
00047d0: 00 40 00 00 00 00 00 00 00 00 00 00 52 45 43 4f .@..........RECO
00047e0: 56 45 52 59 00 00 00 00 00 00 00 00 00 00 00 00 VERY............
00047f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
0004840: 02 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 ................
0004850: 00 a0 01 00 00 40 06 00 00 00 00 00 00 00 00 00 .....@..........
0004860: 43 41 43 48 45 00 00 00 00 00 00 00 00 00 00 00 CACHE...........
0004870: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004880: 63 61 63 68 65 2e 69 6d 67 00 00 00 00 00 00 00 cache.img.......
0004890: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
00048c0: 00 00 00 00 02 00 00 00 09 00 00 00 00 00 00 00 ................
00048d0: 00 00 00 00 00 e0 07 00 00 80 00 00 00 00 00 00 ................
00048e0: 00 00 00 00 4d 4f 44 45 4d 00 00 00 00 00 00 00 ....MODEM.......
00048f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004900: 00 00 00 00 6d 6f 64 65 6d 2e 62 69 6e 00 00 00 ....modem.bin...
0004910: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
0004940: 00 00 00 00 00 00 00 00 02 00 00 00 0a 00 00 00 ................
0004950: 01 00 00 00 00 00 00 00 00 60 08 00 00 a0 1a 00 .........`......
0004960: 00 00 00 00 00 00 00 00 46 41 43 54 4f 52 59 46 ........FACTORYF
0004970: 53 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 S...............
0004980: 00 00 00 00 00 00 00 00 66 61 63 74 6f 72 79 66 ........factoryf
0004990: 73 2e 69 6d 67 00 00 00 00 00 00 00 00 00 00 00 s.img...........
00049a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00049b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00049c0: 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 ................
00049d0: 0b 00 00 00 01 00 00 00 00 00 00 00 00 00 23 00 ..............#.
00049e0: 00 00 40 00 00 00 00 00 00 00 00 00 44 41 54 41 ..@.........DATA
00049f0: 46 53 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FS..............
0004a00: 00 00 00 00 00 00 00 00 00 00 00 00 64 61 74 61 ............data
0004a10: 2e 69 6d 67 00 00 00 00 00 00 00 00 00 00 00 00 .img............
0004a20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
0004a50: 02 00 00 00 0c 00 00 00 02 00 00 00 00 00 00 00 ................
0004a60: 00 00 63 00 00 80 62 01 00 00 00 00 00 00 00 00 ..c...b.........
0004a70: 55 4d 53 00 45 4e 00 00 00 00 00 00 00 00 00 00 UMS.EN..........
0004a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004a90: 75 6d 73 2e 72 66 73 00 6d 67 00 00 00 00 00 00 ums.rfs.mg......
0004aa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
0004ad0: 00 00 00 00 02 00 00 00 0d 00 00 00 01 00 00 00 ................
0004ae0: 00 00 00 00 00 80 c5 01 00 00 10 00 00 00 00 00 ................
0004af0: 00 00 00 00 48 49 44 44 45 4e 00 00 00 00 00 00 ....HIDDEN......
0004b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0004b10: 00 00 00 00 68 69 64 64 65 6e 2e 69 6d 67 00 00 ....hidden.img..
0004b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
0004b50: 00 00 00 00 01 00 00 00 01 00 00 00 09 00 00 00 ................
0004b60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Hey it looks like a partition table! :eek: ... the third in line after MBR and GPT... I don't have experience of other parition table system apart MBR and GPT... what the hell... But wait a moment I know that in the Samsung smartphone they speak about a PIT partitioning system... have a look... Samsung Galaxy Note PIT file... 16GB... here:

Q1_20110914_16GB.pit

Bingo! Exact copy of it is stored in sectors LBA 34 to LBA 41. :victory:

Try to analyze it... mumble mumble... there is so few documentation around... There is a pattern repeating of 132 bytes... HIDDEN partition starts at sector "00 80 c5 01"... found... and ends at sector " 00 00 01"... found...

At the end I found those other threads speaking of it:

http://xdaforums.com/showthread.php?t=1799098

http://xdaforums.com/showthread.php?t=816449

...pitfileeditor...

http://xdaforums.com/showthread.php?t=1832619

...pitprint library, part of HEIMDALL...

http://xdaforums.com/showthread.php?t=755265&page=123

...and in particular this, related to HEIMDALL

http://xdaforums.com/showthread.php?p=27035813#post27035813

And now the analysis based on the discoveries in thread cited above, I haven't found yet official documentation... if someone is so kind to point me to more info... I will be very happy to thank you! :laugh:

[28 B]	-------- PIT HEADER --------

+4	[76 98 34 12]	Magic: v.4

+4	[0f 00 00 00]	Count (onenand + mmc partitions): onenand? + GANG? + BOOT? + 12 partitions = 15

+20	[00 ..]

[132 B]	-------- PIT ENTRY 1 --------

+4	[00 ..]	Binary type (AP or CP?)

+4	[02 00 00 00]	Partition device type

+4	[00 ..]	Partition ID: 0

+4	[00 ..]	Partition attribute

+4	[00 ..]	Partition update attribute

+4	[00 ..]	Start sector (in hex)

+4	[00 ..]	Size (sectors in hex)

+4	[00 ..]	File offset (in TAR?)

+4	[00 ..]	File size

+32	[47 41 4e 47 00 ..]	Partition name:	"GANG"

+32	[65 6d 6d 63 2e 69 6d 67 00 ..]	File name: "emmc.img"

+32	[00 ..]	Delta file name for Firmware Over-the-Air (FOTA)

[132 B]	-------- PIT ENTRY 2 --------

+4	[00 ..]	Binary type (AP or CP?)

+4	[02 00 00 00]	Partition device type

+4	[01 00 00 00]	Partition ID: 1

+4	[00 ..]	Partition attribute

+4	[00 ..]	Partition update attribute

+4	[00 ..]	Start sector (in hex)

+4	[00 ..]	Size (sectors in hex)

+4	[00 ..]	File offset (in TAR?)

+4	[00 ..]	File size

+32	[42 4f 4f 54 00 ..]	Partition name:	"BOOT"

+32	[62 6f 6f 74 2e 62 69 6e 00 ..]	File name: "boot.bin"

+32	[00 ..]	Delta file name for Firmware Over-the-Air (FOTA)

[132 B]	-------- PIT ENTRY 3 --------

+4	[00 ..]	Binary type (AP or CP?)

+4	[02 00 00 00]	Partition device type

+4	[04 00 00 00]	Partition ID: 4

+4	[01 00 ..]	Partition attribute

+4	[00 ..]	Partition update attribute

+4	[00 20 00 00]	Start sector (in hex): 0x2000 (8192)

+4	[00 a0 00 00]	Size (sectors in hex): 0xa000 (40960)

+4	[00 ..]	File offset (in TAR?)

+4	[00 ..]	File size

+32	[45 46 53 00 ..]	Partition name:	"EFS"

+32	[65 66 73 2e 69 6d 67 00 ..]	File name: "efs.img"

+32	[00 ..]	Delta file name for Firmware Over-the-Air (FOTA)

... and so on ...

My questions:

- naturally :) ... is the above interpretation correct? (it is not my interpretation, but is an interpretation... I repeat I didn't find any official documentation yet, please submit if you have some more documentation on PIT

- is PIT a totally Samsung product? or other system are using it, apart of ODIN and HEIMDALL?

- what are and what are used to: Binary type (AP or CP?), Partition device type, Partition attribute, Partition update attribute, TAR

- Partition ID is used for what?

- Why associate a file to a partition? Only to tell ODIN/HEIMDALL which file it needs to flash in that particular partition? And why file size and position are zeroes?

My really personal opinion is that another partition table is really a bad choice. Replicate information is useful when used for backup intent, and GPT already have one backup of itself. Writing down the same information of GPT in PIT can only be a source of problems. If the info in the PIT file are used by some program and are not correctly synchronized with info in the GPT table, only bad things (http://catb.org/jargon/html/B/Bad-Thing.html) can happen. Writing down a file name here is really a crazy thing! :silly: Computer far more complex than Galaxy Note,doesn't use PIT table and works good, with bigger harddisk, handle multivolume and do multiboot.

I lied, this is not the last post... I need another post to end, please forgive me! :o