Turn tablet on/off when powercable is plugged / unplugged

Search This thread

Evelen

Member
Mar 10, 2014
44
2
Hi.

I have a Nexus 7 2012 in my car and running Timur's Kernel.
When i disconnect the power the tablet goes to Deep sleep.
The problem is that the battery don't lasts more than max 24h, and that's if it is 100% (also I don't drive enough to charge 100% every day).
So the result is a flat battery, and then I have to wait 15-20min for the battery to be fully enough that the Nexus can be turned on.

Therefore I want the following functionality:
- When the Nexus receive power the tablet will turn on and start "Car Home Ultra".
- When the Nexus loose power it will go to Deep Sleep, and if the power is not back in X minutes it will turn off.


Is this possible?
 

Evelen

Member
Mar 10, 2014
44
2
bootloader?

ok, i found this: http://www.mp3car.com/android-table...n-nexus-7-without-using-the-power-button.html

EDIT: This worked perfectly. Unlock your bootloader and type "fastboot oem off-mode-charge 0". Now, even if the tablet is completely turned off, when you apply power it automatically boots to the home screen. No power button needed ever again.

But how do i write commands in bootloader? My devoice is rooted, but I don't know if the bootloader is unlocked.