[Hero, G2 Touch Android Development] bharat_goku:
If you don't understand what this Modification is doing, why it needs to be done, or what possible benefits come from it, then...

PLEASE DO NOT TRY THIS MOD.

***Even tho it is impossible to brick your phone when flashing this i still highly recommend you UNDERSTAND what you are attempting to do before you do it. If someone explains you are freeing up internal memory from other places not using it and you still have to ask what the benefit is, then you obvisouly dont fully understand the mod and your phone and should turn away now.***

Thank You.

Now onto the mod: Heres a quick description of what this mod is doing. Pretend your phone is a pizza cut into 3 even pieces. Each piece is memory for /cache, /system, /data. Your anorexic sister "aka cache" doesn't eat a lot so most of her slice will always be left, your fat obese brother "/data" always eats his whole slice and is left wanting more. You are healthy "/system" and only eat what you need and never less never more.

What this mod is doing is taking that original pizza and RE-CUTTING the slices to better fit whose eating them, so since your anorexic sister barely eats and your obese brother is always hungry it takes all the extra pizza "aka memory" from your sister and gives it to your brother. As for you "aka /system" you only eat exactly what you need "aka the size of the rom and files it install" so it resizes your own slice to exactly the number it needs to install the rom and its gapps/files and leaves you with just a little wiggle room.

I recently tried the v1.5.8 on the gsm hero n it worked pretty well,before i used2have 170mb of internal memory with my decked for life now after applying this mod i have about 300 mb + which means i dont need a freaking ext4 partition for all my crap! xD

PLEASE USE CLOCKWORK RECOVERY IT WILL NOT WORK ON AMON-RA:

although in the cdma forums they used adb,i didnt feel like using it n didnt cause any issues :D

Original Files and Instructions: Firerats Original G1/MT3G thread found Here

Media fire link - Download!

(please note i've tried only the 1.5.8 version n it runs fine!)

After you read through firerats original instructions just know that itll be slightly different on your hero!

1. Click on the link i posted above and download these files: FR-recovery-v1.5.3-CustomMTD_S.zip and FR-boot-v1.5.3-CustomMTD_S.zip

2. Put both those files onto your SDCard.

3. While in your SDCard, make a .txt file named "mtdpartmap.txt"

4. Open your new mtdpartmap.txt file and

if ur using an aosp rom cm6 or cm7 type this into the txt

mtd 95 15

(The 95 here refers to /system size, and 15 to /cache partition size)

If you are using a larger Sense Rom then type

mtd 175 15

(This is just an approximation)

5. Once all 3 files are saved on the root of your SDCard, reboot your phone into recovery

6. Format/Wipe your system and cache.

7. Flash the file: FR-recovery-v1.5.X-CustomMTD_S.zip

8. Once the file is done flashing, it'll prompt you to wipe cache, system, and dalvik again.

after wiping cache system and dalvik reboot back into recovery

9.Flash CM7 or CM6 rom if you used 95 for /system or Flash your larger Sense Rom if you used 175 for /system

9.a.Optionally, flash any kernel you may be choosing to use.

10.Flash the file: FR-boot-v1.5.X-CustomMTD_S.zip

11.Click the top option on your recovery menu to reboot your system.

12.Once your system is fully booted you can go into menu > settings > sd card and internal storage , and check all the new added internal memory you have.

FYI : anytime you flash a new rom after this mod, or flash a new kernel to a currently flashed rom, you will ONLY NEED TO FLASH THE SECONDARY FIRERAT BOOT file named "FR-boot-v1.5.X-CustomMTD_S.zip".

so say after this mod you want to try a new kernel, you flash the kernel, flash boot, and reboot the system.

or say you want to flash a new cm7 nightly update, you flash the new rom/update, flash boot, reboot.

or say u want a new nightly and a new kernel, you flash the nightly, flash the kernel, flash the boot, reboot.

its very simple, if anything u flash overwrites current kernel specifications, u need to flash the boot file to make sure it knows how to set itself up. this goes for nandroid back ups as well.

A lil more help- i was using the decked rom so to actually check how much memory was consumed by /system i opened the terminal emulator typed in this

# su
# df -h

to show me memory consumption.

the command will tell you what % you are using on your system. if you are at 60% then you can go ahead and decrease your /system value in your mtdpartmap.txt to about 2mb over the value it says you are using. so if your rom uses 115mb of /system you can change your mtd to "mtd 117 2".

So if you are getting an error while trying to flash a rom after doing this modification you most likely don't have enough /system space and will want to up your value to something more then enough like "mtd 200 4" then run the above code and re-scale down back to 2mb over what the current rom is using.

Credits-

Foo_Blyat over at the cdma forums based on whose guide i could get this work on our hero and rewrite this guide

Firerat for even making this mode which is BRILLIANCE!!!!!

Proof?

heres a couple of my personal screen-shots after using the mod

notice the internal memory and tell me i'm ****ting u ppl :P

Enjoy :)