我目前正在为这种设备开发应用程序: link。我希望用户能够在一周的特定时间设置定时器以关闭和启动(不重启)。
我做了很多研究,但我找不到问题的答案。每个人都说使用定时器无法启动,因为该设备应该关闭。但是,在设备的设置中,有一个选项"定时开关机"允许这样做(如上面链接中所述)。因此,如果设备已植根,我认为有一种方法可以破解此功能。但我不知道该怎么做。
有没有人有想法?
答案 0 :(得分:0)
This functionality is not part of the AOSP. That means first you have to gain access to the source code (or alternatively talk to someone who has access to it).
You might be able to find the corresponding code by decompiling System apps (especially the app which contains the option).
Otherwise you'd have to find a contact to the developer (probably via the manufacturer).
If you have the sources, the easiest way to hook into it is normally using xposed.
But depending on the actual implementation (e.g. if it's a shell call) there might be a better way.