[AT&T LG Optimus G] dvhexer:
This procedure is really dangerous so I have to warn that you can brick your phone. It directly modifies partition tables so if something goes wrong you may have a bricked phone. Do it at your own risk and I'm not responsible for any damage it may cause.

By following the procedure, you acknowledge and accept that the author is not liable for any loss, material or otherwise howsoever caused.

OK, you've been warned :) Now to the fun part.

This procedure does work but, please, follow it only if you are an advanced user or a developer.

It also has some unnecessary steps but I include them since they can help you to learn something.

Later, I might write an "update.zip" for cwm which automatically does all the work

This works only on top of the existing N4 8G conversion.

So if you're stock etc then you'll need to do N4 8G conversion first, that is to flash the tot listed in N4 conversion topic in LGNPST.

This is a link to the N4 conversion thread: http://xdaforums.com/showthread.php?t=2099784

You also need cwm recovery installed. I did it in sk8's cwm touch recovery. So I suggest using it: http://xdaforums.com/showthread.php?t=2010984

Also, you need an external sd card with at least 100MB(after doing all rom backups) of free space and I recommend to do a filesystem check of the sd card in windows/*nix/osx.

And another requirement is to have working adb and fastboot drivers for Nexus 4.

Before starting the procedure look through all the steps and please stop if you don't understand something. No rocket science here but it's just a dangerous thing to do.

- Download the following 3 files and copy them to your _external_ sd card root directory

Links:

Modified busybox dd : http://d-h.st/cFA

16G Primary GPT(includes MBR): http://d-h.st/yUQ

16G Secondary GPT: http://d-h.st/0dH

- if you care about the content of your internal sd card then back it up somewhere. After doing this conversion all your data and /sdcard will be purged.

- boot into cwm recovery.

- if you care about your current ROM/data do a backup to _external_ sd.

- connect the phone via USB to your pc and on your pc run 'adb shell'. Once in shell:

# cp /external_sd/dd /
# chmod 755 /dd

- Backup your existing partition tables. Make sure you put / in front of dd to use my modified dd

# /dd if=/dev/block/mmcblk0 of=/external_sd/pgpt8G.img bs=512 count=34
# /dd if=/dev/block/mmcblk0 of=/external_sd/sgpt8G.img bs=512 skip=30777311

- By default cwm mounts userdata and cache partitions. You need to unmount them

# umount /data
# umount /cache

- Make sure no partition from /dev/block/mmcblk0 is mounted. df should return only this with no extra rows:

# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 911.7M 48.0K 911.6M 0% /dev
/dev/block/mmcblk1p1 59.4G 4.8G 54.6G 8% /external_sd

- Move content of DDR and grow partitions to their new locations. I doubt this step is required, but did it for safety. Seeking to the end of the mmc may take couple of minutes, don't freak out:

# /dd if=/dev/block/mmcblk0 of=/external_sd/DDR bs=512 skip=15267840 count=2015
# /dd if=/external_sd/DDR of=/dev/block/mmcblk0 bs=512 seek=30775296 conv=notrunc

- Install new partition tables. Seeking to the end of the mmc may take couple of minutes:

# /dd if=/external_sd/sgpt16G.img of=/dev/block/mmcblk0 bs=512 seek=30777311 conv=notrunc
# /dd if=/external_sd/pgpt16G.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc

- At this point you have new partition tables installed. Verify this by running parted. You should see this:

# parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
p
Model: MMC 016G92 (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 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.2MB 524kB sbl1
3 68.2MB 68.7MB 524kB sbl2
4 68.7MB 70.8MB 2097kB sbl3
5 70.8MB 71.3MB 524kB tz
6 71.3MB 94.4MB 23.1MB boot
7 94.4MB 117MB 23.1MB recovery
8 117MB 118MB 799kB m9kefs1
9 118MB 119MB 799kB m9kefs2
10 119MB 120MB 799kB m9kefs3
11 120MB 121MB 524kB rpm
12 121MB 121MB 524kB aboot
13 121MB 122MB 524kB sbl2b
14 122MB 124MB 2097kB sbl3b
15 124MB 124MB 524kB abootb
16 124MB 125MB 524kB rpmb
17 125MB 125MB 524kB tzb
18 125MB 126MB 524kB metadata
19 126MB 143MB 16.8MB misc
20 143MB 159MB 16.8MB ext4 persist
21 159MB 1040MB 881MB ext4 system
22 1040MB 1627MB 587MB ext4 cache
23 1627MB 15.8GB 14.1GB ext4 userdata
24 15.8GB 15.8GB 524kB DDR
25 15.8GB 15.8GB 507kB grow

(parted) quit
quit

Notice that userdata partition is 14.1GB in size :D

In case parted reports an error I suggest to return back to the old 8G partition tables, see below.

- Reboot the phone into bootloader: run reboot command and hold 'Up' button to enter bootloader menu

# reboot

- on your pc command line run:

fastboot erase userdata
fastboot -w

- In phone bootloader enter 'Recovery Mode' to load cwm

- In cwm restore your previous N4 rom from external sd or flash a new N4 rom

PS

In case parted reported an error, put the old 8G partition tables back. This should not happen but never say never:

# /dd if=/external_sd/sgpt8G.img of=/dev/block/mmcblk0 bs=512 seek=30777311 conv=notrunc
# /dd if=/external_sd/pgpt8G.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc