Sony Xperia Z

Solution
If you tried everything, that points to bad hardware and phone needs to be replaced. I'm guessing one of the things you tried was a factory reset, you can also try a more forceful method by doing a web search for a stock ROM for your specific model and flashing it to the phone using a computer, that was probably not tried.
If you tried everything, that points to bad hardware and phone needs to be replaced. I'm guessing one of the things you tried was a factory reset, you can also try a more forceful method by doing a web search for a stock ROM for your specific model and flashing it to the phone using a computer, that was probably not tried.
 
Solution