If your phone is locked, you need restriction codes in order to make it functional again. These codes can be obtained from the carrier's service shop or from the local phone service. You can't do it like the in Android operating system and this is the only way.