Mobile Development 18 min read

Art‑Parser: Offline Android Core Dump Extraction and Native Crash Analysis

This article introduces the art‑parser tool for offline Android core‑dump analysis, detailing its origin, project structure, core‑file acquisition methods, page‑repair techniques, object inspection commands, and the challenges of open‑sourcing the utility for mobile developers.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Art‑Parser: Offline Android Core Dump Extraction and Native Crash Analysis

The author revisits the art‑parser tool, originally created to analyze mysterious Android process deadlocks, and explains its background, design goals, and the current status of open‑sourcing this utility for offline native crash debugging.

Background and Motivation – Starting from Android 7.0 (AOSP 7.0) the author first encountered native crashes with stack traces pointing to #00 pc 00561a48 /data/dalvik-cache/arm/system@[email protected] #01 pc 71cc8f87 /data/dalvik-cache/arm/system@[email protected] (offset 0x1fb5000) . Understanding ELF files, ART‑generated machine code, tombstone mechanisms, and coredump analysis became essential.

Project Structure – The initial goals (Java stack parsing, ART register analysis, object retrieval) proved insufficient as real‑world core files often miss pages or BSS segments. The project now relies on crash‑utility plugins (zram, shmem, ram2core) to extract cores from ramdump or rooted devices, and on OpenCoreSDK for non‑root environments.

Core Acquisition – Various tools are listed: ram2core – extracts a target process coredump from a ramdump. proc2core – captures a coredump on a rooted device without disrupting the live process. OpenCoreSDK – open‑source SDK for non‑root Android apps.

Core File Page Repair – Missing pages are remapped using original binaries and DexCache files. Example commands: crash> mod -s zram zram.ko crash> extend zram.so crash> ram2core -p 2506 -s zram -m shmem produce a partial core file, which is then restored with: art-parser --core-file=core.2506 art-parser> execfn out/app_process64 art-parser> sysroot out art-parser> dex out

Object Inspection – After mapping, the tool can list objects, e.g., top memory consumers: art-parser> top 20 -d -n Address Allocations ShallowSize NativeSize ClassName 0x70e8d830 1013 24312 9656024064 android.hardware.HardwareBuffer . Specific objects can be searched and their reference graphs printed.

Technical System – The workflow bridges kernel‑level core extraction with user‑level ART analysis, requiring manual mapping of .so, .dex, .jar files and handling of missing pages, making it a high‑barrier but powerful debugging technique.

Open‑Source Considerations – Although the author intends to release art‑parser for developers, internal approvals have stalled, leaving the project closed for now.

debuggingAndroidmemory analysisNative CrashCore Dumpart-parser
Rare Earth Juejin Tech Community
Written by

Rare Earth Juejin Tech Community

Juejin, a tech community that helps developers grow.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.