Hi all, there is a small app I wrote that will solve the problem with the Nexus 4 dying while connected to the charger overnight. It's completely free (no ads also) and can be downloaded from Google's Play Store. No ROOT required, works on completely stock phones. I tried it on my phone and haven't had a SoD for 5 nights (I used to have it almost every night). Also a colleague of mine used to suffer from this and the app solved his problem too.
The app basically puts a wakelock on the phone that will allow for the backlight to go off, so the screen doesn't age, but will prevent the CPU from sleeping while charging. Once external power is disconnected, the wakelock is released and so the app does NOT consume any battery (while in automatic mode).
So if you happen to have the same issue, feel free to try the app and save yourself the troubles of returning otherwise a perfectly good phone.
P.S. I have just uploaded the app, so if it's not yet visible for your country, please try again in a few hours.
Update: Now the application checks if the power is connected when the device is powered on, because otherwise the wakelock was not acquired when powering on with charger connected. Unfortunately this requires a new permission ("RECEIVE_BOOT_COMPLETED") and the application to be opened after updating for the receiver to be registered by the system. Also I added a notification in the status bar while the application is running. You have to enable it in the settings if you want it displayed.
The app basically puts a wakelock on the phone that will allow for the backlight to go off, so the screen doesn't age, but will prevent the CPU from sleeping while charging. Once external power is disconnected, the wakelock is released and so the app does NOT consume any battery (while in automatic mode).
So if you happen to have the same issue, feel free to try the app and save yourself the troubles of returning otherwise a perfectly good phone.
P.S. I have just uploaded the app, so if it's not yet visible for your country, please try again in a few hours.
Update: Now the application checks if the power is connected when the device is powered on, because otherwise the wakelock was not acquired when powering on with charger connected. Unfortunately this requires a new permission ("RECEIVE_BOOT_COMPLETED") and the application to be opened after updating for the receiver to be registered by the system. Also I added a notification in the status bar while the application is running. You have to enable it in the settings if you want it displayed.
Last edited: