[GUIDE] Custom MTD Partitions for the Wildfire (Increase Internal Memory Size)

Search This thread

3xeno

Senior Member
Dec 6, 2010
3,570
1,416
Bangalore
Custom MTD Partitions for the Wildfire

WARNING - NOT recommended if you are using a Sense based ROM. Read Storage Requirements and Notes below.

06/10/2011 - Updated version (v1.5.8) available. Check this post by zexcrazy. The version attached to this post works fine as well.

Disclaimer - This procedure is given here in a "as-is" format. I have personally verified it and have it running, but, the ultimate responsibility of performing this lies on you. I will not be responsible for dead / bricked devices or any such similar unfortunate situations.


This process has been tested by me using:
- Cyanogenmod 7 Nightlies
- Clockworkmod 3.2.0.0 j_r0dd's Mod
- Clockworkmod 5.0.2.0

I do NOT claim ANY credit for this. The credits all goes to the original creators of the scripts, and daedelus82 and HebrewToYou for their original how-to guides on their respective device fora. I am just recreating the thread(s) here in the Wildfire Section, (The only difference is I am attempting to make it as simple as possible) because there isn't one.

What does this do?
As you must know, the Wildfire ships with a 512MB ROM Image. Of this, 250MB is reserved for the /system partition (This is where your ROM is installed to), 183MB for the /data partition (This is your actual 'internal' memory for apps), and 40MB for the cache.

Now, since no ROM for the Wildfire will ever get close to the 250MB limit of the /system partition, it is possible to 're-allocate' this extra space to the /data partition. If you want even more space, you can take around 20-25MB (Upto 35MB) from the /cache partition as well, implying you now have ~300MB on the /data partition for installing apps.

Advantages:

  • Utilizes your internal memory better
  • Removes the needs for Apps2SD Scripts
  • Gives you a potentially smoother and stabler device (Apps will always be more "stable" when in the internal memory then when on EXT)

Pre-Requisites:
  • S-OFF using AlphaRev X / Revolutionary
  • Clockworkmod Recovery (Preferably a version in which you know Nandroid Restore works without issues)

The Actual Process:

Step 1
  • First, make sure that you have backed up your entire SD Card somewhere else, like your PC. Also make sure your apps are backed up with an app like Titanium Backup (Just for insurance)
  • Now, Reboot to Clockworkmod Recovery (NOTE - Do not use ROM Manager to boot into Clockworkmod Recovery. Use HBoot)
  • Create a Nandroid Backup
  • Place the 2 attached files on your SD Card.
  • Create a new text file on your SD Card called mtdpartmap.txt (UPDATE - File Attached. Simply edit the values as per your needs) (This includes the file extension, so make sure you are not naming it as mtdpartmap.txt.txt, else, it will obviously not work)
  • In this file, type mtd followed by be 2 numbers. The first number will be the size of your /system partition, and the second number will be the size of your /cache partition.
  • Example: mtd 150 25 (Here, 150MB will be the size of the /system partition and 25 will be the size of the /cache partition)
  • There should NOT be anything else apart from the mtd text and 2 numbers in this Text file. Also, make sure that this is not placed in any folder or sub-folder.
Step 2
  • Once this text file is created successfully, you WILL have to format your entire device. So, perform the following one-by-one
  • Go to "Mounts and Storage" in Clockworkmod Recovery
  • Here, select format /cache
  • Then select format /data
  • Lastly, select format /system
  • Then, perform a Wipe Data / Factory Reset in Clockworkmod Recovery. (Not essential, but I performed it anyway)
  • Then, flash the attached file bravo-recovery-v1.5.3-CustomMTD.zip
  • Once this is done, do NOT reboot. Go to Advanced Again and select Reboot Recovery
  • Once Clockworkmod Recovery Reboots, Restore your previously taken nandroid backup
  • Once restoring is done, without restarting, flash the attached file bravo-boot-v1.5.3-CustomMTD.zip
  • Done, then you can Reboot your Wildfire.
  • The reboot will take longer than normal, it is normal
You should then see your new custom partition sizes. The command to check the partition (Before/After/Anytime) sizes in Terminal Emulator is busybox df -h. (After typing su, and also, you must have Busybox installed)

