How to create custom ClockworkMod Recovery partition size for HTC HD2?

150MB, 250MB and 400MB ClockworkMod Recovery partition layout sizes are enough for HTC HD2 CyanogenMod, AOSP, MIUI and standard Sense ROM. However, it maybe not be suitable for disk space hungry Android 4.0 ROM for HTC HD2. So creating a custom ClockworkMod Recovery partition layout size to match the exact size that require by Android 4.0 ROM will provide some extra user disk space.

flash.cfg file in ClockworkMod Recovery partition layout is the one that control the sizes that install. You will see these values in 250MB partition layout. Normally, you need to change 3 values which are boot, system and cache. And ROM chef will provides the ROM partition layout size like 7/200/10 (boot/system/cache) or 220/7 (system/cache).

[quote_box_center]misc ya 1M
recovery rrecov|ro|nospr filesize recovery-raw.img
boot yboot|ro 5M
system ya 250M
cache ya 5M
userdata ya|asize|hr allsize[/quote_box_center]

Example 1 – 7/200/10
misc ya 1M
recovery rrecov|ro|nospr filesize recovery-raw.img
boot yboot|ro 7M
system ya 200M
cache ya 10M
userdata ya|asize|hr allsize

Example 2 – 220/7
misc ya 1M
recovery rrecov|ro|nospr filesize recovery-raw.img
boot yboot|ro 5M
system ya 220M
cache ya 7M
userdata ya|asize|hr allsize

Step by Step Guide

  1. First of all, download 250MB partition layout here.
  2. Extract all files to Recovery folder.
  3. Edit flash.cfg to match the sizes require by Android ROM.
  4. Save it and that’s it.

