try a hard reset
In order to hard reset your Samsung phone, the steps given below must be followed:
Ensure that the Samsung phone is powered off.
Press the Power and the Volume Up button together till the device displays the start-up logo.
Once the logo is displayed, release the buttons and wait till the device enters the Android system recovery mode.
On the displayed screen, use Volume Down button to go to the wipe data/factory reset option (Volume Up and Volume Down buttons are used to highlight the displayed options on the Android system recovery screen).
Once the option is highlighted, press the Power button to select the option. (Pressing the Power button in Android system recovery mode selects the highlighted option.)
On the next screen, press the Volume Down button multiple times till the Yes -- delete all user data option is highlighted.
Press the Power button to hard reset the Samsung device while clearing the dalvik cache along with the process.