[Hero CDMA Android Development] goliath714:
This thread serves as a guide to install both firerats and data2ext mods on a single rom and have them work simultaneously.

I do not take any credit for the creation of any files mentioned or attached, nor methods for the installation of each individual mod, nor roms, gapps, or otherwise mentioned content. All credit goes to those who created each mod, rom, gapps, and the methods for installing each individually. I only claim responsibility for my own research and the order and hierarchy of steps below that combine these incredible feats of development into a working system of internal storage expansion and space management.

Even though it is impossible to brick your phone using the guide below, I am not responsible if you break your device, because you have willfully chosen on your own to void your warranty by rooting your phone and installing the mods mentioned below.​

To make firerats work with data2ext simultaneously, follow these over-detailed instructions EXACTLY. This is written so that anyone who has never held a smartphone in their lives can understand and do this right the first time, so those of you that know what you're doing, sorry about the length, but it should be pretty easy for you.

Note: I've uploaded some pertinent files from the following steps and added all links to all files needed so you don't have to go find them yourself. I did not include any roms, gapps, or the freespace app from the Play Store(just download from your phone, or from the link in step 6d). Links for all necessary files are in their respective steps below. The only links to a rom or gapps are for ICS. Otherwise you'll have to find and use your own downloaded roms and the correct gapps for your rom. If you would rather use the links below to download the files instead of using the ones I provided, be my guest. :)

I've updated this guide to make installation much easier and work with Sense roms!​

Now on to the good stuff!!

Steps 1 through 7a are written for you to collect the files necessary, and to prepare your phone, sd card, and recovery for the correct method of installation of the collected files.

Steps 8 through 10 are to install the mods.

Preparation

1. Be sure to start from scratch!!! This means an UNPARTITIONED, FULLY WIPED sd card, fully wiped and rooted phone, and fully wiped recovery. Fresh file downloads for roms, gapps, and other mods you like wouldn't hurt either. :) If your phone is not rooted, go here, it's the best and easiest root method I've found.

