A short while ago, my iPhone just turned off, after a rather temperamental few months when coming to think about it. For example, and I should note this happened a while after the iOS 5 update, my home button started to become inactive; sometimes it would work fine, sometimes you'd have to push it harder, or sometimes you had to push the button from a point around the edges of the button just for it to work. Occasionally if I was on the phone to someone it would cut off the call too. And now for the grand finalé, it 'dies'.
When I got home the day it 'died', I plugged my iPhone into the charger and lo and behold it turned on, but it only showed the Apple logo. After about 30 minutes of it staying on the Apple logo, it turned on and went to the locked screen, was at 100% battery but displayed 'No Service'. When I typed in my passcode it showed the 'Connect to iTunes' screen. However, when I took out the charger the iPhone turned off. When I got home I plugged my iPhone into the computer and it went back to the Apple logo part, then turned off after ~15 seconds, then would turn on again ~15 seconds later, and wouldn't stop doing it while plugged it. When I took out the USB it would also die instantly yet again. After a while, my iPhone didn't turn off while plugged into the computer and it connected to iTunes and let me do a Restore. Towards the end of the Restore an error 1602 occurred and the Restore cancelled. I tried a few times but the same happened again. After a few days, I plugged my iPhone into the charger in hope of a change. It turned on and went to the Apple logo as usual, but to my surprise, when I entered my passcode everything was back to normal except I had lost all my contacts, messages, photo's etc, which I assumed was due to the interrupted Restore done previously.
What's going on here?