Proguard retrace does not map stack trace to actual source

I use eclipse built into the proguard tool to judge code that works great. However, when I try to restore the stack trace of running code, retrace does not output un-obfuscated stacktrace.

I double-check map.txt to make sure I'm using the correct one.

here is my stack trace

ERROR/AndroidRuntime(19398): FATAL EXCEPTION: Thread-35 ERROR/AndroidRuntime(19398): java.lang.NullPointerException ERROR/AndroidRuntime(19398): at android.graphics.Canvas.throwIfRecycled(Canvas.java:954) ERROR/AndroidRuntime(19398): at android.graphics.Canvas.drawBitmap(Canvas.java:980) ERROR/AndroidRuntime(19398): at com.excelectronic.b.aa.a(ProGuard:535) ERROR/AndroidRuntime(19398): at com.excelectronic.gfa(ProGuard:220) ERROR/AndroidRuntime(19398): at com.excelectronic.game.GameView.a(ProGuard:198) ERROR/AndroidRuntime(19398): at com.excelectronic.game.GameView.onDraw(ProGuard:98) ERROR/AndroidRuntime(19398): at com.excelectronic.game.ac.run(ProGuard:121) 

and using the command

 retrace.bat -verbose mapping.txt obfuscated_trace.txt 
+6
source share
2 answers

The ProGuard ReTrace tool by default expects stack traces to be well formatted as they are printed by java. This means that it expects line breaks in appropriate places and without prefixes like "ERROR / AndroidRuntime (19398)".

Alternatively, you can modify the regular expression used by ReTrace to parse stack traces.

+15
source

Use traceview to retrieve the original Java stack trace before using ReTrace.

+1
source

Source: https://habr.com/ru/post/889946/


All Articles