Android Kernel集錦

1.Storagelinux

1.1 如何添加守護進程(daemon process)shell

:在init.rc添加相關服務進程,函數

example,spa

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

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 consoleflash

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

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

 

 

2.Performanceevent

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");
}
...
相關文章
相關標籤/搜索