Iphone 5s can't restore, because lost passcode?

Hi, I'm trying to do a factory reset for a friends iPhone 5s because she doesn't know the passcode.

I put it into recovery mode and pressed on "restore" in iTunes, after it had downloaded the firmware, it came up with this error: iTunes could not connect to the iPhone "Wahis iPhone" because it is locked with a passcode. You must enter your passcode on the iPhone before it can be used with iTunes.

What can I do?

You will need to knwo the icloud password, no way around it. If its her account she can reset it online though. I have this on a piece of paper tucket away in a box, I don't forget it but if I did I could always go dig it up.

Apple must be contacted for this information. Here is a link for Apple that explains how your friend can retrieve the passcode.

http://support.apple.com/.../kb/ht4113

Put it in dfu mode and restore it but if i cloud is still enabled you can't restore it and there's no way to take it off unless you have her icloud password and email but this story doesn't make any sense lol if you took it you took it oh well what are we gonna do call the police just tell the truth next time and more thaan likely i cloud is still enabled and its a usless iphone nothing but a $300 paper weight

The amazment of high tech… In the world of paper and pencil people still will not write down passwords and logins… Go figure… Providing the phone does belong to that person…