Here is my source and hopefully this helps. Make sure to download any available updates for your phone after the factory reset.
''This are the step by step procedures on how to factory reset or hard reset the Samsung Galaxy S II, to return the phone to its original factory fresh default settings.
This may help and only advisable if experiencing frozen or hang up problems when using or opening some applications you previously installed on it.
Take note this will delete all data from the Samsung l9100 Galaxy S II as a result of this procedure. This process may or may not delete the data stored on the microSD memory card. Ensure to make a back up a copy of all important data before proceeding.
First do try to factory data reset the phone through the main menu settings.
1. On the main home screen, just select MENU
2. Select SETTINGS, then select PRIVACY
3. Select FACTORY DATA RESET
4. Select RESET PHONE
5. If the password is required,enter it. Then confirm by selecting ERASE EVERYTHING
IF the phone is hang up or frozen, Try to turn it off first and do a hard reset through key combinations.
1. If your Samsung Galaxy S II is frozen, Shut the POWER OFF, take the battery out and put it back again.
2. Hold the Volume Down button
3. Briefly Press and release the Power button
4. A menu will then appears that let you allows for Fastbook, Recovery, Clear Storage, and Simlock
5. Select Clear Storage by pressing the Volume Down button
6. Quickly Press and release the Power button
7. Select Volume Up for YES and Volume Down for NO
If the above procedures doesn't work. try this another method:
1. Turn the POWER OFF, pull the battery out and put it back again.
2. Simultaneously press the Volume Up, Home and Power button
3. If the Samsung Symbol appears, release the Power button
4. A Boot Menu will then show, Use the volume up/down to choose and home to select.
Wait 'till the process completes, Once the wipe is completed, the Samsung Galaxy S II l9100 will then reboot. All the data you previously installed already been deleted and then the phone will then return to its original factory fresh default settings.''