Reverting back to Stock

- Formatting all the 3 partitions. (i.e. /cache, /data, and /system)
- You will then need to flash a "Stock" Clockworkmod Recovery Image. Links (and procedure to flash) available in the Index Thread

To end, here's a screenshot:
t3iUU.png
JzU7D.png



NOTE

  • When you flash a new ROM/Restore a Nandroid Backup, you WILL lose the new settings ("partially"). To overcome this, after flashing your new ROM, flash the bravo-boot-v1.5.3-CustomMTD.zip attachment immediately after flashing the ROM/Restoring the backup before restarting your device. This will again give you the new partitions. If you fail to do this step, you will be stuck on the White HTC Screen.
  • The standard Apps2SD Feature included in Android (Froyo and above) is unaffected. You can still move your apps to the SD Provided the app supports it. (Or use CM7's In-built App Moving Feature)
  • You can very well use this in conjunction with Apps2SD Scripts like DT, should your need be.

==================================================


Storage Requirements for various ROMs (/system Partition)

1: CyanogenMod 7 (And most probably it's derivatives/"based" ROMs)
- 145MB (Keeping a 10MB buffer, includes GApps)
- 10MB Cache (CM7 includes a script that automatically moves downloads (market, browser etc) to the /data partition if it is larger than the cache size)

2: Sense Based ROM's
- Sorry Guys, it seems Sense ROM's need ~210-225 MB, making this guide pretty much pointless. You can take the 40MB, but that will not make a substantial difference. Your best bet in such cases is to stick with A2SD Scripts like DarkTremor.

To build this list, please post the space needed by the ROM you use. There's 2 ways:
- Check the Graph of the "System ROM" memory usage in Titanium Backup (As you can see in the screenshot above)
- Use the busybox df -h command in Terminal Emulator (after typing su). This will list ALL partitions and you will have to hunt a bit.
 

Attachments

  • mtdpartmap.txt
    10 bytes · Views: 10,977
  • bravo-boot-v1.5.3-CustomMTD.zip
    252.4 KB · Views: 5,977
  • bravo-recovery-v1.5.3-CustomMTD.zip
    252.5 KB · Views: 5,581
Last edited:
B

bx19

Guest
Good work testing this on wildfire.

Sent from my Blade using XDA App
 

pyroblazer

Senior Member
Oct 13, 2010
450
13
Ahmedabad
ok.. quick question
how do i know if i can substitute this for a2sd script... i mean i have around 400mb used of my 1gb ext... so will i be able to 'fit in' all my apps after this procedure??
 
  • Like
Reactions: Hydro333D

3xeno

Senior Member
Dec 6, 2010
3,570
1,416
Bangalore
ok.. quick question
how do i know if i can substitute this for a2sd script... i mean i have around 400mb used of my 1gb ext... so will i be able to 'fit in' all my apps after this procedure??

You can perform the check command (busybox df -h) and verify for yourself how much space is free in /system and /cache, and substitute that in the /data partition for apps.

But, since you have over 400MB of your EXT in use, its unlikely you can switch to this without leaving out Apps2SD (Atleast the inbuilt Froyo Apps2SD) entirely. The least values I would suggest are 150MB for /system and 10MB for /cache, thus leaving our 310MB for /data.
 
  • Like
Reactions: ka9090

pyroblazer

Senior Member
Oct 13, 2010
450
13
Ahmedabad
You can perform the check command (busybox df -h) and verify for yourself how much space is free in /system and /cache, and substitute that in the /data partition for apps.

But, since you have over 400MB of your EXT in use, its unlikely you can switch to this without leaving out Apps2SD (Atleast the inbuilt Froyo Apps2SD) entirely. The least values I would suggest are 150MB for /system and 10MB for /cache, thus leaving our 310MB for /data.

thnx mate... i was only talking bout a2sd not the inbuilt apps 2 sd... cool thnx... will check it out and let u know...

another question... if i dont move my cache to sd ext... as in wildpuzzle 0.8... i would get around 100-102 mb free internal.... now is this equivalent to not having a2sd atall?? and would there be a considerable change in performance if i keep the cache on phone??
 
Last edited:
  • Like
Reactions: deface01

3xeno

Senior Member
Dec 6, 2010
3,570
1,416
Bangalore
thnx mate... i was only talking bout a2sd not the inbuilt apps 2 sd... cool thnx... will check it out and let u know...

another question... if i dont move my cache to sd ext... as in wildpuzzle 0.8... i would get around 100-102 mb free internal.... now is this equivalent to not having a2sd atall?? and would there be a considerable change in performance if i keep the cache on phone??

Frankly, I will not be able to answer that, since I have completely uninstalled DTApps2SD (Along with my EXT Partition) and now solely rely on Android's (And Cyanogenmod's) built-in Apps2SD. This is something you will have to experiment yourself, and arrive at your own conclusion.

For me, when I was using DTApps2SD, I did find that keeping the cache on the phone was indeed better. Else, it led to instability, random SD Card errors etc. I got so peeved with it (And I was pretty new then to this entire thing), that since then, I have always kept the Dalvik Cache on the internal memory itself.
 

Alex_GP

Senior Member
May 15, 2009
601
91
This is really nice.
Great tutorial, easy to follow!


Too bad i`m too lazy to s-off my Wildfire .
 

3xeno

Senior Member
Dec 6, 2010
3,570
1,416
Bangalore
Too bad i`m too lazy to s-off my Wildfire .

Initially, I hadn't thought there would be a big deal in S-OFFing my Wildfire (Apart from bragging rights, to the admittedly very few that cared), but, Fastboot is a real life saver in certain situations, and additional stuff like this thread only strengthens the stand of getting S-OFF, rather than not.

I hope you do get over your laziness one day though. :p
 
  • Like
Reactions: ka9090

Alex_GP

Senior Member
May 15, 2009
601
91
I hope you do get over your laziness one day though. :p

Yeah, I think I`ll s-off my little gem in a couple of weeks, I really need my (smart)phone now...

This will be the first mod I`ll install:)

