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
XXXX is your passcode.66 is the keycode of the OK button.adb shell input text XXXX will enter your passcode.adb shell input keyevent 66 will simulate clicking the OK button.