问题
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
回答1:
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:
- Linux Kernel and Android Suspend/Resume
- Power Mgmt from the android kernel
来源:https://stackoverflow.com/questions/6274017/is-there-a-way-to-auto-power-on-the-phone