1. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

Cheat Sheet: How To Decode ProGuard’s Obfuscated Code From Stack Trace

Discussion in 'Android App Developers' started by danialgoodwin, Nov 21, 2013.

  1. danialgoodwin
    Offline

    danialgoodwin New Member

    Joined:
    Aug 31, 2013
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Tampa, FL
    Recently, I wrote a blog post for Android devs that use ProGuard. If you ever needed to debug obfuscated stack traces, then this cheat sheet is for you. By the end of this, you will have a more human-readable stacktrace. I'm bringing it up because I have to keep referring to it every time in order to remember the right command line syntax. And, I spent quite a bit of time looking up how to do this so that hopefully others won't have to waste as much time as me.

    There are two ways of de-obfuscating the stack trace -- command line and GUI (Graphical User Interface):

    GUI METHOD
    1) Open <android-sdk>/tools/proguard/bin/proguardgui.bat
    2) Select the “ReTrace” option on the left column.
    3) Add your mapping file and obfuscated stack trace.
    4) Click “ReTrace!”


    COMMAND LINE METHOD
    1) You will need your ProGuard’s mapping.txt file and the stack trace (Ex: stacktrace.txt) that you want to de-obfuscate.
    2) The easiest way to do the next step is copy both these files into your <android_sdk_root>/tools/proguard/bin.
    3) If you are on Windows, run the following command in the same directory as the files (make sure you change to your own file names):

    Code:
    retrace.bat -verbose mapping.txt stacktrace.txt > out.txt
    4) out.txt will have the stack trace de-obfuscated. Now you can debug much easier and faster than before. ;)


    Source (includes pictures): Simply Advanced | Android: How To Decode ProGuard?s Obfuscated Code From Stack Trace


    Let me know if you have any problems, questions, or suggestions for this small cheat sheet.
    - Danial Goodwin -
    Last edited: Nov 22, 2013
  2. Rickey65
    Offline

    Rickey65 New Member

    Joined:
    Dec 24, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for info.
  3. danialgoodwin
    Offline

    danialgoodwin New Member

    Joined:
    Aug 31, 2013
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Tampa, FL
    No problem. Glad I could help.
Search tags for this page

android debug stack trace proguard

,

android troubleshooting proguard stack trace

,

best android obfuscator

,

how to de-obfuscated proguard