If you can access the keypad, you can use a secret code to trigger the reset: On the main screen, type .
A: Restore Settings ( *#7780# ) resets profiles, themes, and network settings but keeps contacts & messages. Hard reset ( *#7370# ) deletes everything.
Performing a hard reset erases all personal data—including contacts, messages, and call logs stored on the phone memory.