Galaxy A5(2017): How to perform Factory Data Reset and delete personal information
Factory Data Reset
A factory data reset will erase all personal data from your device, including downloaded applications, music, pictures, and any personal information. This ensures your data are removed before sending the device in for replacement or repair, properly disposing of the device, or giving the device to a friend or family member to use. Your personal information cannot be recovered after this procedure, so save any data you need on your computer (or any other device) before following these steps.
Restore to Factory Default Settings
Warning: All of your personal information will be erased and cannot be recovered if you follow the steps. Back up your files before.