Samsung phone keeps restarting I have a Samsung GT-S7273T (Android 4.2.2) and yesterday something happened while I was sleeping. After that, the phone can't stay on for more than 30~50 seconds: it hangs and then restarts itself. I've noticed that any change I make to the phone is &quot;reverted&quot; after it restarts (like deleting a file or switching off Wi-fi). While it is on, everything works normally (facebook, watch videos in youtube, receive notifications, even play games, etc).
I've tried booting up in Safe Mode, same thing happens. I've also tried a data wipe/factory reset through recovery mode, but when I restart the phone, everything is just like before, as if no reset was made (although it says the the data wipe was successful). I've also tried a cache wipe only, but it gives an error and restarts itself when I try.
I've also noticed that if I try to restart the phone (hold power button, tap on &quot;Restart&quot; option), the phone starts to switch off, showing the &quot;switch-off animation&quot; and then stops there, instead of restarting (but it keeps working, even receiving notifications). After a few seconds, it hangs and then restarts (just like it normally does).
The phone is not rooted and I never downloaded any custom firmware or anything like that.
Is there any other way I can force a reset on my phone?
UPDATE
I've just tried to flash to stock ROM and then wiping data, but it seems to not have worked, although Odin reported success. All my files, apps and configuration are still there and the problem persists.
UPDATE #2
I've tried &quot;wipe all&quot; in shell, but it reported several errors with message &quot;Read-only file system&quot; and one &quot;Permission denied&quot;.
I've also tried &quot;wipe data&quot;, and got &quot;permission denied&quot; on opening /data.
First solution : Since you tried both wiping all data and only the cache the only thing as far as I know left to do is to install either a backed up rom you made earlier or install a fresh official one from the manufacturer's site(samsung in your case) trough recovery mode.

Second solution: 
Try to wipe manually(this solution is assuming you use windows)


Visit the Android Developers site to download the Android System
Development Kit (see Resources). Right-click the ZIP archive and
choose “Extract All.” Click “Browse” and choose your “C:\Program
Files” directory.
Click the folder you extracted and press “F2” to rename it. Give the
folder a simple, descriptive name, such as “AndroidADT.”
Right-click “Computer” in your file browser and choose “Properties.”
Click “Advanced System Settings” and, in the System Properties
window, click “Environment Variables.”
Click “Path” and “Edit” in the System Variables window. When the Edit
System Variable window opens, your path variable is selected, so
press “End” to move the cursor to the end of the selection. If you
type while the path is selected, you'll erase your path variable.
Type “;C:\Program Files\AndroidADT\sdk\platform-tools\” (without
quotes here and throughout) and ensure that you include the semicolon
at the beginning of the path. Click “OK” to save your changes.
Point your cursor to the upper-right corner of the screen and click
“Search.” Type “cmd” in the Search box and click the program icon in
the search results to launch the Command Prompt window.
Turn on your Android phone and connect it to a USB port on your
computer. Type “adb shell” and press “Enter.” When ADB connects to
your device, type “--wipe_data” and press “Enter.” Your phone
restarts in recovery mode and restores Android to factory settings.