Search code examples
androidtimerstartupapplication-shutdown

Is there a way to auto-power on the phone


I want to do a custom Timer app. I want it can start up and shutdown. I searched and found that starting it up needs root rights. Can anyone give me some clue to finish this?

Edit: in other words:It seems nice to have an app to auto power on or power off the phone, does the hardware support?The app is only for users to set time when to turn on the phone or power off. How to turn on the phone when it is power off? If we power off our phone or take out battery, the clock still show us a correct time when we power it on. And the alarm clock also works when we power off the phone. So I think it is also possible to auto-power on the phone


Solution

  • I highly doubt you can do this.

    Unless you make a very very weird and probably magical hack in the android kernel. Look at main.c in /kernel/power/

    Well since I've posted an answer, here are some resources about android's power management features: