Restoring the default settings or factory reset your Sony Xperia M2 will delete all your files. It is recommended to backup your important files on your computer before attempting to reset your device.
How To Reset Your Sony Xperia (Erasing All Your Files):
• Go to Settings, and select Backup & reset.
• Tap on Factory data reset.
• Then Reset phone.
• Confirm by tapping Erase everything. You just need to wait while your phone deleting your files and restoring your settings to default.