Skip to content
Simple util for Android and iOS native crashes desymbolication
Branch: master
Clone or download
Latest commit dc9c139 Jan 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Dirty initial commit for new version (0.3.0) Nov 8, 2017
bin
build Fixed Cognitive Complexity issue. Nov 26, 2017
lib Version bump Jan 25, 2019
spec Fix java trace parser issues Jan 25, 2019
.gitignore Moving built gem to `.out` folder when calling `rake gem:build` Nov 26, 2017
.rspec Added Router and AndroidRouter implementations Nov 8, 2017
.rubocop.yml
.travis.yml Support of Ruby 2.2 has ended Oct 31, 2018
.yardopts Using yard for documentation Nov 10, 2017
Changelog.md
Gemfile Update Rubocop to 0.60.* . Misc style updates Oct 31, 2018
Gemfile.lock
LICENCE Added LICENCE Nov 10, 2017
Rakefile Use require 'bundler/setup' in Rakefile Oct 31, 2018
Readme.md Fixed type in Readme.md Nov 27, 2017
Roadmap.md Updated Readme.md, added Roadmap.md, misc android fixes Nov 10, 2017
tracetool.gemspec Added github repo as gem homepage Nov 11, 2017

Readme.md

Tracetool

Gem Coverage Status Code Climate Build Status

Synopsis

tracetool is a tiny tool that makes easier process of desymbolication Android and iOS crash reports.

Installing

To install tracetool, use the following command:

$ gem install tracetool

Alternatively, if you've checked the source out directly, you can call

rake gem:install

from the root project directory.

Usage

tracetool Command-line Tool

tracetool accepts trace content through STDIN or from file. Tool configuration is passed through command line arguments. Android and iOS modes are assuming certain symbols layout.

Unpacking Android Native Traces

You need ndk-stack in your PATH to use this feature. See Android NDK | ndk-stack for more information.

To process native Android stack trace you need to pass following CLI arguments:

  • --platform android - switch to Android mode
  • --symbols %path% - specify compilation symbols location. You need to specify path to local/%abi% directory rest of the path will be evaluated. If no --symbols argument passed current directory assumed to be compilation symbols location.
  • --arch - valid Android architecture. This value is added to path.
Supported formats

In Android mode tracetool supports several formats. Main purpose here is to automatically generate well-formed stack trace and pass it to ndk-stack

  • Plain logcat trace:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: UNKNOWN
pid: 0, tid: 0
signal 0 (UNKNOWN)
backtrace:
       #00  pc 0000841e  /data/local/ndk-tests/crasher
       #01  pc 000083fe  /data/local/ndk-tests/crasher
       #02  pc 000083f6  /data/local/ndk-tests/crasher
       #03  pc 000191ac  /system/lib/libc.so
       #04  pc 000083ea  /data/local/ndk-tests/crasher
       #05  pc 00008458  /data/local/ndk-tests/crasher
       #06  pc 0000d362  /system/lib/libc.so
  • Striped trace from Google Play dashboard:
backtrace:
      native: pc 00000000004321ec  libvizornative.so
      native: pc 000000000042db8d  libvizornative.so
      native: pc 0000000000c35865  base.odex
  • Packed stack trace (this is internal feature and will be dropped in future releases):
<<<12345678 foo.so __bar 42;12345678 foo.so __bar 42;>>>

Here addresses .so-names packed in ; separated string.

Unpacking Android Java Traces

This feature is useless at the moment

Unpacking iOS traces

You need MacOS and atos (XCode Tools) to use this feature. See man atos for more information.

To desymbolicate iOS traces you need to pass following arguments:

  • --symbols - directory containing dSYMs/%AppName%.app.dSYM/Contents/Resources/DWARF/%AppName%. If no --symbols specified tracetool will use current directory
  • --arch - valid iOS arch (x86_64 or arm64)
  • --address - application load address
  • --module - your application name.

To learn more about load address see Understanding and Analyzing Application Crash Reports

Supported trace formats

In iOS mode tracetool recognizes only thread stack trace format:

0  Foo                                 0x00000001029b2d48 Foo + 159048
1  Foo                                 0x00000001029b37d0 Foo + 161744
2  libsystem_platform.dylib            0x00000001857dbb44 _sigtramp + 52
3  Foo                                 0x0000000102cf6178 Foo + 3580280
4  Foo                                 0x0000000102cc36c0 Foo + 3372736
5  UIKit                               0x000000018efc4078 <redacted> + 340

Changelog

See Changelog.md for a list of changes.

Roadmap

See Roadmap.md for a list of scheduled features and changes.

License

tracetool is licensed under the MIT licence. Please see the LICENCE for more information.

You can’t perform that action at this time.