/off-topic

on-topic:

Any side-effects? Are 150 MB enough for, let`s say, the SFM Sense Rom ?
 

3xeno

Senior Member
Dec 6, 2010
3,570
1,416
Bangalore
Any side-effects? Are 150 MB enough for, let`s say, the SFM Sense Rom ?

I don't think so TBH, but, it will really help if someone using the ROM (Or any Sense ROM for that matter) can actually confirm the amount used in the /system partition before using this mod so I can update the OP accordingly with the storage requirements of the various ROMs. I would think one will have to keep ~180-190MB for Sense ROMs. But, as stated, it has to be confirmed.

To anyone wanting to state this, there's 2 ways:
- Check the Graph of the "System ROM" memory usage in Titanium Backup
- Use the busybox df -h command in Terminal Emulator (after typing su). This will list ALL partitions and you will have to hunt a bit.

As for side effects, I have not experienced any yet. :)
 
Last edited:
  • Like
Reactions: zulhemmah
B

bx19

Guest
Cannot remember it correctly since I sold my wildfire.

When I used the stock froyo ROM on my wildfire, out of the 250 MB allotted for /system partition I can see only around 25 - 30 MB free. So I think for sense ROMs the /system partition needs to be more or less unchanged. Still maybe we can add an overall 20-40 MB from /system and /cache to /data. But this would be really great for AOSP ROMS especially for cm7 (since cm7 occupies the least system partition).

Sent from my Blade using XDA App
 

JoeyDelp

Senior Member
Jun 19, 2010
168
44
29
Stellenbosch
Does not work :(

followed the guide to the letter, did a backup then it when restored, it hung for like 50mins till i forcebly made it shut down, then tried procedure again this time installing a fresh cm7, still no change noted (this was all dones using cwm 2.5) now i tried using 4.0.1.4 still with no results. Anybody gots any ideas they would like to share, and yes phone is S-OFF
 

JoeyDelp

Senior Member
Jun 19, 2010
168
44
29
Stellenbosch
Well fixed, thought let me wait and see if you nice folk could help, so was fixing up my new installation to be the way i want it to be (hint: fast :)) so remembered i still had to install gapps so was in recovery and thought hey let me install the bravo boot one, installed it fine, said custom mtdpart written so was like yay and it worked. key was installed the boot one after the rom had been installed instead of what the instructions said about before restore/install
 

