**Short Guide to editing partitions**

First you need to get a TPT image.bin and extract the files from it. There are a couple of tools on the forums that you can use to do this. Once you've done that, to change the partitions you need to edit partition_zte.mbn and appsboot.mbn.

To edit them, you need a hex editor. Once you open up partition_zte.mbn, depending on the hex editor you use, you might see a section that shows 0:RECOVERY some spaces then some funny characters. Then 0:BOOT some more spaces and funny characters, and so on with splash, misc, cache, system, userdata, oem and persist. If you don't see this, then this is the ASCII representation of the hex codes you should see as well. If you look more closely at hex side for the bits after the partition names, you'll notice that they are all in the form xxxx0000xxxx. This represents the offset, then the size. Both the offset and the size are reversed, so if you see CC0100002800 then the offset it 0x1CC and the size is 0x028. To get the sizes in mb, you just convert the hex size to decimal then divide by 8.

When you change the partitions, you just need to remember that if you add space to one, you need to take it from another. You can change the sizes of cache, system, userdata and probably oem as well (its fine to do so on Blade) without anything bad happening. If you change the offset of the splash partition, you need to edit something else hidden in appsboot.mbn and I don't know where, so I don't recommend doing that. If you change the size of a partition, you need to make sure the following offsets match up.

So once you've change all the sizes and made sure all the offsets match up, you just save partition_zte.mbn and open appsboot.mbn. If you scroll all the way to the bottom, you'll see a section exactly like the stuff in partition_zte.mbn. All you have to do now is make the exact same changes and save it. Once you're done, you can rebuild the TPT into the image.bin form using the same tool as for unpacking it. Just remember that if you've made a backup on one layout, it may not fit in your new layout.

I know its a bit vague at some parts, but that's intentional. You can break your phone if you do something wrong (probably still recoverable, but still), so it's better if you have to think about what you're doing rather than rushing in.

I seriously advice not to any newbie to try this!!!

If you mess up the partitions your phone won't get bricked but you need a hell of work to fix it, so I ask you to please don't try this......

I say this because I already messed up the partitions in mine once and was a hell of work to fix it

Thanks Amphoras for this "vague" guide

P.S.: Here's a table to convert HEX to DECIMAL...

**hex_dec.png** **4.64KB**
8 downloads**And a calculator**.

Let's take Amphoras's example:

CC 01 00 00 28 00, here you must count 4 characters each side, so we'll forget those 4 zeros in the middle. But what we need is the last 4 characters, so we'll have 28 00.

Now let's switch their positions 28 00 and we'll get 00 28.

Let's make 4 columns from 3 to 0.

**| Column 3 | Column 2 | Column 1 | Column 0 |**

And now we'll place each number in 00 28 to each column.

| Column 3 | Column 2 | Column 1 | Column 0 |

**|----0----|-----0----|----2-----|----8----|**

In the next step we should convert each hex to its corresponding decimal, but the numbers will look the same as you can see from the table attached to this post.

In the following step we multiply the each decimal for 16 elevated to the corresponding column number.

| Column 3 | Column 2 | Column 1 | Column 0 |

|-----0-----|-----0-----|-----2-----|-----8-----||-----0-----|-----0-----|-----2-----|-----8-----|

**| 0*(16^3) |**** 0*(16^2) | 2*(16^1) | 8*(16^0) |**Now we write down the results and add them all together.

| Column 3 | Column 2 | Column 1 | Column 0 |

|-----0----|-----0----|----2-----|----8-----||-----0----|-----0----|----2-----|----8-----|

| 0*(16^3) | 0*(16^2)| 2*(16^1)| 8*(16^0) |**|-----0----|----0-----|---32----|-----8----|** The total here is

**40**Now we divide 40 by 8 and we get the size in MB.

**40 / 8 = 5 MB**

How to do the inverse? MB to HEX? Easy!

Take the result from before:

** 5** MB

Multiply those 5 by 8:

** 5 * 8 = 40**

Now let's divide 40 for 16 and the remainder is our first hex.

40 / 16 = 2,5 let's keep number

**2**(we remove the decimal houses) in our head and multitply 0,5 for 16. This will get our remainder:

** 0,5 * 16 = 8**

2 / 16 = 0,125 same thing has before but now we keep number

**0** in head and use 0,125:

**0,125 * 16 = 2****0 / 16 = 0** so the remainder will be

**0**We do the above process untill the remainder is

**less** than

**1**.

Sow we have 82 0, but we need 4 characters so we add zeros(0) to complete it and we get 82 00.

Now we need to reverse each pair so we get the hex we need

**28 00**

Now let's say 150MB.

That's 150*8 = 1200

1200/16 = 75 | 0*16 = 0

75/16 = 4,6875 | 0.6875*16 = 11 which will be B

4/16 = 0,25 | 0,25*16 = 4

0/16 = 0 | 0*16 = 0

0B 40

This

**0B 40** needs to be reversed.

We will reverse each pair, not the whole 4 characters. So in the end we'll have the hex

**B0 04**.

**Happy Math! **