Sando
Sando

Reputation: 1881

How to use retrace.bat to get the stack trace of obfuscated code in android

I am using retrace.bat -verbose mapping.txt obfuscated_trace.txt at the command prompt.

But it's showing the error message: retrace.bat is not recognized as an internal command.

How do I fix that error?

Upvotes: 3

Views: 3101

Answers (3)

Harish Reddy
Harish Reddy

Reputation: 992

Please follow the below points.

  1. open the terminal/cmd

  2. cd **/sdk/tools/proguard/bin/proguardgui.jar

  3. refer the attached image, retrace GUI pop's up

  4. select your mapping file and copy-paste your obfuscated stacktrace

That's it. Simple and easy

enter image description here

Upvotes: 4

Jon Adams
Jon Adams

Reputation: 25137

If your current path at the command prompt is not the same as the bat file, and if the bat file path is not in your environment PATH, then you will get this error.

Either add the Android SDK Proguard bin path to your environment PATH, point to it directly during the call, or go to that path first:

SET PATH=%PATH%;[path to Android SDK]\tools\proguard\bin

(for example: SET PATH=%PATH%;C:\android-sdk-windows\tools\proguard\bin)

Or to specify the path at the call:

C:\android-sdk-windows\tools\proguard\bin\retrace.bat -verbose mapping.txt obfuscated_trace.txt

Or go to the path first:

cd C:\android-sdk-windows\tools\proguard\bin\
retrace.bat -verbose "path\to\mapping.txt" "\path\to\obfuscated_trace.txt"

Upvotes: 2

ben or
ben or

Reputation: 652

you don't need to write the .bat when you call retrace.bat, so write

retrace -verbose mapping.txt obfuscated_trace.txt

and maybe you are not in the current path, you should be at

...\android-sdk-windows\tools\proguard\bin

Upvotes: 2

Related Questions