(EDIT: If you haven't rooted the phone, please skip to my next post!)
My instructions use CWM recovery, so as backwards as it may sound, you will want to
flash CWM recovery if you still have stock.
If you need to install CWMR,
do this to enter download mode:
1. Make sure you aren't plugged in so that the phone doesn't go idle to charge.
2. Do a battery pull.
3. Hold down Vol Down + Power as you are inserting the battery, and keep holding them down for about 10 seconds afterwards.
4. If you don't hear the phone start, you've succeeded.
5. Press Vol Up. Heimdall should be able to detect the phone now and flash to it.
You will also need a full stock zip for your phone's version (for FF1, I used the stock zip
here (make sure to get the odexed, unrooted one). I don't know where to find a full EI2 zip

). When you have it, put it on the root of the SD Card (I hope you have a MicroSD adapter)
and name it "update.zip". The name
does matter.
____________
Once you have CWMR flashed and update.zip on the SD card, you are ready to factory reset your phone.
First, enter recovery mode:
1. Make sure you aren't plugged in so that the phone doesn't go idle and charge.
2. Pull the battery.
3. About 1 second after putting the battery in, hold Vol Down + Vol Up + Power for about 6 seconds and then let go.
4. Wait 30 seconds.
If you hear the phone start up, try again.
5. Press Vol Down ONCE.
Don't touch the onscreen softkeys.
6. Wait 30 seconds.
If you hear the phone start up, you were in download mode. Try again.
7. Press Vol Up ONCE to go back to the top of the menu.
From this point on, you will use the hardware keyboard ONLY. Using the volume buttons can potentially toggle a display option that can mess you up.
Now then.
To factory reset:
(*) Down x2, Enter
(wipe data/factory reset)
(*) Down x7, Enter
(confirm)
The length of time this will take depends on how much data you have. My fairly fresh phone took 45s, but I'd say wait 3 minutes to be safe.
After this,
to unroot:
(*) Down x4, Enter,
(Install zip from sdcard)
(*) Down, Enter,
(apply /sdcard/update.zip)
(*) Down x7, Enter
(confirm)
Updating takes... 2 minutes? I'd wait longer to be sure.
(*) Hit the SEARCH key (upper right) to return to the top menu.
Then,
reboot.
(*) Just hit Enter.
Then listen for the phone starting up. Assuming you do hear it, then after 2 minutes or so (the first boot takes forever), try hitting the Volume Up key. The keyboard should light up. If it does, you've succeeded. Most probably.