LAstles :
My Galaxy S5 suddenly started shutting off and restarting incompletely for no reason, at rest and in the middle of doing of something. Complete factory reset did nothing - apparently there is "unauthorized" software on the phone and it is rooted, so Samsung won't fix it under warranty (it's four months old). I didn't do this on purpose, no one else has had my phone, and I haven't given permission to any apps to change my operating system. How did this happen, and is there anything I can do?
Donnot worry, You just need to ReFlash your phone.
Download: SamFirm v0.3.6 (Latest Version by now)
Enter Your phone model and region
Check: Auto
Press: Check Update
wait till it find the latest working firmware, then press Download
When Download Finished extract the file
Download: Odin 3.12.3 (Latest Version By Now)
Flashing instructions :
Run "Odin" as administrator.
Click on PDA button (AP if you are using Odin3 v3.09) and navigate to the *.tar or *.tar.md5 firmware file (it will take a few second to check firmware file, if you are using Odin3 v3.09).
- If the Zip file contains more than one *.tar file then they will be labeled with PDA, Phone and CSC. Put them in the corresponding section of Odin3
Shut down your device and make sure it's completely off.
Put your device into download mode by pressing and holding (Volume Down + Home + Power) buttons then Press Volume up to continue.
Connect your galaxy S5 to PC using USB cable and wait until you get a sign in Odin (ID:COM section) and "Added" in message box.
Make sure re-partition is NOT MARKED[very important]
Click Start and wait a few minutes until you see "RESET" or "PASS!".
If your device stuck in bootloop, factory reset it from recovery mode.
Done!