Continue with How to Install ClockworkMod Recovery v1.3 on HTC HD2? (Video) installation guide then.


  1. You left out an important step. To edit the .cfg you have to open a Notepad document and drag the flash.cfg into the Notepad document.

  2. NEED help bro..i open the flash.cfg@ show Description of flash.cfg format

    1. each line define one partition
    2. maximum number of partitions is 16
    3. order of partitions are same like lines in the file
    4. line format:
    partition name – up to 15 chars, shown in MTD later
    size – can be related to filesize: “filesize”, “filesize+10M”, “filesize+10b”,
    or have fixed size: “10M”, “100b”
    [M – means Megabytes, b – menas blocks (each NAND block is 128kbytes)]
    can be “allsize” for auto size partition.
    flags/type – can be different values:

    “ya” – YAFFS2 partition. MAGLDR can show root directory context or read kernel/initrd from it
    “raw” – RAW data.

    “ro” – disable add extra 5% to partition size and count bad blocks into size
    “boot” – this partition contains zImage and initrd.gz for NAND boot (it must have YAFFS2 type)
    “asize” – auto size. this partition will use all available space after other partitions. only one partition can have this type.
    “nospr” – binary data have not spare data. (2048+0 format), otherwise 2048+64 format used.
    “nors” – use exactly specified size for partition. no resize is done.
    “hr” – this partition must be erased if user select “AD HardReset” in MAGLDR menu.

    different flags and types separated via “|” symbol, like “boot|ya|ro”

    how to ??? help

  3. successfully installed ics 1.3 and ran smoothly, after upgraded to ics 1.4, my hd2 kept showing animation screening and could not booted into the normal andriod screen. had tried to take out battery several times but still the same! tried to install previous verions, such as gingerbread and older verions, got same result – animation screen kept showing!. now. i can only run andriod 2.2 (kernel which can only be installed via a pc:(

  4. Hi Jayce, i have two questions for you. 1) is custom ClockworkMod Recovery partition and MAGLDR repartition through HD2 toolkit same? if yes, which one is safe and better? 2) i have downloaded Notepad++. would you recommend to edit flash.cfg through this? any harms in doing so? Thanks in advance.

  5. Hi Jayce , i have just completed everything but it isnt going ahead of the last step , all i can c is colour graphics from last half an hour…..Wat shall i do , shall i reboot it?

  6. Hey jayceo i love the work you do and you must have the patience of a saint answering the same questions over an over again lol I have one for you i need the hd2 tool box download link now before you say its in xda developers site an forum there link doesnt work and i found a link here before for it on one of your pages but i have been through again and cant find it anywhere and i know its on here im going to install ics 4.0.4 rom i have gingerbread 2.3.7 but i need to sort out the partitions and everything i have the the apps2sdx download and obviously my phone has the correct radio an hspl i just need the toolbox as the laptop i had it installed on is at my sisters and i cant get it back for ages also is there a diferent way i can do the install like with just the phone using cwm recovery an mgldr v1.13 i think its possible but i dont know about the partions an how they would be done without using hd tool kit ect ect so i think its easier for me to just get the link to use the toolbox s i know what im doing that way sorry to write so much thanks again an keep up the good work please provide link thanks

  7. I installed ICS on my HTC HD2 (originally came with Win 6 OS) from the link on this page & followed the installation & it works fine. I however changed flash.cfg 5/220/7 as below.

    misc ya 1M
    recovery rrecov|ro|nospr filesize recovery-raw.img
    boot yboot|ro 5M
    system ya 220M
    cache ya 7M
    userdata ya|asize|hr allsize

    The problem is it always says “low on space” & I’m unable to install many apps like FB, Linkedin, Chrome, G+, etc. They are 10M+ app each. Is it possible to have a different partition size and get additional space for installing these apps? Without these my ICS on HTC HD2 is pretty much reduced to just a phone 🙁

    • I managed to open it. I changed 250 ya to 220. is that right? Just a question, you mentioend above, that we should extract these to Recovery folder. Do you mean a sepcific folder from last steps?

  8. Hello Jayce,

    I left my HTC HD2 for couple of years as I can’t upgrade Windows OS 6.5 to Windows7.0 or any other operating system upgrade at all. If I want to use android on my HD2 which step should I follow. My mobile descriptions are as follows:

    Windows mobile 6.5 Professional
    OS version 5.2.21869(21869.5.0.82)
    Manila version 2.5.19211619.0
    ROM version: 1.48.405.2(71294) WWE
    Radio version

    RAM 448 MB
    Flash Size 512 MB
    Storage size 181.35 MB

    If you kindly tell me which procedure should I follow that will be great.
    Many Thanks

  9. Many Thanks…Let me try…

    Which supporting software should I download to install on my phone?? If I want to install android jellybean, is it possible? I just want to use my phone with all apps on it. My SD card has 1 GB free memory. Is that ok to continue?

  10. Hello Jayce,

    Thanks for it. I think I almost done it… Steps I have completed are as follows:

    Installed HSPL4 on HTC HD2
    Installed Custom Radio v2.15 ROM on HTC HD
    Installed MAGLDR v1.13 on HTC HD2
    Installed ClockworkMod Recovery v1.3 on HTC HD2

    Can I now install jellybean on my HD2? Or do I need to do any more work??

  11. Hello Jaycee,

    Many thanks for your help. I managed to install android4.0 icecream version. But the problem is I can’t connect to the internet using my mobile data. My apps are not working as well. Camera quality is very poor. I can’t download apps.

    Also if I want to install jellyBean now should I just install jellybean on top of current android version? or I need to erase android 4.0 and reinstall Jelly Bean.

  12. Hello,

    I have cyanogenMod 10, paranoidAndroid 2.57 (ZeJsters) on My hd2.
    I want MIUI, what do i have to download?
    And what do i neer to change, like partition size etc?


  13. Hello Jaycee,

    Many Thanks for your help. My HTC is up and running now with android 4.0. I got internet connections as well.
    My internal memories getting low very quickly and I can’t download any large apps with this memory. Also my camera is not working properly. If I turn my camera on after few moments it just crashed. If I try to listen music using MUSIC apps it crashing as well. Can you give me any advice on it please.

    • Hi Sakil, this is the limitation of HTC HD2. Try to use smaller CWM layout size. This will increase internal storage a bit.
      Applications crash issue is due to Android ROM. Try other Android ROM.

  14. Hello Jayce,

    Thanks for quick reply. Just wondering, can you suggest what should be the better CWM layout size for my HTC HD2 also can you give me any idea of any other android ROM rather than Radio-Leo- that I am currently using now to solve my problems.

    Also if I want to do all of this, do I need to start over again. Like installing HSPL4,then recovery and all of these process that I have done few days back to convert Windows to Android? Is there any way that my camera resolution can getting better like before when I was using windows6.5 OS.

    Or can I move to windows8.0 OS from current setup?? If it does can you give me any link please so I can do it.

  15. hi, i’m bastian6039 can you help me? wat i have to do?:
    I install all the steps, but i use 150 mg in cwm what i have to do?
    (can you explain me step by step?

  16. An error has occurred
    Read below for more information

    Error Description: USB init failed
    Info: .\RSPL\RSPL.cpp (736)
    the programme said me that

  17. Does this apply to other phones? I want to resize my HTC mytouch 4G because my /system partition is 40% free while /data is always full

  18. H Jayce — I am running Tytung’s latest ROM using the DataOnExt install. I have a LEO1024 with everything on my 64G microSDXC card, except System.

    Do you know the partition size limit of CWR and or MAGLDR? Considering I have a LEO1024, I would like to make the system partition as large as I can to cover any bad-blocks issue, additional apps placed in system/app, etc.

    I seem to be limited to around 450M (not recently attempted, so I do not recall if CWR or MAGLDR issued the size warning/limit).


    • Hi Mark, I don’t have LEO1024. Mine only 512 and limit to around 450MB for CWM partition. But yours should able to over that. Do confirm with others with LEO1024.

  19. Hi Jayce — Do you know which app is ultimately responsible for partition size limitations?

    I just re-did my HD2LEO, by wiping (Task29), and installed MAGLDR and TWRP, modifying the CWR DAF install to point to the TWRP image. DAF, either by itself or by direction from MAGLDR, reported that a partition was too large. The error message disappeared once I set System to 447M (448M+ resulted in the error).

    HD2 memory stats:
    512MB internal flash ROM (1024MB on T-Mobile US version)
    576 MB RAM (Software is limited to using 448 MB on non-US versions, and 128MB is reserved for 3D Accelerator)

    I have the TMO, and believe that I should be able to make use of that 1G flash ROM somehow… 🙁

  20. The guide, unfortunately does not completely answer my question.

    If I understand you correctly, CWM is returning that error message stating that the system partition I chose is too large. Does that go for TWRP and 4ext, as well?

    Is this a radio issue (I use where the one I am using does not support a larger ROM storage area?

    BTW, SD-Ext should be Ext4, not Ext3 (which you have mentioned). If MAGLDR/CWM does not provide for Ext4, create it via PC. If you notice, all recently released devices use Ext4, rather than Yaffs2 in the device itself, since it is superior.

  21. in ThinkPad tablet 1839 there is some bad sector in BCT partition, so Nvflash –create can not continue and give Error in formatting.
    How can I shift the BCT partition to make the start not from 0?.
    I put in Flash.cfg one partition before BCT but after creating it need to format the new partition how can I Skip this partition from Formatting?

    Kind Regards,

  22. I can’t find this anywhere in flash.cfg
    misc ya 1M
    recovery rrecov|ro|nospr filesize recovery-raw.img
    boot yboot|ro 5M
    system ya 250M
    cache ya 5M
    userdata ya|asize|hr allsize
    Can you tell me how to do this


Please enter your comment!
Please enter your name here