[Android Software/Hacking General [Developers Only]] tianjie_haige:
first time post a thread~;)

i got a samsung galaxy tab 7' koran version shw-m180l.

1. as i downloaded source code from source.samsung.com. there are two folders: platfrom and kernel . i'm wondering if the source code of initramfs is out there in the platform folder or in the kernel folder?

2.i got a 3M size kernel "zImage" after cross-compile on fedora 16 x86_64 follow the readme instruction posted with the source codes，and tar -cf it then flashed into my tab .but it could not working properly .the official zImage is about 7M size; i guess the reason why mine zImage is so much smaller than the official one is that i didn't packed the initramfs inside.here is thread of unpacking zImage，i could not unpack even the official zImage using unpack-bootimg.pl .and then i tried to modifiy the zImage using a hexEditor ，sadly find no magic number 1F8B for gzip around 2k data。i guess samsung is using an unusual way to packing zImage(just like samsung develeped the rfs file system instead of using the common yaff2 file system)? if then , how can i unpack ing the zImage?

3. thanks to here some one write a tool reading pit file ，the result is the same with what Heimdall reads in download mode ：

file magic = 0x12349876 (expected value)

Unknown data: 0 0 0 0 0

Number of partitions = 14 (not the usual value)

Partition #1

Usual content: boot.bin, the primary boot loader (low-level hardware initialization)

partition entry type: 0 0 (normal partition)

ID = 0;

flags = 0;

unknown: 0

size = 1 blocks of 256 * 512 bytes = 131072 B = 128 kB = 0 MB

unknown string: [........]

partition name = [IBL+PBL.........................]

file name = [boot.bin........................................................] (bootloader.is recovry program here?)

Partition #2

Usual content: partition information table (PIT) （using a partition to store pit?pc's partition table is on mbr~)

partition entry type: 0 0 (normal partition)

ID = 0x1;

flags = 0;

unknown: 0

size = 1 blocks of 256 * 512 bytes = 131072 B = 128 kB = 0 MB

unknown string: [........]

partition name = [PIT.............................]

file name = [................................................................]

Partition #3

Usual content: efs.rfs （what is efs used for?）

partition entry type: 0 0 (normal partition)

ID = 0x14;

flags = 0x2 (rfs file system);

unknown: 0

size = 40 blocks of 256 * 512 bytes = 5242880 B = 5120 kB = 5 MB

unknown string: [........]

partition name = [EFS.............................]

file name = [efs.rfs.........................................................]

Partition #4

Usual content: Sbl.bin, the secondary boot loader (loads linux kernel)

partition entry type: 0 0 (normal partition)

ID = 0x3;

flags = 0;

unknown: 0

size = 5 blocks of 256 * 512 bytes = 655360 B = 640 kB = 0 MB

unknown string: [........]

partition name = [SBL.............................]

file name = [sbl.bin.........................................................]

Partition #5

Usual content: backup of secondary boot loader

partition entry type: 0 0 (normal partition)

ID = 0x4;

flags = 0;

unknown: 0

size = 5 blocks of 256 * 512 bytes = 655360 B = 640 kB = 0 MB

unknown string: [........]

partition name = [SBL2............................]

file name = [sbl.bin.........................................................]

Partition #6

Usual content: param.lfs /mnt/.lfs j4fs （what is this for?）

partition entry type: 0 0 (normal partition)

ID = 0x15;

flags = 0x2 (rfs file system);

unknown: 0

size = 20 blocks of 256 * 512 bytes = 2621440 B = 2560 kB = 2 MB

unknown string: [........]

partition name = [PARAM...........................]

file name = [param.lfs.......................................................]

Partition #7

Usual content: zImage, the linux kernel

partition entry type: 0 0 (normal partition)

ID = 0x6;

flags = 0;

unknown: 0

size = 30 blocks of 256 * 512 bytes = 3932160 B = 3840 kB = 3 MB （only 3M? the official zImage is more than 7M size ,how could it be flashed into this partition?）

unknown string: [........] （or when flashing (using Odin) Odin will automatically unpacking zImage and flash kernel into this partition ,flash initramfs into other partition(below one ) ?）

partition name = [KERNEL..........................]

file name = [zImage..........................................................] （partition name is kernel）

Partition #8

Usual content: recovery.bin, the backup copy of zImage/initramfs

partition entry type: 0 0 (normal partition)

ID = 0x7;

flags = 0;

unknown: 0

size = 30 blocks of 256 * 512 bytes = 3932160 B = 3840 kB = 3 MB （only 3M ?）

unknown string: [........]

partition name = [RECOVERY........................]

file name = [zImage..........................................................]

Partition #9

Usual content: factoryfs.rfs

partition entry type: 0 0 (normal partition)

ID = 0x16;

flags = 0x2 (rfs file system);

unknown: 0

size = 1711 blocks of 256 * 512 bytes = 224264192 B = 219008 kB = 213 MB （only 213M？）

unknown string: [........]

partition name = [FACTORYFS.......................]

file name = [factoryfs.rfs...................................................]

Partition #10

Usual content: dbdata.rfs

partition entry type: 0 0 (normal partition)

ID = 0x17;

flags = 0x2 (rfs file system);

unknown: 0

size = 20 blocks of 256 * 512 bytes = 2621440 B = 2560 kB = 2 MB （is this mounted as /data ?only 2M？）

unknown string: [........]

partition name = [DBDATAFS........................]

file name = [dbdata.rfs......................................................]

Partition #11

Usual content: cache.rfs （cache ，like swap of linux ?）

partition entry type: 0 0 (normal partition)

ID = 0x18;

flags = 0x2 (rfs file system);

unknown: 0

size = 140 blocks of 256 * 512 bytes = 18350080 B = 17920 kB = 17 MB

unknown string: [........]

partition name = [CACHE...........................]

file name = [cache.rfs.......................................................]

Partition #12

Usual content: modem.bin （the radio?to surport communication ?）

partition entry type: 0 0 (normal partition)

ID = 0x8;

flags = 0;

unknown: 0

size = 1 blocks of 256 * 512 bytes = 131072 B = 128 kB = 0 MB

unknown string: [........]

partition name = [MODEM...........................]

file name = [modem.bin.......................................................]

Partition #13

Usual content: Unknown

partition entry type: 1 1 (past-the-end marker)

ID = 0x8;

flags = 0;

unknown: 0

size = 0 blocks of 0 * 512 bytes = 0 B = 0 kB = 0 MB

unknown string: [........]

partition name = [................................]

file name = [................................................................]

Partition #14

Usual content: Unknown

partition entry type: 0 2 (unknown value)

ID = 0;

flags = 0;

unknown: 0

size = 0 blocks of 0 * 512 bytes = 0 B = 0 kB = 0 MB

unknown string: [........]

partition name = [MOVINAND........................]

file name = [movinand.mst....................................................]

4. adb shell df ：

# df

Filesystem Size Used Free Blksize

/dev 221M 76K 221M 4096

/mnt/.lfs: Function not implemented

/mnt/asec 221M 0K 221M 4096

/mnt/obb 221M 0K 221M 4096

/app-cache 12M 0K 12M 4096

/data 485M 314M 171M 4096

/cache 30M 4K 30M 4096

/system 410M 294M 115M 4096

/efs 5M 10K 5M 1024

the size is obviously different from the pit says? which one wrong ?

thank for any information and answer~