If it's disabled by too many wrong passcode attempts then it needs a restore with iTunes.
No other way around it.
If it's icloud locked and again your "friend" doesn't know the iCloud password then it's a useless brick that you can't do anything with.