Questions tagged [dex2jar]

Dex2jar is a set of tools to work with Android .dex and java .class files.

Tools to work with Android .dex and java .class files

  • dex-reader/writer: Read/write the Dalvik Executable (.dex) file. It has a light weight API similar with ASM.
  • d2j-dex2jar: Convert .dex file to .class files (zipped as jar).
  • smali/baksmali: disassemble dex to smali files and assemble dex from smali files. Different implementation to smali/baksmali, same syntax, but with support to escape in type desc "Lcom/dex2jar\t\u1234;"
  • other tools: d2j-decrypt-string

Official website

dex2jar

52 questions
2
votes
1 answer

dex2jar and JD-GUI label statements

I used dex2jar to get jar from an apk and to view it used JD-GUI . But I notice there are label symbols such as following, if (this.data.length != 7) break label279; // more code here label279: short[] aos = { 0, 0…
nish1013
  • 3,658
  • 8
  • 33
  • 46
2
votes
1 answer

Error with dex2jar classes.dex file for reverse engineering of apk file

I am trying to extract the source code from an apk file and I am following the following steps Is there a way to get the source code from an APK file? My problem is that when I execute the command dex2jar classes.dex I get a file not found…
user1844638
  • 1,067
  • 3
  • 23
  • 48
2
votes
1 answer

During Reversed Engineering of htc android application

I am trying to decode htc's messaging app's apk file using dex2jar and apk-tools . I reversed more than 30 apps perfectly without any trouble ! but I can't do same thing with htc's app ! can any one help me to get out of this problem? Problem 1…
Hardik Thaker
  • 3,050
  • 1
  • 27
  • 37
1
vote
0 answers

I trying to convert .apk to .jar file in cmd it shows following error

I tried to convert .apk file to .jar file using dex2jar in cmd and it say "java.nio.file.nosuchfileexception:" I was expecting it to convert into .jar file
1
vote
2 answers

Alternate method to reversing than reading smali code?

I am reversing an android app. I want to modify and rebuild it. I used APK Studio (which is pretty much a GUI version of apktool) to get the files inside the apk. Now reading smali code is very difficult. I also tried to unzip it, get classes.dex,…
hp2505
  • 95
  • 2
  • 6
1
vote
1 answer

What magic do I need to read an APK with dex2jar?

I'm trying to use dex2jar to read a dex file (an Android APK) in a plain Java app. I have a file object to the APK and then simply call new DexFileReader(dex) However this throws the following exception "not support…
Nick Cardoso
  • 20,807
  • 14
  • 73
  • 124
1
vote
0 answers

dex2jar error: handleHotSwapPatch + FragmentManagerImpl

I tried to access codes of my deleted app by apk got from emulator. I accessed classes.dex but there is a problem making it jar by dex2jar. This is really important for me, how to fix that? The error file below: Summary version: reader-1.15,…
1
vote
2 answers

converting java files into .jar and make it .dex

I'm trying to edit an .apk file changing some variables or adding some functions in java files in it. So, firstly, I used apktool to decompile the .apk. Then, I used dex2jar to make classes.dex to classes.jar and used jd-gui for reading the file. As…
Mark Yoon
  • 330
  • 4
  • 17
1
vote
2 answers

Writing output of dex2jar to other folder

I am trying to write a batch file that writes the classes-dex2jar.jar to some other folder. I tried the following: d2j-dex2jar %arg1% -o %arg2% Here, arg1 is the path to classes.dex and arg2 is the folder where I wish to store the generated…
user3792329
  • 141
  • 8
1
vote
2 answers

Converted dex2jar to .jar file. However results are empty in JD GUI

I have converted my dex file from apk to to a jar file Steps: Change xyz.apk to xyz.zip Extract xyz.zip Copy classes.dex to my dex2jar folder Drag and release clases.dex onto dex2jar.abat Classes_dex2jar.jar is created Open…
yitch
  • 21
  • 1
  • 2
1
vote
1 answer

Eclipse Android Imported existing projects Accidently replaced and project all gone

I updated the ADT and imported the projects. Unfortunately, I replaced the projects/folder. All of sudden, all the files in the folder became 0 bytes, including files in sub folders and all the current auto backups. Is there any other way to…
Kapil M
  • 63
  • 1
  • 9
1
vote
1 answer

Convert .dex file to .jar file using dex2jar

I have made an application that converts .dex file to .jar file using the library dex2jar. the code is given as follows: import com.googlecode.dex2jar.v3.Main; { String apkPath = "D://myapk.apk" ; Main.main(apkPath); } this code block works…
droidev
  • 7,352
  • 11
  • 62
  • 94
1
vote
2 answers

How to extract java files from .apk file

Unfortunately I deleted my Android source code. Tried to get jar using dex2jar and baksmali and used jd-gui to get java source files using my .apk file. Yes I got the files but the problem I have is, in more places in the java file, the code is in…
Joseph
  • 1,060
  • 3
  • 22
  • 53
1
vote
1 answer

How to programmaticaly decompile values into source literal?

I'm busy with a simple decompiler for Android. I want to make a nice decompiled view. I use dex2jar. Let's say I have a field declaration: public byte[] test = new byte[2]; With the FieldVisitor I get: public as modifier byte[] as type test as…
Peterdk
  • 15,625
  • 20
  • 101
  • 140
0
votes
1 answer

How to run a .jar output from dex2jar?

I just decompiled an .apk file to .jar using dex2jar. However, I cannot execute the output file. Instead I get the error: "Invalid or corrupt jarfile" I tried dex2jar 2.0 and 2.1 and I'm using the newest version of Java. Is there a way to execute…