android 手机关机流程分析
程序员文章站
2022-05-03 13:40:57
android 手机关机流程分析。rebootorshutdown -》lowlevelshutdown-》systemproperties.set("sys.powerctl"...
android 手机关机流程分析。
rebootorshutdown -》lowlevelshutdown-》systemproperties.set("sys.powerctl", xxx);
在init.rc 中on property:sys.powerctl=*powerctl ${sys.powerctl}
kernel-4.4/kernel/reboot.c
syscall_define4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg){
case linux_reboot_cmd_power_off:
do_gettimeofday(&start); printk(kern_err " %14s: %lu.%03lu [sec]\n", "total time", start.tv_sec, (unsigned long) (start.tv_usec/1000)); kernel_power_off();
do_exit(0);
break;
上一篇: 吃地瓜真的可以减肥吗