darkstep

Senior Member
Dec 4, 2010
234
61
working fine ;]. but to format only /system /data /cache you need to go in mounts and storage,after the process you can do advance restore for /system /data /cache , to save time
 
  • Like
Reactions: nirik

Scratch0805

Senior Member
Jun 18, 2011
2,148
1,313
Sheffield
Not quite sure if this is what you're looking for, or do you need a pic from a fresh install? I'm running dk custom rom, dta2sd. Think I might switch back to cm again now, do a fresh install with this.

uploadfromtaptalk1314349959639.jpg


Sent from my HTC Wildfire using xda premium
 

fifarunnerr

Senior Member
Sep 7, 2010
228
69
Ok, I'm doing some backups, after that I'll try it.

But there's something I don't understand. If you switch to another rom and do a factory reset, you told the partitions will be back to stock(250-40). But to restore the old partitions, you need to reflash CWM. Isn't it possible to wipe everything and reflash your old ROM?
 

3xeno

Senior Member
Dec 6, 2010
3,570
1,416
Bangalore
Well fixed, thought let me wait and see if you nice folk could help, so was fixing up my new installation to be the way i want it to be (hint: fast :)) so remembered i still had to install gapps so was in recovery and thought hey let me install the bravo boot one, installed it fine, said custom mtdpart written so was like yay and it worked. key was installed the boot one after the rom had been installed instead of what the instructions said about before restore/install

Please read it again. boot file should be flashed after you flash your ROM. The instructions state precisely this

Code:
[LIST]
[*]  Once Clockworkmod Recovery Reboots, Restore your previously taken nandroid backup
[*]  Once restoring is done, without restarting, flash the attached file bravo-[B]boot[/B]-v1.5.3-CustomMTD.zip
[/LIST]


working fine ;]. but to format only /system /data /cache you need to go in mounts and storage,after the process you can do advance restore for /system /data /cache , to save time

True, that will work as well. But, Advanced Restore is something I have not tried, so, I put the complete restore in the procedure. ;)

Not quite sure if this is what you're looking for, or do you need a pic from a fresh install? I'm running dk custom rom, dta2sd. Think I might switch back to cm again now, do a fresh install with this.

View attachment 700931


Sent from my HTC Wildfire using xda premium

It seems what bharat said is correct. Sense ROM's seem to use a lot of the /system partition, making this guide effectively pointless. :( Still, it cant be helped though.

Ok, I'm doing some backups, after that I'll try it.

But there's something I don't understand. If you switch to another rom and do a factory reset, you told the partitions will be back to stock(250-40). But to restore the old partitions, you need to reflash CWM. Isn't it possible to wipe everything and reflash your old ROM?

I don't know about the technicalities, but, the anomaly similar to radio flashing after a fresh install of CM7. The new partitions script is present, but, is somehow de-activated after performing a factory reset. Reflashing Clockworkmod will remove the script completely, not "partially" as is with a Factory Reset.

This is why just flashing the "boot" attachment works here. No need to flash the "Recovery" attachment.
 
  • Like
Reactions: fifarunnerr

bpye

