[Nexus 5 Q&A, Help & Troubleshooting] nailyk:
Nothing related with phone devices but a good example of BGA reflow and trouble with it.

BE CAREFUL! changin gpt table can harm your device! (on sony Z series for ex it result on a brick!) Don't try this if you are unsure!

#include <std/disclaimer.h>
/*
* I am not responsible for bricked devices, dead SD cards, thermonuclear
* war, or the current economic crisis caused by you following these
* directions. YOU are choosing to make these modificiations, and
* if you point your finger at me for messing up your device, I will
* laugh at you.
*/

For the repartitionning I found a sdparted-recovery.zip (for armv4 so it should be compatible with all phones)

http://www.droidforums.net/threads/internal-storage-partitions-screwed-up.78650/. It replace some files in the running recovery ramdisk and add parted so gpt modifications can be done easily.

% adb push sdparted-recovery.zip /tmp
8640 KB/s (439969 bytes in 0.049s)
% adb shell/tmp
# cd /tmp
/tmp # unzip sdparted-recovery.zip
Archive: sdparted-recovery.zip
inflating: META-INF/MANIFEST.MF
inflating: META-INF/CERT.SF
inflating: META-INF/CERT.RSA
inflating: META-INF/com/google/android/update-script
inflating: links.sh
inflating: sdparted/e2fsck
inflating: sdparted/mke2fs
inflating: sdparted/parted
inflating: sdparted/resize2fs
inflating: sdparted/sdparted
inflating: sdparted/tune2fs
/tmp # chmod +x sdparted/*
/tmp # cp sdparted/* /sbin
/tmp # parted /dev/block/mmcblk0 print
Model: MMC VYL00M (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 524kB 4194kB 3670kB sbl
3 4194kB 25.2MB 21.0MB ext4 efs
4 25.2MB 33.6MB 8389kB param
5 33.6MB 37.7MB 4194kB misc
6 37.7MB 41.9MB 4194kB ext2 dgs
7 41.9MB 50.3MB 8389kB boot
8 50.3MB 62.8MB 12.5MB recovery
13 62.8MB 62.9MB 65.5kB metadata
9 62.9MB 79.7MB 16.8MB radio
10 79.7MB 765MB 686MB ext2 system
11 765MB 1218MB 453MB cache
12 1218MB 15.8GB 14.5GB userdata

/tmp #
/tmp # parted --help
Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
Apply COMMANDs with PARAMETERS to DEVICE. If no COMMAND(s) are given, run in
interactive mode.

OPTIONs:
-h, --help displays this help message
-l, --list lists partition layout on all block devices
-m, --machine displays machine parseable output
-s, --script never prompts for user intervention
-v, --version displays the version

COMMANDs:
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] print general help, or help on
COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition
table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on
partititon NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table,
available devices, free space, all found partitions, or a particular
partition
quit exit program
rescue START END rescue a lost partition near START
and END
resize NUMBER START END resize partition NUMBER and its file
system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition
NUMBER
unit UNIT set the default unit to UNIT
version display the version number and
copyright information of GNU Parted
/tmp #