How to factory reset a Galaxy S5 using hardware keys
If you find that the touchscreen is unresponsive, there’s a problem accessing the menu, or you forgot your pattern lock, then you can still factory reset your S5 using the hardware keys.
Step 1: Turn your Galaxy S5 off.
Step 2: Simultaneously press and hold the Volume up button, the Home button, and the Power button until the Android icon appears on your display.
Step 3: Use Volume down to highlight the wipe data/factory reset option, and press the Power button to select it.
Step 4: Use Volume down again to highlight Yes — delete all user data, and press Power to select it.
Step 5: Wait until you see the reboot system now option and use the Power button to select it.
Step 6: When your S5 restarts, it should be wiped and ready to set up again.
NOTE: If you’re wiping your S5 to sell it on or give it away, then we recommend removing accounts before you factory reset.
You can do this by going to Settings > Accounts, tapping on each account and then tapping More at the top right and Remove account.