How to bypass passcode on ipod 4g (6.1.6) and iPhone 4s (7.1.2)?

So basically what the title is

I want to know how to bypass the passcode on those devices with those ios versions but I don't want to use a PC to do it and I only want to bypass the code not reset it I want to do it as a trick at school to a friend like all it needs to do is open a file that can't be open by the lockscreen or if possible have access to everything. I don't mind if it only works with one of them but please respond to this question so I can do it.

You can't