My proximity sensor stopped working, and it was just killing me – whenever I’d make a phone call, the screen would turn off instantly and couldn’t be revived until the phone call ended. I had to disable the phone setting to “automatically turn off screen”. However, this made for other problems since I would forget to turn off the screen after a call started, and then my ear would end up touching the screen and navigating around my phone and screwing up settings. Ugh.
I thought it was because of dust on the sensor, but it turns out it was software related. Thank goodness!
This post clearly outlines the fix. You just need to run a few commands via ADB, or via a local shell, and it’s fixed!