Phone unlocking ideas
Just now I tried this in my nexus 7 and it worked. My nexus 7 has lost its root access after update to 4.3 and I didn't bother to root it again - just fyi in case if OTG didn't work in your nexus 4.

I set up PIN as my security option, connected OTG cable and connected a mouse. After restart (mouse didn't detect the moment it was connected and worked after reboot only) I was able to use mouse to click the numbers to enter PIN.