[Nexus S General] efferre:
Yes, I have seen your post but I haven't tried yet that solution up to now. I prefer keeping the things simple :)

As the partition layout on the eMMC is using the new GPT standard (besides the MBR), I have also tried with gdisk (after having crosscompiled for ARM), a tool which is GPT-aware. Same result :(

Last step, I want to play with the PIT data. I have found heimdall which is capable to dump PIT data and later write back a modified version as done here using PITMagic.

Here is the PIT dump I get after putting the phone in download mode:

heimdall print-pit --file i9023.pit.orig
Heimdall v1.4.1

Copyright (c) 2010-2014 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Entry Count: 16
Unknown 1: 0
Unknown 2: 0
Unknown 3: 0
Unknown 4: 0
Unknown 5: 0
Unknown 6: 0
Unknown 7: 0
Unknown 8: 0

--- Entry #0 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 0
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 1
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: IPBL
Flash Filename: bootloader.img
FOTA Filename:

--- Entry #1 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 1
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 7
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SBL
Flash Filename:
FOTA Filename:

--- Entry #2 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 2
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 7
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SBL2
Flash Filename:
FOTA Filename:

--- Entry #3 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 3
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 4
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PARAM
Flash Filename:
FOTA Filename:

--- Entry #4 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 4
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 5
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MISC
Flash Filename:
FOTA Filename:

--- Entry #5 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 5
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 32
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOT
Flash Filename: boot.img
FOTA Filename:

--- Entry #6 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 6
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 32
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RECOVERY
Flash Filename: recovery.img
FOTA Filename:

--- Entry #7 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 7
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 1878
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CACHE
Flash Filename: cache.img
FOTA Filename:

--- Entry #8 ---
Binary Type: 1 (CP)
Device Type: 0 (OneNAND)
Identifier: 8
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 54
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RADIO
Flash Filename: radio.img
FOTA Filename:

--- Entry #9 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 9
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 27
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: EFS
Flash Filename:
FOTA Filename:

--- Entry #10 ---
Binary Type: 0 (AP)
Device Type: 0 (OneNAND)
Identifier: 10
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 256
Partition Block Count: 1
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: DGS
Flash Filename: dgs.img
FOTA Filename:

--- Entry #11 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 0
Attributes: 2 (STL Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 2048
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PGPT
Flash Filename: emmc.img
FOTA Filename:

--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 1
Attributes: 2 (STL Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 1048576
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SYSTEM
Flash Filename: system.img
FOTA Filename:

--- Entry #13 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 2
Attributes: 2 (STL Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 2097152
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: USERDATA
Flash Filename: userdata.img
FOTA Filename:

--- Entry #14 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 3
Attributes: 2 (STL Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 33554432
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MEDIA
Flash Filename: media.img
FOTA Filename:

--- Entry #15 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 4
Attributes: 2 (STL Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 33
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SGPT
Flash Filename:
FOTA Filename:

but I have a few doubts:

can I write back the modified PIT (on the eMMC part) without having to flash back the OneNand parts (i.e. the repartitioning is touching only the modified parts of the PIT, in my case only the eMMC)?

after looking at the PIT sections, in particular at #14, I see a discrepancy because it says that the size of the MEDIA partition is more than 17GB which is of course not possible because the whole eMMC is only 16GB :confused: (I have opened a ticket for [MENTION=242423]benjamin[/MENTION])