Missing Keyboard on Lock Screen
First things first. There's something that I'm confused about. You said that the keyboard crashed, but did you try turning the phone off and restarting it? That should reinstate the keyboard and you should be able to unlock upon restart.

You can also remove the battery from the phone to "kill it" and power it up again, in case it is needed to accomplish the above mentioned. Although removing the battery would be rendered irrelevant on phones with concealed (non removable) batteries (without opening the case, ofcourse).



In any case, to backup contacts from your phone, you can use the command "adb pull" to retrieve the following file:


  adb pull /data/data/com.android.providers.contacts/databases/contacts2.db


https://chombium.wordpress.com/2012/09/30/android-how-to-backup-contacts-and-sms-messages/

EDIT: You will probably get a permission denied error, in which case you would need root access to do this. Post that, you could also try "adb shell" and copy the file to /sdcard