Retired Recognized Developer
Oct 8, 2010
476
234
Nicely done, I haven't been that involved in the android scene recently but I am impressed, good work. BTW, my config for cm7 is 150 system 40 cache.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 82
    Custom MTD Partitions for the Wildfire

    WARNING - NOT recommended if you are using a Sense based ROM. Read Storage Requirements and Notes below.

    06/10/2011 - Updated version (v1.5.8) available. Check this post by zexcrazy. The version attached to this post works fine as well.

    Disclaimer - This procedure is given here in a "as-is" format. I have personally verified it and have it running, but, the ultimate responsibility of performing this lies on you. I will not be responsible for dead / bricked devices or any such similar unfortunate situations.


    This process has been tested by me using:
    - Cyanogenmod 7 Nightlies
    - Clockworkmod 3.2.0.0 j_r0dd's Mod
    - Clockworkmod 5.0.2.0

    I do NOT claim ANY credit for this. The credits all goes to the original creators of the scripts, and daedelus82 and HebrewToYou for their original how-to guides on their respective device fora. I am just recreating the thread(s) here in the Wildfire Section, (The only difference is I am attempting to make it as simple as possible) because there isn't one.

    What does this do?
    As you must know, the Wildfire ships with a 512MB ROM Image. Of this, 250MB is reserved for the /system partition (This is where your ROM is installed to), 183MB for the /data partition (This is your actual 'internal' memory for apps), and 40MB for the cache.

    Now, since no ROM for the Wildfire will ever get close to the 250MB limit of the /system partition, it is possible to 're-allocate' this extra space to the /data partition. If you want even more space, you can take around 20-25MB (Upto 35MB) from the /cache partition as well, implying you now have ~300MB on the /data partition for installing apps.

    Advantages:

    • Utilizes your internal memory better
    • Removes the needs for Apps2SD Scripts
    • Gives you a potentially smoother and stabler device (Apps will always be more "stable" when in the internal memory then when on EXT)

    Pre-Requisites:
    • S-OFF using AlphaRev X / Revolutionary
    • Clockworkmod Recovery (Preferably a version in which you know Nandroid Restore works without issues)

    The Actual Process:

    Step 1
    • First, make sure that you have backed up your entire SD Card somewhere else, like your PC. Also make sure your apps are backed up with an app like Titanium Backup (Just for insurance)
    • Now, Reboot to Clockworkmod Recovery (NOTE - Do not use ROM Manager to boot into Clockworkmod Recovery. Use HBoot)
    • Create a Nandroid Backup
    • Place the 2 attached files on your SD Card.
    • Create a new text file on your SD Card called mtdpartmap.txt (UPDATE - File Attached. Simply edit the values as per your needs) (This includes the file extension, so make sure you are not naming it as mtdpartmap.txt.txt, else, it will obviously not work)
    • In this file, type mtd followed by be 2 numbers. The first number will be the size of your /system partition, and the second number will be the size of your /cache partition.
    • Example: mtd 150 25 (Here, 150MB will be the size of the /system partition and 25 will be the size of the /cache partition)
    • There should NOT be anything else apart from the mtd text and 2 numbers in this Text file. Also, make sure that this is not placed in any folder or sub-folder.
    Step 2
    • Once this text file is created successfully, you WILL have to format your entire device. So, perform the following one-by-one
    • Go to "Mounts and Storage" in Clockworkmod Recovery
    • Here, select format /cache
    • Then select format /data
    • Lastly, select format /system
    • Then, perform a Wipe Data / Factory Reset in Clockworkmod Recovery. (Not essential, but I performed it anyway)
    • Then, flash the attached file bravo-recovery-v1.5.3-CustomMTD.zip
    • Once this is done, do NOT reboot. Go to Advanced Again and select Reboot Recovery
    • Once Clockworkmod Recovery Reboots, Restore your previously taken nandroid backup
    • Once restoring is done, without restarting, flash the attached file bravo-boot-v1.5.3-CustomMTD.zip
    • Done, then you can Reboot your Wildfire.
    • The reboot will take longer than normal, it is normal
    You should then see your new custom partition sizes. The command to check the partition (Before/After/Anytime) sizes in Terminal Emulator is busybox df -h. (After typing su, and also, you must have Busybox installed)

    Reverting back to Stock

    - Formatting all the 3 partitions. (i.e. /cache, /data, and /system)
    - You will then need to flash a "Stock" Clockworkmod Recovery Image. Links (and procedure to flash) available in the Index Thread

    To end, here's a screenshot:
    t3iUU.png
    JzU7D.png



    NOTE

    • When you flash a new ROM/Restore a Nandroid Backup, you WILL lose the new settings ("partially"). To overcome this, after flashing your new ROM, flash the bravo-boot-v1.5.3-CustomMTD.zip attachment immediately after flashing the ROM/Restoring the backup before restarting your device. This will again give you the new partitions. If you fail to do this step, you will be stuck on the White HTC Screen.
    • The standard Apps2SD Feature included in Android (Froyo and above) is unaffected. You can still move your apps to the SD Provided the app supports it. (Or use CM7's In-built App Moving Feature)
    • You can very well use this in conjunction with Apps2SD Scripts like DT, should your need be.

    ==================================================


    Storage Requirements for various ROMs (/system Partition)

    1: CyanogenMod 7 (And most probably it's derivatives/"based" ROMs)
    - 145MB (Keeping a 10MB buffer, includes GApps)
    - 10MB Cache (CM7 includes a script that automatically moves downloads (market, browser etc) to the /data partition if it is larger than the cache size)

    2: Sense Based ROM's
    - Sorry Guys, it seems Sense ROM's need ~210-225 MB, making this guide pretty much pointless. You can take the 40MB, but that will not make a substantial difference. Your best bet in such cases is to stick with A2SD Scripts like DarkTremor.

    To build this list, please post the space needed by the ROM you use. There's 2 ways:
    - Check the Graph of the "System ROM" memory usage in Titanium Backup (As you can see in the screenshot above)
    - Use the busybox df -h command in Terminal Emulator (after typing su). This will list ALL partitions and you will have to hunt a bit.
    8
    Im using 5mb /cache just fine. I just delete file 06BindCache from init.d which is created after flashing.
    Although im not using these scripts im using version 1.5.8

    boot: http://db.tt/KQRdLTce
    recovery: http://db.tt/rE99ivOy

    Sent from my HTC Wildfire using xda premium
    3
    yesterday i have tried custom mtd partition..!!but still the internal storage was 265 only..then i revert back to stock....formatted \cache, \data and \system...and then restore my nandroid backup...but from then my phone is stuck on white htc screen....i keep it whole night but still it is white screen only...

    then today in the morning i flashed cwm 4.0.1.4 and then tried to restore my nandroid then again it is stucked at white htc screen and its more than 4 hours...


    now plz tell me what to do??

    plz help me anyone..!! i thnik my phone is bricked:crying:..!!!
    Really, if you don't want to or can't read or don't understand what you're doing - why do you try out things? Do you like Russian Roulette also? :confused:

    Looking into your posts it turns out that you might have problems to understand even any basics. But instead of trying to learn, to understand how things work, you seem to try out all the stuff you stumble against - just to mess up any- or everything in the end. Then you come back with your problem, not letting us know what exactly your problem is. Furthermore you seem to not to respond to any questions of other members to understand your problem. Instead you open new threads for the same problem in another section of the forum - you mess up your phone, you mess up the forum, you're not willing to learn, you ignore questions and suggestions. You shouldn't be too surprised if nobody is willing to help you anymore.

    If you're not able to understand anything you're doing with your phone you should stay away from that. You'd probably feel better and it would free up the time of all the voluntary forum members for helping people who are a bit more thankful and value the help they get in here (and accept the fact, that this is not a user help desk but a place where you can kindly ask for help but shouldn't expect to get help for every problem - or poop or missing socks...)

    Regarding your problem - a perfect example for things mentioned above: If the custom mtd partitions didn't work for you could you please tell us, how it came to your mind to revert to stock - why did you do that? Just for fun? Because you thought you should give us yet another challenge?

    Regarding a solution for your problem: it's all in the forums here - just use the search. I'm not willing to do it for you (anymore) - besides giving you a last hint: if you still can boot into recovery your phone is not bricked (although I'm not sure if that wasn't just better for you and us).

    Have a nice weekend - good luck!
    3
    Anyone seen my sock?:p
    3
    hey eventcom...dont try to be over smart..u r nothing..!! i hv not askd for ur help...jst get lost if u dont wnna help me....!!

    and dont you get it twisted! you HAVE asked for his help,alongside asking the whole wildfire community for help,because thats how it works here....you ask 1 your adking us all and in your case its asking 1 too many times. now everything has been explained to you numerous times and cant be explained to you any simpler. so just stop and think to yourself that maybe its not us providing corrupt guides etc but in fact that it must be something YOU and YOU alone are missing.

    Damn now im getting pissed because youve made me post again where i said i wouldnt. :mad::mad: lol

    sent mysteriously via OTA