• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Turn on Tablet when plugged into charger?

I am setting up my tablet on my car to replace my head unit. I want to know if there is a way to have the tablet power on if the battery dies when it senses a charge? I have it set it so that when the car is turned on, it sends charge to the USB cable using an ACC connection. Typically, when the car is shut off, it stops charging the tablet, puts the tablet in Airplane mode, and the screen timeout is set to 7 seconds. This of course doesn't turn off the tablet (by choice) completely because I have to figure out how to have the tablet turn on when it senses charge. If not, I'd have to pull the tablet out of my dash each time it shuts due to battery drain, if I want to have it turned off completely due to summer/heat, etc.

With that said, is there a way to program the tablet to get it to turn on if it is completely shut off when it senses a charge? I am already rooted so that should be able to help as long as there is a way to modify the firmware.
 
If it's completely off then no, there isn't really. It's not running Android so no app can do this. In principle you could modify the real low-level firmware, but you've no source code for that, just some binary images (if you can find a download of that stuff at all - you've not said what tablet it is), so I reckon that's a tough job.
 
If it's completely off then no, there isn't really. It's not running Android so no app can do this. In principle you could modify the real low-level firmware, but you've no source code for that, just some binary images (if you can find a download of that stuff at all - you've not said what tablet it is), so I reckon that's a tough job.

I am using LG G-Pad v410. I have read that modifying playlpm file on Samsung devices will work by changing the init script to do a system boot as soon as it senses charge. For example:

In /system/bin/playlpm

Code:
#!/system/bin/sh
sleep 20
/system/bin/reboot

On my tablet, I don't see that file. Not sure if it's because it's really named that way for Samsung devices only or if it's because I am running 5.1 Android and the file names have changed.

Sorry I didn't provide these details earlier. I should know better :)
 
Hmm, I don't have a file of that name on my phone (HTC m7). My tablet isn't rooted (must do something about that when I have a moment), but it's a Samsung so it probably wouldn't tell us much if it had.

What happens if you create a file of that name on your device? Maybe nothing, but you never know.
 
Hmm, I don't have a file of that name on my phone (HTC m7). My tablet isn't rooted (must do something about that when I have a moment), but it's a Samsung so it probably wouldn't tell us much if it had.

What happens if you create a file of that name on your device? Maybe nothing, but you never know.

Nothing happens if I add a file with that name. I am sure the OS is looking for the file by name so in this version from LG, they probably named it something else, which the OS looks for certain events are triggered.
 
I don't have your tablet, but I'm guessing in your /init.rc, you can find these lines:
Code:
on charger
   class_start charger
If so, one possible solution to do what you want is to not start the "charger" class (2nd line) when the "charger" trigger is invoked (1st line). If you don't care about the booting time, you can try to do a reboot instead. Hopefully, on the subsequent reboot, the normal boot trigger is invoked and normal booting continues. There are other ways to attack the problem, but I can't say what the best way is without more information.

Well, I am skipping a lot of details. The process is obviously quite technical, as it would involve first unlocking the bootloader and modifying the boot image. Then it would take some experimentation to implement a hack that would not interfere with the tablet's normal functions. Anyway, I don't know if this is the kind of challenges you'd like to undertake, so I'll just stop here.
 
Back
Top Bottom