Yes, you should be able to remove a hacker by doing a factory reset on your phone. Keep in mind that this solution will remove all of your data, including contacts, third-party apps, photos, and other files. You will need to set up your phone entirely from scratch. To avoid this, we recommend using a quality antivirus, such as TotalAV, to remove threats from your phone.