2

Are there ways to decompile obfuscated dex/jar files into Java source code? I have an APK with no classes.dex file within it, but I have the odex file. I've tried using oat2dex and dex2jar to get the dex/jar files, and then used a few decompilers to get the Java source, but I'm either getting errors on some parts, or really hard to read code since it's obfuscated.

Here's what I've tried

  • JD-GUI (first I've tried that completed decompilation, but with multiple errors)
  • Fernflower (couldn't complete)
  • Procyon (pretty good, but with some errors)
  • CFR (better, but with some errors)
  • Jadx (best, with least errors, but code is still obfuscated and hard to read, with multiple classes/methods with the same random names)

What can I do to get more readable code?

5
  • Why are you decompiling obfuscated code? Making this difficult is the purpose of obfuscation tools. Commented Apr 26, 2016 at 4:09
  • If there is a good one, i think people will stop obfuscating their code. Commented Apr 26, 2016 at 4:14
  • So am I right to say there's no solution? Commented Apr 26, 2016 at 4:17
  • The Krakatau decompiler is specifically designed for handling obfuscated code. However, there's nothing that will magically fix gibberish names. Commented Apr 26, 2016 at 4:36
  • To "Fix" gibberish names you'll have to manually remap classes with a deobfuscator program like Enigma. Or if you can use a decompiler to get the source, you can do that all in your IDE (but it does take longer to do this). Commented Apr 27, 2016 at 1:16

1 Answer 1

4

There isn't any magical tool that will refactor all your obfuscated code into something meaningful and "clean". Obfuscated code is obfuscated: deal with it.

You can however save the obfuscated source code, create a project with your prefered ide (that support refactor) and manually analize functions and variables and refactor them to something meaninful. This require a lot of time, but eventually you will obtain an almost clean source code.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.