1a. If you already have a partitioned sd card, insert it into your computer via a microsd adapter or other means(you cannot use your phone for this; it will not recognize that it's partitioned), delete the partitions and wipe the card using partition management software on your computer. I recommend EASEUS Partition Manager 9.1.1 Home Edition(Windows users only). If you use this program, after you delete partitions on your sd card, you will be left with unallocated space. Create a partition that takes up the entire unallocated space and set it as a Primary and FAT32 file system(remember, only do this to your sd card, NOT THE C: DRIVE!!!!).

2. Boot to recovery(hold down home, press and release power, then release home once recovery shows up)

2a. Be sure you have a recovery that supports flashing unsigned .zip files. If your recovery does not support flashing unsigned .zip files, flash a rom and then the corresponding gapps that are signed(cyanogenmod roms and gapps are the easiest way to go), boot into rom, sign in, download rom manager from Market/Play Store, open rom manager, flash clockworkmod recovery, and boot to recovery.

3. Make sure you are using latest 5.5.0.4 recovery, found here.

3a. If you are not already using the 5.5.0.4, flash the 5.5.0.4.zip in your current recovery(or follow the instructions from step 2a if you cannot flash unsigned .zip files) and reboot back into recovery.

4. In your new recovery, make sure you wipe everything, and go to advanced>partition SD card. Choose whatever size you want to have as internal storage(the 'M' means Megabyte, if you didn't already know...). I use 1024M or 2048M(i.e. 1Gb or 2Gb), depending on what mood I'm in, but it works with any of them. Then choose 0M swap size and wait for it to process.

5. Wipe everything once again(just to be safe), including sd-ext, and place your rom and preferred gapps on sd card, along with any other flashable modifications you like to use(I use the sd card speed boost, which can be found here. 2048Kb works best for my card, a 16Gb Class 4).

Note: For ICS users only! I use official, larger ICS gapps, found here(download the one next to 4.0.X, the link will be: '20120429'). The smaller gapps, as well as the current best ICS rom, can be found in whoshotjr2006's thread, here.

6. Make sure you have the latest firerats(1.5.8), which can be found here.

6a. Don't use any of the alphas or betas. Just 1.5.8. Download only the recovery-v1.5.8-CustomMTD_S.zip and boot-v1.5.8-CustomMTD_S.zip and place on sd card. Create a .txt file named 'mtdpartmap' and type 'mtd XXX XX'. These X's represent the size in numbers that you want your /system and /cache partition sizes to be, and therefore will not actually be used. See step 6b or 6c, depending on what rom you'll be using, for information on how to determine the correct partition sizes/numbers to use. DON'T KEEP THE X's IN THE FILE! REPLACE THEM WITH THE NUMBERS YOU WILL USE AFTER YOU DETERMINE WHAT YOUR /SYSTEM AND /CACHE SIZES SHOULD BE!

6b. For ICS users: If you are using the official, larger gapps, type 'mtd 190 60' into the text file and save to sd card. If you are using smaller gapps, type 'mtd 190 30'. Proceed to step 7.

6c. For Non-ICS users: To find out what numbers to replace the X's with in your mtdpartmap.txt, first wipe everything and install only the rom and gapps you'll be using this mod with. Then boot into rom, sign in, and follow step 6d. After you do this, however, you will need to repeat steps 5 and 6a, then proceed to step 7.

6d. You can download 'freespace' from the Play Store, which needs root access, and will show you the total size and space remaining for each of the /system, /data, /cache, /sdcard, and /ext partitions, so you can change the numbers in your mtdpartmap file to what you want the /system and /cache to be that best suits the rom you want to flash. The first number after 'mtd' is for the /system partition, the second number is for /cache. You can't change the /data, because it is dependent on what you set the system and cache sizes to, and will be set to what you partitioned the sd card to anyways. Also, keep at least a 5Mb allowance over what you need for both /system and /cache partitions as you will run into force closing problems if there is no breathing room, especially for the /cache partition.

7. The data2ext thread and .zip file can be found here.

7a. Download the unCoRrUpTeD_data2extV2.2.zip at the bottom of the post and place on sd card. DO NOT FLASH!!!

Summary of what should be accomplished after following steps 1 through 7a: You should now be using CWM Recovery 5.5.0.4, have a partitioned sd card, wiped everything, and placed the boot-v1.5.8-CustomMTD_S.zip, recovery-v1.5.8-CustomMTD_S.zip, unCoRrUpTeD_data2extV2.2.zip, mtdpartmap.txt, the rom and correct gapps, as well as any other mods you want to use onto your sd card. If all of this is true, move to step 8. If not, go back and find what you missed.

The Installation Process

8. Flash recovery-v1.5.8-CustomMTD_S.zip, then under mounts and storage, wipe /system, /cache, and /data in that order.

8a. Reboot to recovery(go to advanced>reboot recovery).

9. Flash rom, gapps, and whatever other mods you have or like, then flash boot-v1.5.8-CustomMTD_S.zip, then unCoRrUpTeD_data2extV2.2.zip, and reboot.

Note: the firerats installation thread for the HeroCDMA says to flash boot-v1.5.8-CustomMTD_S.zip after anything that changes the kernel specifications, but the unCoRrUpTeD_data2extV2.2.zip does not change these. The thread also says that adb is necessary to reboot; it's not. After wiping /system, /cache, and /data, just go to advanced>reboot recovery. It will work just fine, I promise. Newer recoveries don't need to use adb for this step.

10. Reboot immediately after signing in for data2ext to take effect.

That's it! You're all done! Set up your phone the way you want and start installing apps!

Summary of steps 1 through 10: By now, you should be using 5.5.0.4 recovery, have a partitioned sd card, have placed all necessary files, your rom, gapps, and other mods onto your sd card, flashed the correct files in the correct order and rebooted, signed in, and rebooted after signing in. You should now be looking at the home screen(or lockscreen) of your rom, and if you check storage from settings, you should see internal storage showing the size you partitioned the sd card to be in step 4.

Hopefully this wasn't too confusing...good luck!

If you have any questions, don't hesitate to post in this thread!