Proguard retrace isnt mapping the stack trace to t

2019-04-28 13:54发布

I have been using the eclipse built in proguard tool to obsucate the code, which Works fine. However when I try to retrace the stack trace of the obfuscated code, retrace doesn't output an un-obfuscated stacktrace.

I have double check the mapping.txt to sure that i am using the right 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.g.f.a(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

2条回答
来,给爷笑一个
2楼-- · 2019-04-28 14:22

ProGuard's ReTrace tool by default expects the stack traces to be nicely formatted, the way they are printed out by java. This means that it expects line breaks in the proper places and no prefixes like "ERROR/AndroidRuntime(19398)".

Alternatively, you can modify the regular expression that ReTrace uses for parsing the stack traces.

查看更多
手持菜刀,她持情操
3楼-- · 2019-04-28 14:32

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

查看更多
登录 后发表回答