iPhone 3G camera doesn't work My iPhone's camera stopped working. App opens but the shutter never opens. It holds still forever. It just came suddenly without any warning.

My iPhone was Jailbroken and I thought it was something to do with that (though it didn't make any sense as I had it Jailbroken for a couple of years now). So I installed the iOS from scratch (restore) without Jailbreaking it. Restored the backup. Camera worked... for a day.

Stopped working again. I tried Camera+ - no luck either, freezes on the "autofocus" rectangle.

What's happening and how to get it to work again?

I'm fine with Jailbreaking it again if there's any point (like need to access system files...).
Based on a research I did on the Internet it seems that the reason for this malfunction could be the sensor (whatever that means). With new phones this usually means warranty replacement. My phone is a bit too old for that unfortunately, but... I accidentally found a workaround!

Covering completely the camera lens with a finger when opening the Camera app seems to solve the problem! Covering the lens when the Camera app is already opened doesn't cause shutter to open though so the lens has to be covered prior to Camera app launch.