Chosen Solution

My phone is suddenly takingn screenshots when the Home button ism pressed as well as suddenly closing.

This is a fault with the power/volume/mute flex invoking random presses. The only real fix for this is to have the flex replaced. I have done lots of these but it isn’t a job for just anyone as it requires almost a complete teardown of the phone. However, the part is very cheap and if you know someone that can do the work it shouldn’t cost much despite how big the job sounds. For someone that dissembles iPhones regularly it is a run of the mill job

It automatically turns off while I’m using it and turns back on. After I press the off button it doesn’t turn off after 2,3 minuets and it keeps turning on and off again and again and when I press the home button to unlock it takes a screenshot and when I try to delete it the phones shuts off. Then after it try’s to turn on and off it’s shows the shut down thing!!

I had this problem with my iPad. After about a week I realized that my iPad had shifted slightly in the case. Apparently the case was pressing on the power button. I removed the case and the problem disappeared.