FORUMS
Remove All Ads from XDA

[Q] Power on when plugged in (boot when docked)?

11 posts
Thanks Meter: 26
 
By DavidThompson256, Junior Member on 27th July 2011, 02:49 AM
Post Reply Email Thread
Appologies if this has been asked/answered here before. I tried searching, but didn't find any solution. Maybe someone else has stronger Google skills than I.

Here is what I am trying to do. I'd like to find a way to have the Galaxy Tab power on automatically when it is plugged in to power and begins charging. My company has several Galaxy Tabs (rooted) that are being used for a specialized purpose. They should be plugged in 24/7. However, it is possible that they will lose power, and the battery will eventually run down. When power is restored, I'd like to be sure that they come back on, without any user interaction.

I don't THINK this is the case, but it is worth asking: Is this a standard Android setting I can change anywhere?

I assume I will have to modify some code. Right now, I notice that when the Tab is turned off, and you plug it in, the charging indicator shows up and displays the battery levels. To me this indicates that code is running SOMEWHERE as soon as the Tab gets plugged in. I'd like to hijack that, and just have it power on.

Does anyone know where I should start looking for the code that runs when the device is plugged in? I found a charging.jpg in /mnt/.lfs that seems to be the image that displays, but so far no sign of what code is running. If there is any sort of init script, that would be amazing if someone could point that out.

Even if you don't know how to accomplish this, if you have any helpful pointers or "take a look at these files" to point me in the right direction, I'd really appreciate it.

As always guys, thanks for all the help!
The Following 5 Users Say Thank You to DavidThompson256 For This Useful Post: [ View ] Gift DavidThompson256 Ad-Free
 
 
9th August 2011, 04:33 PM |#2  
OP Junior Member
Thanks Meter: 26
 
More
SOLVED: Power on when plugged in (boot when docked)?
Hey guys, I know that no one else may ever have any use for this, or even care, but I wanted to post an update. I was finally able to get this figured out through some guess work, trial and error, and looking at the work someone else did on a fairly similar project.

I owe plenty of credit to the fine work done by Chainfire on his project described in this link. His work, while not the same project, demonstrated that something similar to what I wanted to do WAS possible.

Anyway, to make the tablet boot up when first plugged in- The battery charging indicator that runs when you first plug in the Galaxy Tab is run from the file /system/bin/playlpm. To make it boot automatically, delete the old playlpm (or better yet, rename it to playlpm.bak, just in case) and replace it with the following script.

/system/bin/playlpm
Code:
#!/system/bin/sh
/system/bin/reboot
Be sure to set the ownership and permissions the same as the old playlpm. It didn't work for me at first because I had forgotten to give execute permission.

Thats all that it takes. Most of the time, the Tab should have enough power to go straight to booting. If the battery is really dead, it may flash the charging battery icon a few times, failing to boot until it gets enough charge. It will eventually come on.

I don't know of any additional side-effects for doing it this way, but there may be some, I don't know what else the stock playlpm is supposed to manage. This worked for my purposes though. Hope it could help someone else.
The Following 18 Users Say Thank You to DavidThompson256 For This Useful Post: [ View ] Gift DavidThompson256 Ad-Free
31st October 2011, 02:08 AM |#3  
Junior Member
Thanks Meter: 0
 
More
Hi DavidThompson256,

Just want to say thank you for your research, I've been looking for the same thing a few months and just discovered your post.

I thought it is something to do to the kernel but looks like this simple mod can do the trick.

Thanks again!
14th November 2011, 12:34 AM |#4  
prscott1's Avatar
Senior Member
Flag Houston
Thanks Meter: 22
 
More
Ironically, I have an opposite problem. My phone automatically reboots when plugged in. My searching led me to your post. I installed the nomoarpower app but I could get it to keep my pad turned off. LOL
16th November 2011, 08:49 PM |#5  
Junior Member
Thanks Meter: 0
 
More
Did you have to root the tab before making this change?

Thinking about picking up the Galaxy Tab Plus but need it to do the same thing and boot when the power is plugged in.
12th August 2012, 11:27 PM |#6  
Senior Member
Thanks Meter: 5
 
More
An update?
I have cm9 how do i find the file for my gsii?

there is no such file as the one you speak for my device, how did you find what file yours was?
20th August 2012, 05:34 PM |#7  
Junior Member
Thanks Meter: 0
 
More
I am having a similar issue with a Nexus 7

http://forum.xda-developers.com/show....php?t=1815131

I cant find the file mentioned, I am assuming its probably renamed to something else, any advice would be greatly appreciated!
6th January 2013, 11:10 AM |#8  
Junior Member
Thanks Meter: 0
 
More
As many others I dont have this file on my galaxy tab II
But i do have the kernel doing someing when pluged in when the device is not powerd on. First it tryed to show the splash img and then starts the charing animation. Does anyone know where this script is launched on a galaxy tab 2 7"?
26th February 2013, 12:43 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Thank you! Been looking like a mad person for a solution like this for a couple of days and only found NoMoarPowah, which didn't fit my needs.
22nd March 2013, 12:54 AM |#10  
Senior Member
Thanks Meter: 11
 
More
Thank you...worked perfectly on my SGS3
26th March 2013, 01:57 PM |#11  
Junior Member
Thanks Meter: 0
 
More
on the s6500
thanks, this was really helpful. I've got this working on the Samsung Galaxy s6500 (mini 2), and I had to make a small addition to the script:

Code:
#!/system/bin/sh
su
/system/bin/reboot
Quote:
Originally Posted by DavidThompson256

Hey guys, I know that no one else may ever have any use for this, or even care, but I wanted to post an update. I was finally able to get this figured out through some guess work, trial and error, and looking at the work someone else did on a fairly similar project.

I owe plenty of credit to the fine work done by Chainfire on his project described in this link. His work, while not the same project, demonstrated that something similar to what I wanted to do WAS possible.

Anyway, to make the tablet boot up when first plugged in- The battery charging indicator that runs when you first plug in the Galaxy Tab is run from the file /system/bin/playlpm. To make it boot automatically, delete the old playlpm (or better yet, rename it to playlpm.bak, just in case) and replace it with the following script.

/system/bin/playlpm

Code:
#!/system/bin/sh
/system/bin/reboot
Be sure to set the ownership and permissions the same as the old playlpm. It didn't work for me at first because I had forgotten to give execute permission.

Thats all that it takes. Most of the time, the Tab should have enough power to go straight to booting. If the battery is really dead, it may flash the charging battery icon a few times, failing to boot until it gets enough charge. It will eventually come on.

I don't know of any additional side-effects for doing it this way, but there may be some, I don't know what else the stock playlpm is supposed to manage. This worked for my purposes though. Hope it could help someone else.

Post Reply Subscribe to Thread

Tags
boot, charging, docked, galaxy tab, power on

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes