1. Are you ready for the Galaxy S20? Here is everything we know so far!

Turn on Tablet when plugged into charger?

Discussion in 'Android Help' started by unix4linux, Feb 16, 2016.

  1. unix4linux

    unix4linux Newbie
    Thread Starter

    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.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Hadron

    Hadron Smoke me a kipper...
    VIP Member

    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.
     
  3. unix4linux

    unix4linux Newbie
    Thread Starter

    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 (Text):
    1. #!/system/bin/sh
    2. sleep 20
    3. /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 :)
     
  4. Hadron

    Hadron Smoke me a kipper...
    VIP Member

    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.
     
  5. unix4linux

    unix4linux Newbie
    Thread Starter

    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.
     
  6. WarrantyVoider

    WarrantyVoider Android Enthusiast

    I don't have your tablet, but I'm guessing in your /init.rc, you can find these lines:
    Code (Text):
    1. on charger
    2.    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.
     
Loading...
Similar Threads - Turn Tablet plugged
  1. melani78
    Replies:
    2
    Views:
    221
  2. muttleytm
    Replies:
    2
    Views:
    238
  3. aleislost
    Replies:
    3
    Views:
    581
  4. Michavz05
    Replies:
    9
    Views:
    545
  5. persistentone
    Replies:
    19
    Views:
    1,267
  6. kathyk123
    Replies:
    0
    Views:
    1,098
  7. hrokgames
    Replies:
    1
    Views:
    396
  8. crucible9
    Replies:
    5
    Views:
    892
  9. Misfire22
    Replies:
    5
    Views:
    5,086
  10. darkdaz
    Replies:
    24
    Views:
    4,079

Share This Page

Loading...