File: crash_reporter.rc

package info (click to toggle)
android-platform-system-core 1%3A7.0.0%2Br33-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,464 kB
  • sloc: cpp: 96,742; ansic: 39,563; asm: 3,482; python: 1,571; sh: 666; lex: 311; java: 169; makefile: 65; xml: 19
file content (37 lines) | stat: -rw-r--r-- 1,406 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
on property:crash_reporter.coredump.enabled=1
    write /proc/sys/kernel/core_pattern \
          "|/system/bin/crash_reporter --user=%P:%s:%u:%g:%e"

on property:crash_reporter.coredump.enabled=0
    write /proc/sys/kernel/core_pattern "core"

on post-fs-data
    # Allow catching multiple unrelated concurrent crashes, but use a finite
    # number to prevent infinitely recursing on crash handling.
    write /proc/sys/kernel/core_pipe_limit 4

    # Remove any previous orphaned locks.
    rmdir /data/misc/crash_reporter/lock/crash_sender

    # Remove any previous run files.
    rm /data/misc/crash_reporter/run/kernel-crash-detected
    rmdir /data/misc/crash_reporter/run

    # Create crash directories.
    # These directories are group-writable by root so that crash_reporter can
    # still access them when it switches users.
    mkdir /data/misc/crash_reporter 0770 root root
    mkdir /data/misc/crash_reporter/crash 0770 root root
    mkdir /data/misc/crash_reporter/lock 0700 root root
    mkdir /data/misc/crash_reporter/log 0700 root root
    mkdir /data/misc/crash_reporter/run 0700 root root
    mkdir /data/misc/crash_reporter/tmp 0770 root root

service crash_reporter /system/bin/crash_reporter --init
    class late_start
    oneshot

service crash_sender /system/bin/periodic_scheduler 3600 14400 crash_sender \
    /system/bin/crash_sender
    class late_start
    group system