[Nexus 4 General] houstonn:
TheManii, I can provide you with the Partition Table for LGE960AT-00-V10c-NXS-XX-NOV-13-2012-JOP40C-USER+0 with File Offset

It is a lot easier to extract.

Instead of posting here and further more clutter this thread. (you should open a new thread and start something up. you can always clean it up)

anyways. I'll post it to pastebin instead.

Binary file formats (BFF) 101. I'm not no pro and i'm sure most of you know more than me so don't quote me and correct me if im wrong.

[B] Abstraction[/B]
[I]The general structure of a BFF object can be seen to be made up by the following abstraction:[/I]

[I]• A header containing general information and information needed to access various parts of the file.
• A number of sections holding code and data (raw data).
• Relocation tables.
• Symbol table information.[/I]

As you can see on my pastebin partition table for that particular tot with the file offset. lets take example

Download : recovery 0x5a00000 Size: 0x 7168Kb, File Offset: 0x4080000

1. The file offset [B]0x4080000[/B](HEX) - your wanna convert the binary hex to decimal [B](0x4080000)16 = (67633152)10[/B]
(easiest way would be to use [URL="http://www.binaryhexconverter.com/hex-to-decimal-converter"]A binary hex converter[/URL]
[COLOR="Blue"]With the File Offset. The first column is address offset relative to the beginning of the file.[/COLOR]

2. The file size [B]7168kb[/B] - which we want to convert to bytes -[B] 7168x1024=7340032 [/B](you can use online calculator or your computer calculator)

bs=flag block size || dd block size #

The default block size is 512 bytes, but we can specify anything we want using the bs= flag. We can copy 1 byte at a time,

or we can copy 1GB at a time. Any value will work, but some values will give you better performance than others. Most

disks read a minimum of 512 bytes at a time and can easily read more at the same time. Using a value that is too small

is wasteful because the disk will need to be frequently read, and time will be wasted in the copying process. If you choose

a value that is too large, you will waste time filling up the buffer in dd before the copy is performed

Im sure anyone doing this has the basic knowledge of dd - if not, do some reading and refer here

So let's begin extracting the Recovery partition from the tot. (we will be extracting all the data not the whole partition) to extract

the whole partition what you are doing is extracting all the extra zeros.

[example of full partition extract] if on your phone you extracted - dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/data/media/recovery.img .

It means you extracted the full partition including any extra zeros after the data. let's say the

recovery partition was 24mb in size. even tho the recovery could be only 7mb. you would copy the whole partition.

What we are doing here is just going to extract the exact size to .img.

dd bs=1 skip=67633152 count=7340032 if=name.of.tot.tot of=recovery.img

So what we just did was copy the raw data from the tot telling it to skip to 67633152 offset

remember: The first column is address offset relative to the beginning of the file

then count=7340032 the exact size we want.

In the end we have an image (raw binary img) of the raw data we extracted = recovery.img that is 7340032bytes in size

For those that don't know much about partitions - THIS LINK HERE IS A GOOD READ

Again: please correct me if I'm wrong with any info. I'm still learning. and always willing to learn and share.

.

REQUEST: I own a LG Optimus G bell variant LGE973 (lge973 is as close to the nexus 4 than any other)

I run everything mako on my phone. As you probably notice there isn't much development in the LGOG forums.

what doesn't work on my phone is capacitive virtual softkeys and a few other things. If there's any developers

that can help me out with a few things.(it would be greatly appreciated). problem is we are waiting for source code.

but if someone would like to help on a few things, please feel free to PM me or contact me through IRC on

freenode #lg-optimus-g. thanks