1

I've been playing around with reverse engineering and I am having trouble recompiling after making an edit.

I first used apktool:

apktool d input.apk out
apktool b out

I then used dex2jar to convert classes.dex to jar then used JD-GUI to extract the java files. I went in and changed one string value so that everything would still be perserved but could see if it worked, so the code should all work. So I have the folder of the .java file called 'classes' and I've tried to use DX to convert back to a dex file. I enter:

dx --dex classes --no-strict

and get these errors: enter image description here

Nick
  • 9,285
  • 33
  • 104
  • 147

1 Answers1

4

Your ordering is a little off and you need to specify directories as an absolute path for the tool to recognize them. Try

dx --dex --output C:/Users/SkyNet/Desktop/new_dex_file.dex C:/Users/SkyNet/Desktop/classes

That should make a new_dex_file.dex file on your desktop from the classes folder than is on your desktop.

Justin Breitfeller
  • 13,737
  • 4
  • 39
  • 47
  • That resolved both errors, thankyou. However now it's saying "noclassfiles specified". I have path to the dir holding all .java files which has subfolders, would this cause that problem? – Nick Apr 21 '12 at 18:03
  • You need to compile your java files first into .class files. See javac on how to do this. – Justin Breitfeller Apr 21 '12 at 18:20