Guest D3abL3 Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) Hello fellows, this guide is to help you and teach you how to modify your partitions size, specificaly system & data & cache partitions. First of all we'll need an example to work with. Get it here: http://dl.dropbox.co...428/Example.rar This is a 200MB system & 205MB data & 35MB cache partition layout.(made by Amphoras) You can use any HEX editor, but I'll be using HxD. So let's open the partition_zte.mbn with our HEX editor, and we get the following(I get this in HxD): As you can see we have the partition names on the right side: Recovery; Boot; Splash; Misc; Cache; System; UserData; OEM; Persist. Let's say we want to edit the System partition, so we select on the right side "system" and it will highlight both the right side and the corresponding on the left side, like this: As we can see, after the highlighted selection in hex(left side) we have a lot of zeros(0), when the zeros end we will get a set of 12 characters with 4 zeros in the middle, like this: Let's write down this set of caharacters: 44 03 00 00 40 06 Every set of this will be in this format XX XX 00 00 XX XX, always with 4 zeros in the middle. But we only need the last 4 characters, those correspond to that specific partition size: 40 06 Now we need to reverse this set so we can work with it: 06 40 Here's a table to convert Hex to Decimal: Let's convert this Hex set to MB: 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----|-----6----|----4-----|----0----| 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-----|-----6-----|-----4-----|-----0-----| |-----0-----|-----6-----|-----4-----|-----0-----| | 0*(16^3) | 6*(16^2) | 4*(16^1) | 0*(16^0) | Now we write down the results and add them all together. | Column 3 | Column 2 | Column 1 | Column 0 | |-----0----|-----6----|----4-----|----0-----| |-----0----|-----6----|----4-----|----0-----| | 0*(16^3) |6*(16^2)| 4*(16^1)| 0*(16^0) | |-----0----|--1536---|---64----|-----0----| The total here is 1600 Now we divide 1600 by 8 and we get the size in MB. 1600 / 8 = 200 MB , our System partition has 200 MB. How to do the inverse? MB to HEX? Easy! Take the result from before: 200 MB Multiply those 200 by 8: 200 * 8 = 1600 Now let's divide 40 for 16 and the remainders are our hexs. 1600 / 16 = 100 , here our reminder will be 0 as we can see: 0 * 16 = 0 <- This is our first Hex 100 / 16 = 6,25 , now let's keep the number 6 in our head and take only the value after comma(,), let's get our remainder: 0,25 * 16 = 4 <- This is our second Hex 6 / 16 = 0,375 , same thing as before, we keep the 0(zero) and take only the value after comma(,) to get the remainder: 0,375 * 16 = 6 <- This is our third Hex 0 / 16 = 0 , so the remainder will also be 0 <- This is our fourth and last Hex We do the above process untill the remainder is less than 1. Sow we have 06 40. Now we need to switch places each pair so we get the hex we need 40 06. So if you want to build a partition layout with 150MB you'll have to use the 40 06 hex value. Now that we understand HEX let's make a partition layout using the above. We should just touch system, data and cache unless you want to mess up your phone's partitions. Let's use the above partition_zte.mbn where system has 40 06, data has 68 06 and cache has 18 01. By the method above we can say that each partition is 200MB, 205MB and 35MB. Let's say we want a system 150MB, data 250MB and cache 40MB. We just need to convert these to HEX values using the method above: 150 = B0 04 250 = D0 07 40 = 40 01 So we go on our partition_zte..mbn and make the changes: System: From 44 03 00 00 40 06 go to 44 03 00 00 B0 04 Data: From 84 09 00 00 68 06 go to 84 09 00 00 D0 07 Cache: From 2C 02 00 00 18 01 go to 2C 02 00 00 40 01 You must make this changes in appsboot.mbn as well, you can find it in the end of the file. Congratulations, you just graduated in HEX :lol: Happy Math! P.S.: You can always use Google, but here you have everything already ;) Edited November 21, 2011 by D3abL3 Link to comment Share on other sites More sharing options...
Guest Amphoras Posted November 21, 2011 Report Share Posted November 21, 2011 So we go on our partition_zte..mbn and make the changes: System: From 44 03 00 00 40 06 go to 44 03 00 00 B0 04 Data: From 84 09 00 00 68 06 go to 84 09 00 00 D0 07 Cache: From 2C 02 00 00 18 01 go to 2C 02 00 00 40 01 You need to change the offsets as well if you change the size of a partition, otherwise you are leaving random space between some and overlapping others. In your above example, the partitions come in the order cache, system, userdata. You've made cache larger, so you have to make system start later. To get the new offset for system, you need to add the size of cache to the offset of cache: 022C + 0140 = 036C. So now system starts at 036C instead of 0344. You do the same to find out where userdata starts: 036C + 04B0 = 081C. So now userdata starts at 081C. Now you go to partition_zte..mbn with these new values and make the changes: Cache: From 2C 02 00 00 18 01 go to 2C 02 00 00 40 01 System: From 44 03 00 00 40 06 go to 6C 03 00 00 B0 04 Data: From 84 09 00 00 68 06 go to 1C 08 00 00 D0 07 Link to comment Share on other sites More sharing options...
Guest Reaskawallah Posted November 21, 2011 Report Share Posted November 21, 2011 What are the benefits of modifying your partitions ? Link to comment Share on other sites More sharing options...
Guest dadashi Posted November 21, 2011 Report Share Posted November 21, 2011 What are the benefits of modifying your partitions ? gain more storage space for more apps.... BUT, don't try it if you've never done it before and are not sure... USE the partitions amphoras TPT's he's already made in his TPT thread... Link to comment Share on other sites More sharing options...
Guest atillaahun Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) And why do we have only 440 MB? What takes the rest, and how much of each? Can't we change them as well? Edited November 21, 2011 by atillaahun Link to comment Share on other sites More sharing options...
Guest D3abL3 Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) And why do we have only 440 MB? What takes the rest, and how much of each? Can't we change them as well? You don't have only 440MB, you have 512MB if I'm not mistaken. But those 512MB are distributed through all the partitions: Persist, OEM, Splash, Boot, Misc, Recovery, Data, System and Cache. @Amphoras: Thanks I forgot about the offsets. Edited November 21, 2011 by D3abL3 Link to comment Share on other sites More sharing options...
Guest atillaahun Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) You don't have only 440MB, you have 512MB if I'm not mistaken. But those 512MB are distributed through all the partitions: Persist, OEM, Splash, Boot, Misc, Recovery, Data, System and Cache. @Amphoras: Thanks I forgot about the offsets. Okay, let's count than. Data 205 MB System 200 MB Cache 35 MB Boot 5 MB Recovery 5 MB OEM 1 MB Than we have 451 MB, so these below are 61 MB if I want to get the 512 MB altogether. Misc ? MB Splash ? MB Persist ? MB What do they contain and why take up much space? I suppose splash is just a picture, the misc would be the miscellaneous (for what exactly?), and persist would be the space for firmware? Edited November 21, 2011 by atillaahun Link to comment Share on other sites More sharing options...
Guest Indiant Posted November 21, 2011 Report Share Posted November 21, 2011 Misc ? MB Splash ? MB Persist ? MB What do they contain and why take much space? splash 1,5 MB - bootlogo misc 0,5 MB ? cache 57,5 MB -cache system 200 MB - android userdata 162,5 MB -data oem 21 MB -maybe for photos without sd persist 1,5 MB ? Together 454,5 MB Link to comment Share on other sites More sharing options...
Guest atillaahun Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) splash 1,5 MB - bootlogo misc 0,5 MB ? cache 57,5 MB -cache system 200 MB - android userdata 162,5 MB -data oem 21 MB -maybe for photos without sd persist 1,5 MB ? Together 454,5 MB And what about the other 512-454,5= 57,5 MB, and recovery and boot? Edited November 21, 2011 by atillaahun Link to comment Share on other sites More sharing options...
Guest D3abL3 Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) Okay, let's count than. Data 205 MB System 200 MB Cache 35 MB Boot 5 MB Recovery 5 MB OEM 1 MB Than we have 451 MB, so these below are 61 MB if I want to get the 512 MB altogether. Misc ? MB Splash ? MB Persist ? MB What do they contain and why take up much space? I suppose splash is just a picture, the misc would be the miscellaneous (for what exactly?), and persist would be the space for firmware? I just read all values in this TPT and in Portuguese Stock TPT. This TPT: Recovery 5 MB Boot 5 MB Splash 1.5 MB Misc 0.5 MB Cache 35 MB System 200 MB Data 205 MB OEM 1 MB Persist 1.5 MB Total 454.5 MB PT Stock TPT: Recovery 0.375 MB Boot 0.25 MB Splash 1.5 MB Misc 0.5 MB Cache 57.5 MB System 220 MB Data 162.5 MB OEM 1 MB Persist 1.5 MB Total 445.125 MB This makes me think that there is unalocated space... :blink: P.S.: OEM is where the drivers, for example, are stored. EDIT Guess I was wrong, in the Amphoras TPT's thread he mentions that total space is 454.5 MB... Seriously to me doesn't make much sense, I would prefer the 512 MB :P Edited November 21, 2011 by D3abL3 Link to comment Share on other sites More sharing options...
Guest atillaahun Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) This makes me think that there is unalocated space... :blink: P.S.: OEM is where the drivers, for example, are stored. Well, let's just say than it's quite troubling. ZTE! What have you done with the rest of our memory?! I want it back! :D EDIT: so the other ~60MB we can not see would be the firmware, or what? Edited November 21, 2011 by atillaahun Link to comment Share on other sites More sharing options...
Guest D3abL3 Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) I've just edited my post, look in the end of it :blush: Edited November 21, 2011 by D3abL3 Link to comment Share on other sites More sharing options...
Guest atillaahun Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) I've just edited my post, look in the end of it :blush: Yeah, I saw, I edited too. But you're saying after all, that ~60 MB we missing from the 512 Mb doesn't even exist? So we're just the victims of ZTE's marketing? Edited November 21, 2011 by atillaahun Link to comment Share on other sites More sharing options...
Guest Amphoras Posted November 21, 2011 Report Share Posted November 21, 2011 Yeah, I saw, I edited too. But you're saying after all, that ~60 MB we missing from the 512 Mb doesn't even exist? So we're just the victims of ZTE's marketing? The full 512MB is used. If you go with the first TPT from the other thread you have 150MB system, 35MB cache, 255MB data. So that's 440MB straight off. You have 5MB for each of recovery and boot, 1.5MB for splash, 0.5MB for misc, 1MB for OEM and 1.5MB for persist. This gives you a total of 454.5MB. If you look at the offset of the first partition (recovery) you'll notice its 0x1CC and not 0. 0x1CC is 57.5MB and 454.5 + 57.5 = 512. This 57.5MB at the start is used for the radio partitions (amss.mbn etc.) so you can't use this. It is possible to get a little bit of extra space from the other partitions. You could reduce misc, OEM and persist to 0.125MB and reduce splash to 1.125MB. This would give you another 2.5MB for data. However the tiny bit of extra space isn't really worth the trouble. I don't know what, if anything, misc and persist are used for so changing then might cause problems. OEM should be safe enough to change, but you're getting less than 1MB extra space. If you start taking stuff off the splash partition, then it can cause problems if some of the blocks are corrupted. For the tiny (0.375MB) bit of extra space you could get off it its just not worth it. Link to comment Share on other sites More sharing options...
Guest atillaahun Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) The full 512MB is used. If you go with the first TPT from the other thread you have 150MB system, 35MB cache, 255MB data. So that's 440MB straight off. You have 5MB for each of recovery and boot, 1.5MB for splash, 0.5MB for misc, 1MB for OEM and 1.5MB for persist. This gives you a total of 454.5MB. If you look at the offset of the first partition (recovery) you'll notice its 0x1CC and not 0. 0x1CC is 57.5MB and 454.5 + 57.5 = 512. This 57.5MB at the start is used for the radio partitions (amss.mbn etc.) so you can't use this. It is possible to get a little bit of extra space from the other partitions. You could reduce misc, OEM and persist to 0.125MB and reduce splash to 1.125MB. This would give you another 2.5MB for data. However the tiny bit of extra space isn't really worth the trouble. I don't know what, if anything, misc and persist are used for so changing then might cause problems. OEM should be safe enough to change, but you're getting less than 1MB extra space. If you start taking stuff off the splash partition, then it can cause problems if some of the blocks are corrupted. For the tiny (0.375MB) bit of extra space you could get off it its just not worth it. Thanks for the clarification, I haven't heard about this 57.5 MB partion used for the radio before, that' why the confusion. But now I'm finally fine. :) Btw I wasn't considering changing those small partitions of course. Tho I still have a blind spot: where do the firmware files go, that would be the radio partition? Edited November 21, 2011 by atillaahun Link to comment Share on other sites More sharing options...
Guest D3abL3 Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) Thanks for the clarification, I haven't heard about this 57.5 MB partion used for the radio before, that' why the confusion. But now I'm finally fine. :) Btw I wasn't considering changing those small partitions of course. Tho I still have a blind spot: where do the firmware files go, that would be the radio partition? What do you mean by firmware? When you flash a ROM? *.zip ROM or TPT ROM? In *.zip ROMs the mainly touched partition is /system, on TPTs almost all partitions(if not all) are touched. Edited November 21, 2011 by D3abL3 Link to comment Share on other sites More sharing options...
Guest Amphoras Posted November 21, 2011 Report Share Posted November 21, 2011 Thanks for the clarification, I haven't heard about this 57.5 MB partion used for the radio before, that' why the confusion. But now I'm finally fine. :) Btw I wasn't considering changing those small partitions of course. Tho I still have a blind spot: where do the firmware files go, that would be the radio partition? If you mean the radio firmware then it goes in the radio partitions. If you mean the rom, then like D3abL3 said, it goes in the system and boot partitions. Link to comment Share on other sites More sharing options...
Guest atillaahun Posted November 21, 2011 Report Share Posted November 21, 2011 (edited) What do you mean by firmware? When you flash a ROM? *.zip ROM or TPT ROM? In *.zip ROMs the mainly touched partition is /system, on TPTs almost all partitions(if not all) are touched. Sorry, I didn't realize, that "firmware" is not really used around here, we just say it in the hungarian forums, and mean by the image.bin updates ZTE publish. So I guess it's the TPT than. One more thing is clear for the day. Thanks again. :) Though there would be a last one. How is it possible than, that for instance I TPT my phone with OMC "firmware", and it still accepts only the HU T-Mobile SIMs? Shouldn't be the mobile carrier specific editions (I linked above) carry the locking method? Know that unlocking is partly solved, but that's just too complicated for me. Edited November 21, 2011 by atillaahun Link to comment Share on other sites More sharing options...
Guest Amphoras Posted November 21, 2011 Report Share Posted November 21, 2011 Sorry, I didn't realize, that "firmware" is not really used around here, we just say it in the hungarian forums, and mean by the image.bin updates ZTE publish. So I guess it's the TPT than. One more thing is clear for the day. Thanks again. :) Though there would be a last one. How is it possible than, that for instance I TPT my phone with OMC "firmware", and it still accepts only the HU T-Mobile SIMs? Know that unlocking is partly solved, but that's just too complicated for me. The locking mechanism appears to be in cefs.mbn. This can't be flashed by a TPT, so after you flash the UK TPT, your cefs.mbn is still the Hungarian one so is still locked exactly as it was before. Link to comment Share on other sites More sharing options...
Guest xiaoyaoswim Posted November 22, 2011 Report Share Posted November 22, 2011 Thanks to Amphoras and D3abL3 for the partition guide. I managed to push the userdata size to extreme (2MB cache,130MB system, and 308MB userdata) and it works fine with CM7. @D3abL3 The conversion between hex and dec could be easily done by the calculator in Windows to save the trouble of doing math @atillaahun Sim-lock state will not be affected by any TPT. Link to comment Share on other sites More sharing options...
Guest D3abL3 Posted November 22, 2011 Report Share Posted November 22, 2011 Thanks to Amphoras and D3abL3 for the partition guide. I managed to push the userdata size to extreme (2MB cache,130MB system, and 308MB userdata) and it works fine with CM7. @D3abL3 The conversion between hex and dec could be easily done by the calculator in Windows to save the trouble of doing math @atillaahun Sim-lock state will not be affected by any TPT. You're welcome, but now no more downloads with more than 2MB from Market for you I think :P Don't say that out loud or the newbies will start thinking this is easy and they'll screw their phones up :lol: Link to comment Share on other sites More sharing options...
Guest atillaahun Posted November 22, 2011 Report Share Posted November 22, 2011 Do you guys also know the build-up of RAM? Not that I would in lack of it, just curios what happens with that 100+ MB, I can't see in the resources-management App. That would be the dalvik-cache? And what else? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now