Hard reset can be done in 3 ways:
Source : http://varunverma.org/tech/android/hard-reset-your-samsung-galaxy-5/#more-386
- Go to Settings –> Privacy –> Factory data reset. This method is valid for all the mobile phones. However, many users have experienced problems in resetting the phone using this method. Also, please note that this method only does a factory reset.
- Hard reset using a hack code: *2767*3855# — Dial this code on your phone. Please note: DO NOT TRY THIS for testing purpose unless you are sure what you want to do. This code does not ask for a confirmation.
- Factory reset using: *#*#7780#*#* — Dial this code on your phone. This will ask you for a confirmation before resetting.
Source : http://varunverma.org/tech/android/hard-reset-your-samsung-galaxy-5/#more-386