1. Switch off the phone
  2. With the phone switched off, hold down the “home” (house) and “back” (the arrow in the lower right corner) buttons
  3. Hit briefly the “end call” button while still holding the “home” and “back” buttons.
  4. Release the “home” and “back” button, a white screen containing technical information should appear, with a red message asking for hitting the “menu” button.
  5. Hit the “menu button”, the Hero will now boot with factory settings.

(originally posted by Oskyldig on a Google forum)