Backing up your device
Before you think about wiping your Galaxy S5, make sure you have backed up all of your precious files. You can back up basic data in Settings > Backup & reset. For the rest of your files, you can use a backup app or service. You get 15GB of free storage with Google Drive, for instance, and there are a host of other alternatives to choose from, such as My Backup Pro and SMS Backup & Restore.
Encrypting your data
A security firm recently revealed that it is possible to recover some data after a factory reset, but you can take a precautionary step to prevent this from being possible before you reset the phone. If you’re selling your S5, or merely passing it on to someone else, then we recommend encrypting it first.
To do so, go to Settings and choose Security from in the System section. Select Encrypt device, follow the onscreen instructions, select a password, and plug in your charger if prompted. This process can take an hour or more, but once complete, you can follow the instructions below.
Performing a factory reset
Pull down the notification shade and tap the gear icon to bring up Settings. Choose Backup and reset and then Factory data reset.
Double check that everything is backed up and then tap Reset device at the bottom of the screen. Tap Delete all on the next screen and wait for the process to complete and the phone to reboot. You’re done.
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.
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.