I have recently tried to fit a tablet into my car and I came across a problem with waking up the device without using the power button.
My solution is to boot the device whenever it is charging, but I have noticed that when the battery level is at 0%, the device boots and then immediately shuts down.
I have used this adb option to trigger this behavior:
fastboot oem off-mode-charge 0
However this boots the phone without checking the battery level and as I said -
if the battery is dead, the phone (or rather a tablet- Nexus 7 2012) turns off immediately -
it drains the battery faster that I'm able to charge it. Is there any way to make the tablet boot only if the battery level is greater than, say, 20%?