Why does my iPhone keep turning on and off automatically?

My iPhone 3Gs is jailbroken. I added some tweaks and some of it deosn't work. Suddenly my iPhone freeze. The iPhone turn off suddenly. A few second, it turn on and off…

Two possibilities:

1. Hardware
You might have dropped the iPhone and caused the sleep button to be pressed all the time. (I had that problem with my iPod)

2. Software
I had this as well. Plug your iPhone into iTunes and hold both the sleep and the homebutton pressed down when the apple icon appears. If this doesn't work you should try to make some sort of pattern with the two buttons. (sounds weird, but worked for me) Maybe someone else knows what pattern…

You have just installed a corrupt file most likely for an older version that doesn't work with the current version of software that you have on iOS 6.
It happened to me I just had to put it in recovery mode and reinstall it.
Hold home and sleep button for 10 seconds after 10 seconds release the sleep button and keep holding the home button.
Do this while connected to iTunes. A message will pop up on the computer and click restore.

  • Will iPhone 4 keep recording video if it automatically goes off? I want to use my iPhone 4 as a dash camera. My question is, do I need to set it so that the backlight doesn't come on, that is, so that it doesn't turn off automatically? In other words, will my phone keep recording video if it turns off automatically?
  • Why is my iPhone 5 turning off and not turning back on? This has happened twice now. My iPhone 5 has turned off in the middle of the night with a full charge and off the charger, and when I try to turn it back on it takes a couple tries. Has anybody experienced this?
  • Why does only my works Wi-Fi keep kicking me off and making me log in and accept terms? I just got a new iPhone and I'm always connected to my home Wi-Fi and any other Wi-Fi is fine. I used to have an android and when I logged in and accepted terms I would be logged in all day. But with this iPhone it kicks me off and brings up the log in screen every time I use my phone! Help! And btw my works Wi-Fi is good I work at a well known hospital in San Diego.
  • Why does my phone keep turning off? For the past week my phone (iPhone 5s) keeps turning off quite a bit daily. Can anyone tell me what's going on with my phone? Btw I got it this Christmas