[Epic 4G Android Development] The_Legendary:
Before I even start I would like everyone if they haven't already to read this thread http://xdaforums.com/showthread.php?t=1387334 and watch this video on MTD courtesy of QBKing77

http://youtu.be/ds9rwAoI2IQ

I did this with Legendary RC2.2 rom and it worked flawlessly. I will not promise it will work for any other BML rom but I don't see why not.

I AM NOT RESPONSIBLE FOR ANY DAMAGE YOU DO TO YOUR PHONE NOR IS ANYONE ELSE BUT YOURSELF, YOU KNOW THE RISK.... SO WHAT?? WANNA FIGHT ABOUT IT?? :p

Also I would like to thank edfunkycold because it was his work that led me to make this guide. ALL CREDIT GOES TO HIM!!!!! HE IS ALSO NOT RESPONSIBLE FOR ANY DAMAGE!!!!!

REQUIREMENTS

-Micro USB cord

-Currently on a BML rom, if you are on a MTD rom you will have to Odin back

-CWM5 you must use this to make your nandroid back up. NO ACSRECOVERY

GETTING STARTED

Step 1:

Ok so when I did this I was on CM7 which is MTD. So I had to use Odin to flash back to BML. So if you are on MTD already your gonna have to do alittle bit to get back to BML because

you have to make a nandroid backup of the BML rom you want to convert.

If you are on the BML rom you want to convert currently then you can skip to step 2.

This will delete ALL your DATA, make sure you backup all your music, photos, videos, etc. And use Titanium Backup to backup all your apps and copy all this to your pc.

Follow these video guides to Odin back to the stock froyo rom. Once you are done and rooted with CM5 on the BML rom you want to convert you can go on to step 2.

Courtesy of QBKing77

First follow this video http://www.youtube.com/watch?v=MFazLOVXPns this will put to on stock froyo EC05

Then you will follow this if you can't OTA update to the EI22 modem http://www.youtube.com/watch?v=7H6k-WNcpcA

Then follow this because if you try and flash CWM it won't work till you do this http://www.youtube.com/watch?v=kwFRzzIqouE

And finally follow this and make sure you don't use the ACSrecovery in the video instead download the CM5.tar.md5 Odin flashable version in the Development section http://www.youtube.com/watch?v=jWOLEXqAeCc

Once you are done you can flash to whatever EI22 BML rom you want. The kernel does not matter so flash one don't flash one doesn't really matter. I flashed to Legendary RC2.2 because that is my favorite rom and it's what edfunkycold did also. Though this should work with any EI22 BML rom.

Step 2:

I like to make sure that everything is running smoothly on the BML rom before backing up. Boot into recovery and make sure your on the lastest version on CWM NOT ACSrecovery. Make a nandroid backup of your rom.

Step 3:

Now you will have to download and flash to a MTD rom, this converts you to MTD and you will not be able to go back to BML unless you follow step 1. I suggest CleanGB MTD rom by Toadlife becaue it's small and you only have to convert to MTD other then that the MTD rom you flash to is irrelevant. Wipe 3X and flash your MTD rom, your phone will reboot during the conversion to MTD. Once you are done Wipe 3X again.

Step 4:

Boot up your phone, you are now on MTD. Plug your Epic into your PC and browse your SD card. Go to the clockworkmod folder and open up your backup folder it will be named something like this "2011-12-31.08.33.43". You must rename the ext4 or rfs in the files cache.ext4.tar, system.ext4.tar and data.ext4.tar or rfs instead of ext4 depending on the rom you backed up to yaffs2. So they will look like this cache.yaffs2.tar, data.yaffs2.tar, and system.yaffs2.tar

(MAKE SURE YOU CHANGE ALL FILE NAMES ON THE COMPUTER, DON'T USE YOUR PHONE IT SEEMS TO CAUSE MD5 ERRORS WHEN RESTORING)

Then open the nandroid.md5 file in notepad. Press CTRL+H and it will open a little window. Under "find what" type ext4 and under "replace with" type yaffs2. Then click "replace all" If your not sure if your on ext4 or rfs just change ext4 to rfs and click "replace all" again. Then close out of this window and save the file. Thanks Flastnoles11 I think you said you did it this way in notepad :)

Step 5:

Once you have renamed the 3 files and changed all the ext4 or rfs's to yaffs2 in the nandroid.md5 file you can unplug and turn off your phone and boot into CWM5. Wipe 3X. Navigate to "backup and restore" then to "advanced restore". Choose your backup. Choose "restore system" and let that run. Then navigate back to "advanced restore" pick your backup and choose "restore data". Navigate back to advanced restore one last time and choose your backup and choose "restore cache". I do one final Wipe 3X and wipe data/factory reset because last time when I didn't I kept getting the download error in the market. But I just had to do the factory reset in the "Privacy" menu under settings on your Phone. Also Fix your permissions while you are in CWM.

Step 6:????

Step 7:Profit!!!!

Boot up your phone and you are now on whatever ROM you backed up with your setup if you had it setup before but you are on MTD. You can go to "about phone" and check your kernel version. It should be something or other MTD. But your build number is whatever your BML rom was. Wanna make sure your actually on MTD?? Well first off you didn't have to Odin back to it. Second you can go and download any TW.MTD Kernel and flash it. Please DON'T flash a CM.MTD kernel.

Here is a picture of my "about phone" showing that I am on Legendary RC2.2 but running the Shadow MTD kernel :p

So try this out if you want and post your findings and problems and whatever. Sharing is caring.

Happy Hacking!!!!! :p​