Is there a way to auto-power on the phone

梦想与她 提交于 2019-12-12 19:38:36

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!