[Wildfire Android Development] 3xeno:
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:

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.