the problem is your iphone is now infected with some apps thats keeps running behind the scene. so what you need to do is download a popup blocker app.
then do this.
Anyway, here are my symptoms:
-Lights up/awakens every 30 seconds (rarely displays "This accessory is not made to work with the iphone")
but this happens only when it's not plugged in to a power source
-Will not shut down. Automatically restarts
-Obvious power drain from waking up every 30 seconds
My Workaround:
You must need a jailbroken iPhone for this!
There is an app in Cydia called "Popup Blocker", this will allow you to disable the waking up problem. It is on the iClarified source, but I recommend downloading the free version on
http://cydia.xsellize.com. Here is a video to further help you with downloading it (not me):
http://www.iphone.menswatchusa.com/...hone-easiest-fix-100-works-for-2g-3g-and-3gs/
After you have downloaded that and rebooted, go into Settings->Popup Blocker->Alerts->Accessory Warnings and change it to these settings:
Block When Unlocked: on
Block When Locked: on
Wake On Alert: off
Exit out and test it out.
Notice: This will not prevent your iPhone from restarting, however it'll prevent your iPhone from waking every 30 seconds.
Amen, no more annoying on and off screen