Home » Android » android – Proguard retrace output confusion

android – Proguard retrace output confusion

Posted by: admin June 15, 2020 Leave a comment

Questions:

I have here a stack trace from one of my games from android market. I have de-proguarded it but I can’t really understand it!

I’m not asking for help in the error itself, but just how to interpret this.

I started with this from Market:

java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:299)
at com.a.a.k.o.a(Unknown Source)
at com.a.a.k.w.a(Unknown Source)
at com.a.a.k.w.onDrawFrame(Unknown Source)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)

But retrace.bat has output this, which is longer, so I can’t tell what com.a.a.k.o.a is (for exmaple).

java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:299)
at com.eaw.graphics.WorldViewShader.void glSetMVPMatrix(float[])(Unknown Source)
                                    void glSetNormalMatrix(com.eaw.graphics.AMatrix)
                                    void SetVertices(java.nio.FloatBuffer)
                                    void ApplyArgs(com.eaw.graphics.WorldViewShaderArgs)
at com.eaw.graphics.TriangleRenderer.void onDrawFrame(com.eaw.airrace.ILayer,com.eaw.airrace.StepOutput,boolean)(Unknown Source)
                                     void loadTexture$332cd44f(int[],int,int)
                                     void delayedLoadTexture(int[],int[],int,int)
at com.eaw.graphics.TriangleRenderer.void onDrawFrame(javax.microedition.khronos.opengles.GL10)(Unknown Source)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)

Has it rolled 4 functions into 1 during obscuration? or what?

How to&Answers:

Your processed code and stack trace doesn’t contain line numbers, so ProGuard can’t tell to which original method name the obfuscated method name ‘a’ corresponds. It then prints out all possible alternatives. Cfr. ProGuard’s Retrace manual.

The manual also documents how you can preserve line numbers in the obfuscation step.

Answer:

You should add -keepattributes SourceFile,LineNumberTable to your proguard configuration file!