You are talking about a generic Android software reset?
Google gives instructions here: https://support.google.com/android/answer/6088915?hl=en
Factory reset your Android device
- Open your device's Settings app .
- Under "Personal," tap Backup & reset. If needed, enter your PIN, pattern, or password.
- Tap Factory data reset Reset phone or Reset tablet. If needed, enter your PIN, pattern, or password.
- To erase all data from your device's internal storage, tap Erase everything.
- When your device has finished erasing, pick the option to restart.
- Set up your device and restore your backed-up data.
If you can't open your device's Settings app, you can try factory resetting your Android device using its power and volume buttons. We recommend seeing your manufacturer's support site
for device-specific instructions.