1

I was going through the Stack Overflow question decompiling DEX into Java sourcecode. I was successfully able to decompile the apk file, and I made some changes in the Java code.

I converted them successfully to smali files so that apktool can repack the app. But it gave me undefined kind of errors. I used a Hello, World! example for time being.

Is it possible? Or did I go somewhere wrong? Is there any alternate method is possible for it?

Community
  • 1
  • 1

1 Answers1

2

Using dex2jar and a decompiler will produce something vaguely resembling Java source code. Don't expect the result to be compilable, or to actually match the original logic.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
JesusFreke
  • 19,784
  • 5
  • 65
  • 68
  • I know its vaguely resembled java code. And I am not expecting any result. I just want to know whether I can successfully get an apk or not? Because according to apktool it generates the smali files while decompiling an apk and from these smali files it gives back us the apk. – Amritanshu Agrawal Jun 15 '13 at 08:13
  • There's no need to use apktool if you're not modifying resources. Just use smali to generate a new dex file and replace classes.dex in the apk, and resign the apk. – JesusFreke Jun 16 '13 at 00:20