If you have to click OK after entering your passcode, this command will unlock your phone:
adb shell input text XXXX && adb shell input keyevent 66
Where
XXXXis your passcode.66is the keycode of the OK button.adb shell input text XXXXwill enter your passcode.adb shell input keyevent 66will simulate clicking the OK button.