debuggerd is the set of tools and daemons responsible for handling crashes and providing diagnostic information (tombstones and backtraces) for native processes.
debuggerdManually trigger a dump of a running process. Root access is required.
Usage:
debuggerd [-bj] PID
Options:
-b, --backtrace: Only output a native backtrace instead of a full tombstone.-j: Collect Java traces (for Android apps/runtime).pbtombstoneConvert a protobuf-formatted tombstone into human-readable text.
Usage:
pbtombstone [OPTION] TOMBSTONE.PB
Options:
-h, --help: Show help message.--display-sp: Print stack pointer in backtraces.--debug-file-directory PATH: Specify a directory containing symbols for more detailed backtraces.crasherA testing tool used to deliberately trigger various types of crashes.
Usage:
crasher KIND
Common KINDs:
SIGSEGV: Cause a segmentation fault.abort: Call abort().heap-buffer-overflow: Write past the end of a heap allocation.stack-overflow: Recurse until the stack overflows.smash-stack: Corrupt the stack guard.fdsan_file: Trigger a file descriptor sanitizer failure.crasher/crasher.cpp for the full list of supported crash types.tombstoned (Daemon)A daemon that manages the lifecycle of tombstone files and coordinates with crash_dump to provide output file descriptors. By moving the file management logic to a daemon, the system can safely manage tombstone rotation and interception without granting extra filesystem permissions to every process.
/data/tombstones/ (usually named tombstone_XX)tombstoned_crash, tombstoned_intercept, and tombstoned_java_trace.crash_dumpAn architecture-specific helper binary (e.g., crash_dump32, crash_dump64) spawned during a crash. It is forked from the crashing process to ensure it inherits the same security context (UID, GID, and SELinux domain), which allows it to ptrace the target process without requiring elevated system privileges.
crash_dump)Debuggerd uses a primary signal handler (debuggerd_signal_handler) linked into Bionic that is registered for all crash-related signals.
SIGSEGV, SIGILL, etc.).debuggerd_handler (linked into Bionic) catches the signal and forks/execs crash_dump. Forking from the crashing process preserves its security properties while moving the heavy dump-generation logic into a specialized, short-lived process.crash_dump connects to tombstoned to get an output file descriptor.crash_dump attaches to the process via ptrace, reads its state, and writes the tombstone.crash_dump detaches and exits.debuggerd_fallback_handler)This handler is used as a fallback when debuggerd_handler determines that it cannot spawn crash_dump (e.g., in a process where PR_SET_NO_NEW_PRIVS is set).
debuggerd_handler detects it cannot spawn crash_dump and invokes the fallback handler.tombstoned directly to request an output file descriptor.libunwindstack to generate a dump within the crashing process.tombstoned that the dump is complete.