Resetting your phone erases all data and restores it to out-of-the-box condition. This data will be erased from the phone:
Back up your data.
If your phone works and you can unlock it:
Make sure you have your security information:
To restore your data after resetting, you'll need to enter security information. This shows that you or someone you trust did the reset and helps prevent others from using your phone without permission.
To erase all data and reset your phone:
If you can't open Settings, do an external reset.
Press the Power button to restart in Recovery mode.
Use Volume buttons to scroll to an option and press the Power button to select it:
Allow several seconds for the reset to complete.
Use Volume buttons to scroll to Reboot system now, then press the Power button to select it.
Allow several minutes for the reboot to complete. If the phone doesn't finish rebooting, press and hold the Power button until the screen turns dark, then release it to power up normally.