how to force a factory reset of an iPhone?
I believe what you are referring to is a DFU restore. To do this, first, turn the phone off by holding the Power Button and shutting off the phone. Next, with the phone still off, hold down the Home Button, and plug the phone into your computer (while still holding the Home Button). What you should see is a message in iTunes that the phone is in restore mode with the option to Restore the phone, while the iPhone screen remains black. If the iPhone screen is not black, you are not in DFU mode, and you should try again.