Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics retrace Proguard

How do I retrace my Proguard Android App with the Crash report in Google Analytics. A few examples as follows:

Note: when crash reports are done by the User with the Google App Console, I can use retrace OK with the mapping.txt file.

Examples (from Google Analytics Behavior Crashes and Exceptions)

  • RuntimeException (@a:a:-1) {main}

  • IllegalStateException (@f:a:-1) {main}

  • NullPointerException (@MainActivity:M:-1) {main}

  • NullPointerException (@a:l:-1) {main}

  • NullPointerException (@al:run:-1) {main}

like image 651
user2051851 Avatar asked Nov 15 '13 17:11

user2051851


1 Answers

I just started gathering statistics, and ran into this myself. From an exception that happened to me on a not-obfuscated apk, the syntax seems to be:

exception-name (@class-name:method-name:line-number) {thread-name}
  • class-name: If this is obfuscated, then you're usually stuck, because the package name is not reported. Sometimes you might be able to find the class, like in your 'al' example, because most packages wont have that many classes (search for '-> al').
  • method-name: If the class-name isn't obfuscated (some class names have to be excluded from obfuscation for the app to work) you can try to look up the method in the mappings.txt. Often there'll be multiple methods with the same mapping (but different calling signatures). As you can not distinguish between them, then you'll have to check them all to see if they could have caused the exception.
  • Line number: this of no use since it is is obfuscated (-1).

Conclusion: with the standard reporting, most of the time you wont be able to find out what caused the exception. There seems to be the possibility to set up a custom exception parser, possibly allowing you to include the full stack frame. I have not tried this yet, but found a promissing description in this answer.

like image 152
Ewout Avatar answered Oct 21 '22 18:10

Ewout