Not sure as I'm not a SumSung use, but can't you boot into your recovery or bootloader and do a factory reset/system restore? That will take care of all your woes
Hope your contacts are backed up, cause you'll basically lose everything on internal memory.
Tell your friend to lock-up his/her own device next time