on property:sys.boot_completed=1
    stop kerneld
    stop logd

on post-fs-data
    rm /data/kmsg.txt
    rm /data/misc/logd/logcat.txt
    start kerneld
    start logcatd

service kerneld /system/bin/sh -c "cat /proc/kmsg > /data/kmsg.txt"
   class main
   user root
   group system

service logcatd /system/bin/logcat -f /data/misc/logd/logcat.txt -v threadtime
   class main
   user root
   group system
