Resetting your phone erases all data and brings it back 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, be sure to:
Know your Google credentials.
If you added your Google account to your phone, make sure you know the Gmail address and password for that account. To help prevent others from using your phone without permission, after you reset a phone, you can’t set up the phone until you enter your Google account information again. If you've forgotten the password, you can reset it.
To erase all data and reset your phone:
If you can’t access 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 & hold the Power button until the screen turns dark, then release it to power up normally.