Nexus 5 with cracked screen - Screen is always off when in a call
Proximity Fix app helped me on Samsung Galaxy Note 2 and in the reviews, fixed it for Nexus 4 as well. Maybe it is worth a try?

EDIT: Disable Proximity Sensor AOSP thread may give a pointer on disabling proximity sensor by echo command.