How to delete your data before selling Android phone

How to delete your data before selling Android phone if your Android phone support Encryption go to Settings – Security – Encrypt phone   Overwrite data with anything After you encrypt your phone data Go and use factory rest and remove data then overwrite with useless data after factory rest ,don`t sign with Google accounts to make sure not use Google Sync