I found a iphone 4 and i tried to see who the owner was a year ago and gave it to police?

It seems like the carrier shut it down because it says no service. And it has to be turned on by the volume button. I got to the lockscreen but i don't know the passcode is there any software to hack it

If the police gave you the phone because no one claimed it you can take it to the cellphone carrier and they can reset it.

If you now have the phone because no one claimed it, you can take it your own cellphone service provider, and see if they use that brand of phone. If they do, then they can unlock it for you. The will also reset it completely, erasing anything that was on it previously.