Omer Levi Hevroni
Omer Levi Hevroni

Reputation: 1997

What is the difference between akpanalyzer and dex2jar?

While working on adding obfuscation to an android mobile application, I tried to tests the generated APK and make sure the code is obfuscated. I did that with 2 different tools - apkanalyzer and dex2jar (following this guide). I used apkanalyzer to get all the classes with the following command:

apkanalyzer dex packages myapp.apk

When inspecting the classes names, it was looked like the obfuscation is worked as expected. But when I inspected the results of dex2jar (using JD-Gui), it looks like the obfuscation is not working - all classes names kept.

To make sure proguard is working, I checked - mapping.txt and seeds.txt created successfully. I also check one class that appeared on mapping.txt (and therefore should be obfuscated) - but on JD-Gui it appear with the real name, and not obfuscated.

My question is: why there is a difference between apkanalyzer and dex2jar output? And which tool produce the right output?

Edit: I tested it on a demo project and wasn't able to reproduce this behavior. This means that something is weird with how our app is configured.

Thanks in advance!

Omer

Upvotes: 0

Views: 300

Answers (1)

Omer Levi Hevroni
Omer Levi Hevroni

Reputation: 1997

I tried it again this morning, after closing and opening JD Gui. Now I can see the obfuscated code correctly also on JD Gui, so there is no issue.

Upvotes: 0

Related Questions