jd-gui | A standalone Java Decompiler GUI
kandi X-RAY | jd-gui Summary
kandi X-RAY | jd-gui Summary
JD-GUI is a standalone graphical utility that displays Java source codes of ".class" files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Download the source jar file .
- Appends a signature .
- Create a type from an entry .
- Returns a set of matching outer types entries .
- Removes inner type entries from the given container .
- Resolves the internal type name for internal types .
- Matches the query and adds it to a list of document ranges .
- Creates a parent tree node .
- Display the given list of files
- Opens a URI
jd-gui Key Features
jd-gui Examples and Code Snippets
Community Discussions
Trending Discussions on jd-gui
QUESTION
I add a aar
to xamarin.binding but it generate two same event
and I use jd-gui
and find that there is only one interface in the aar
how to remove one in the metadata.xml?
I know how to change the others but do not know how to remove one event
I know the manageType and manageReturn can change something but it can not remove the event.
the path of the event
I can not find it right.
path="/api/package[@name='com.xxx.A']/class[@name='C']/interface[@name='OnBLisntener']
is not right .
ANSWER
Answered 2021-Apr-04 at 21:33This is covered in Troubleshooting Bindings / Problem: Duplicate custom EventArgs types
To avoid these conflicts, some metadata transformation is required. Edit Transforms\Metadata.xml and add an argsType attribute on either of the interfaces (or on the interface method):
QUESTION
I found out that an executable jar file can be decompiled to retrieve the original source code using Java Decompiler, which allows decompiling and browsing the source with the JD-GUI.
I'm trying to obfuscate a jar file to protect it from retrieving the original source code.
I have tried proguard but sounds a little bit time consuming!! I then tried IntelliGuard 2 plugin but there was no information about what proguard and yguard and how to use them!!
I read some resources that I need to generate an Ant build file for proguard or yguard to be able to obfuscate the jar file. Then I stuck a little bit on generating a jar file to obfuscate.
Is there an easy and straightforward way to generate a jar and obfuscate it?
...ANSWER
Answered 2021-Mar-25 at 14:42I have been trying to obfuscate a jar file to protect it from retrieving the original source code.
Obfuscation in Intellij requires IntelliGuard 2 plugin and yuguard 3.0.0 (preferably yguard-bundle-3.0.0.zip).
The obfuscation process :
Generate Module out of the project: File --> project settings --> Modules ( + new module and set proper out path)
Generate jar file using Artifacts: File --> project settings --> Artifacts ( + JAR and naming configuration)
Obfuscate the jar file: File --> project settings --> Facets( + Obfuscation ), then choose the path to ygurad-bundle/lib/yuguard.jar, and choose the main class. See illustrating image below:
Afterward, build Artifacts (build--> build Artifacts), then Obfuscate the jar file ( build--> obfuscate jar, then choose the input jar and the output obfuscated jar).
I couldn't find another way or resource to follow and do it the easy way, so I decided to share my experience.
QUESTION
I have de-compiled a Java project using JD-GUI, and was surprised when I saw that all identifiers are using Java reserved keywords such as int do throw extends etc..
Here is a snippet of the project:
...ANSWER
Answered 2021-Feb-24 at 01:00While reserved words may not occur in Java source code, they are permitted in compiled Java code. Some code obfuscation tools can make use of this to make decompiling harder. For instance, ProGuard provides the following option:
-obfuscationdictionary filename
Specifies a text file from which all valid words are used as obfuscated field and method names. By default, short names like 'a', 'b', etc. are used as obfuscated names. With an obfuscation dictionary, you can specify a list of reserved key words, or identifiers with foreign characters, for instance. White space, punctuation characters, duplicate words, and comments after a# sign are ignored. Note that an obfuscation dictionary hardly improves the obfuscation. Decent compilers can automatically replace them, and the effect can fairly simply be undone by obfuscating again with simpler names. The most useful application is specifying strings that are typically already present in class files (such as 'Code'), thus reducing the class file sizes just a little bit more. Only applicable when obfuscating.
So if you feed this a list with Java identifiers (such as this one) you end up with a class file that causes syntax errors if decompiled. Of course, you can simply rename the variables to fix these compilation errors (for instance by using ProGuard yourself before decompiling), so this is only a minor inconvenience.
QUESTION
When using Proguard some methods bodies are replaced by this:
...ANSWER
Answered 2021-Feb-22 at 17:36There is no difference in what ProGuard does between these two methods.
The difference is in the tool you're using to read ProGuard's output: what bytecode it can and can't decompile to make it look like normal Java source.
QUESTION
First of all, sorry for my english. This is not my native language. This is the first time I do something like that so i learn on the go.
Context: I try to understand how the game I installed from the Play store communicates with the server. More precisely, how a specific parameter is set on a every POST request to the server.
This HTTP parameter called 'secret' cannot be reversed engineer easily as it is a kind of hash of the others parameters to check the integrity of the request.
What i've done:
- I extracted the .dex files from the .apk
- I used d2j-dex2jar to extract the .class files.
- I used jd-gui tool to analyse the source code
What i've found: This is the source code that generates the value for the 'secret' parameter:
...ANSWER
Answered 2020-Jul-13 at 17:51Answer to question 1:
I found that multiple .apk were installed for the game. My error was to trust the app Apk Extractor that gave me only the base .apk
I connect through SSH to my phone and list all the .apk installed. Several .apk were installed in the /data/app/ folder of my game !
- One was dedicated to the base source code (the one i got from Apk Extractor)
- One .apk that store only the native libraries (libMain.so)
Answer to question 2:
I used the command readelf -s libMain.so | grep '
to retrieve the function address. The output was something like that 00000000003c69b4
readelf -h libMain.so
: gave me the architecture in which the library has been built aka AArch64.
I downloaded the same toolchain that has been used to compile the binary:
$> sudo apt-get install binutils-aarch64-linux-gnu
And then used it with this command:
$> aarch64-linux-gnu-objdump -d libMain.so --start-address=0x3c69b4
The start-adress value is set with the return value of the first command
And now i have assembly code that i need to reverse engineer !
QUESTION
I have decompiled a jar (it's a pretty complex app written in an old Java version) using JD-GUI and put the java files into Eclipse along with all the required external libraries (jars). The problem is I get a lot of errors about methods not working for a specific type, errors about access$0 and many other issues.
Why is this happening? Is it impossible to decompile complex jars and open the project in Eclipse?
I get errors that the methods used are not available for some types, The method access$0(...) is undefined for the type ...
...ANSWER
Answered 2020-Jun-08 at 14:34Why is this happening?
It is happening because the decompiler is not able to figure out Java source code that will compile to equivalent bytecodes.
The task for a decompiler is difficult. When the compiler compiles Java source code to bytecodes, a lot of information is thrown away. It is not just the obvious stuff like comments, indentation and local variable names. It is also the particular choices that were made about control structures. In addition, there are various situations where the compiler has to insert synthetic methods or fields.
A decompiler has to do two sometimes contradictory things:
- It has to produce readable code.
- It has to produce code that is (hopefully) compilable and that (hopefully) means the same thing as the bytecodes.
Unfortunately, decompilers don't always get it right. Practical decompilation is heuristic, and the heuristics are not perfect.
Obfuscators make it even harder. Deliberately.
The corollary is that you should not be using decompilation and recompilation in your software development processes.
The best approach is to get hold of the original source code for the JAR you are trying to understand and modify.
Only use decompilation to help you understand other peoples' code if you have no alternative. (For a start, it could well be a license violation. Check to see if the software license forbids reverse engineering, etcetera.)
If you really need to modify bytecodes, use a bytecode disassembler ... and learn to read and edit the Java assembly language.
QUESTION
I ran an APK through dex2jar
and JD-GUI
and found the class I'm interested in:
ANSWER
Answered 2020-May-01 at 12:56This call in Java:
.\u0971("www.google.com", new String[] {"sha256/asdIa1tHg96AnzarJ6GJLu6JiogJla3UDsPWMDICs=" })
is found in smali at:
invoke-virtual {v1, v2, v3}, Lo/bdq$if;->ॱ(Ljava/lang/String;[Ljava/lang/String;)Lo/bdq$if;
The Java class is o.bdq$if
(class if
is nested inside o.bdq
). The method name is ॱ
QUESTION
I am using proguard-maven-plugin in my multi-module maven project with spring boot. By no means, I am not an expert and still learning how to make use of all features provided with ProGuard, so bear with me. ProGuard dependency:
...ANSWER
Answered 2020-Feb-11 at 15:50So, after a bit of struggle, I found a solution to my issue. Firstly, I added a of "provided" (link to docs) to the dependencies I wanted out of the
lib
folder :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jd-gui
"build/libs/jd-gui-x.y.z-min.jar"
"build/distributions/jd-gui-windows-x.y.z.zip"
"build/distributions/jd-gui-osx-x.y.z.tar"
"build/distributions/jd-gui-x.y.z.deb"
"build/distributions/jd-gui-x.y.z.rpm"
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page