Android Kernel集锦

1.Storage

1.1 如何添加守护进程(daemon process)

:在init.rc添加相关服务进程,

example,

## Daemon processes to be run by init.
##
service ueventd /system/bin/ueventd
    class core
    critical
    seclabel u:r:ueventd:s0
    shutdown critical

service flash_recovery /system/bin/install-recovery.sh
    class main
    oneshot

service console /system/bin/sh
    class core
    console
    disabled
    user shell
    group shell log readproc
    seclabel u:r:shell:s0
    setenv HOSTNAME console

service kmsg_log /system/bin/kmsg.sh
    class late_start

service syslog /system/bin/logcat -f /data/log/system.log -r 10240 -v time
     user root
     group system
     oneshot

 

 

2.Performance

3.Stability

 

4.common

4.1 Android kernel 函数调用堆栈打印:

举例:

#include <linux/stacktrace.h>

...

if(off == POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN)
{
        dev_dbg(dev, "store power supply property dumpstrace begin!\n");
        dump_stack();
        dev_dbg(dev, "store power supply property dumpstrace end!\n");
}
...
posted on 2019-07-17 17:54  找工作中  阅读(404)  评论(0编辑  收藏  举报