From the Home screen, drag down the Notification panel.
Drag down the Quick settings panel.
Tap the Settings icon.
Scroll to System.
Tap System.
Tap Advanced.
Tap Reset options.
Tap Erase all data (factory reset).
Before you proceed, make sure to back up all photos, videos, and data you'd like to keep. When you factory reset your device, all your files will be deleted.
Tap Delete all data.
Tap Delete all data again.
You've completed the steps!
