Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to automatically power on the device once the charger is connected given that the device is initially turned off?

share|improve this question

The battery charging graphic is displayed by /system/bin/playlpm file on Samsung devices.

If you are root, you can edit this file to

#!/system/bin/sh
/system/bin/reboot

Be sure to add those permissions to the file

chmod 0755/system/bin/playlpm
chown root.shell /system/bin/playlpm

Your device will now boot when plugged

share|improve this answer
    
Thanks @IET_DEMO , Do you know solutions for cyanogenmod devices to do this? – m0j1 Apr 5 at 20:54
    
Hi, I have a Cyanogenmod device , do you know how can I do this on cyanogenmod ? Thanks – m0j1 Apr 20 at 2:34
    
This only works on Samsung devices. This may be useful for you – IET_DEMO Apr 20 at 13:56

Just got this working for ZTE Force (Boost Force, Sprint Force, etc).

I used IET_DEMO's answer, but replaced the file located at /system/bin/battery_charging with this code:

#!/system/bin/sh
/system/bin/reboot
share|improve this answer
    
Hi, I have a Cyanogenmod device , do you know how can I do this on cyanogenmod ? Thanks – m0j1 Apr 20 at 2:34

For some older Samsung devices, this can be accomplished through NoMoarPowah!:

NoMoarPowah! can automatically reboot into Android when charging is done. Either when fully charged, or when the battery level reaches 15% and Android has enough juice to run.

You need root and you probably don't want to do it unless you really know what you're doing, since I would expect this to modify important system files.


It looks like this has been removed from the Play Store, but you can probably find the APK hosted elsewhere. (I don't have a trusted link offhand.)

share|improve this answer

Kernel is loaded at a later stage in the boot-up process, so any modifications to it would not have any effect for when the device is powered off.

This functionality really depends on each device's hardware, most likely in the bootloader (more knowledgeable editors feel free to correct me.) For example, my Motorola Atrix 4G phone begins booting up when I connect a charger, while my Samsung Galaxy Tab does not - it displays the "Battery Charging" graphic and requires being powered on manually.

share|improve this answer
2  
so what brings up the Battery charging graphic on the screen ?!...now the bootloader is called when you hit on the power button manually, but what piece of code displays the battery charging graph on the screen ?! – Muhammad Ghandour Mar 4 '12 at 9:19

If you want to do the opposite, shutdown when charge, use this: "Auto ShutDown when no charge" https://play.google.com/store/apps/details?id=com.zeroFactorial.probattle good for my car's device and also had button broken

share|improve this answer

I have found solution for my galaxy s4.IET_DEMO is right.You should edit some file that creates battery animation when charger is connected.But in my case , file's name was different.I searched through system/bin folder to find the file and I found it.Its name is "lpm".Just edit that file.More info @ http://developwear.com/blog/2014/07/03/autobootstart-android-when-charger-is-connected/

share|improve this answer

protected by Community Apr 24 '15 at 12:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.