Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
382 views
in Technique[技术] by (71.8m points)

proguard - How do you interpret a deobfuscated Android crash report?

I downloaded a crash report from my app's Google Play admin area, ran it through retrace.sh to deobfuscate the Proguard mapping, and it produced the output below.

Questions:

What is Unknown Source?

showHeader, showPhoto, etc. are indeed methods in my SummaryFragment class, but why are they listed in the order shown? These methods do not follow any sort of logical or execution order in my code.

In which method was the NPE actually thrown?

Caused by: java.lang.NullPointerException
at com.myapp.SummaryFragment.selectMenuItemAuth(Unknown Source)
                                             showHeader
                                             photoButtonClicked
                                             showPhoto
                                             nameButtonClicked
                                             deleteByID
                                             access$0
at com.myapp.SummaryFragment.onActivityCreated(Unknown Source)
at android.support.v4.app.Fragment.performActivityCreated(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
                                              moveToState
                                              moveToState
                                              moveToState
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

ProGuard has removed the optional attributes SourceFile and LineNumberTable from the obfuscated application. As a result, the stack traces don't have line numbers, causing some ambiguity. ReTrace prints out a list of possible alternatives for each line of the stack trace.

You can get stack traces that are easier to interpret by adding the following lines to your proguard-project.txt:

-renamesourcefileattribute MyApplication
-keepattributes SourceFile,LineNumberTable

See the ProGuard manual > ReTrace > Usage.

See the ProGuard manual > Examples > Producing useful stack traces


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...