java-deobfuscator / deobfuscator

The real deal
https://javadeobfuscator.com
Apache License 2.0
1.59k stars 295 forks source link

Question: how to exclude certain classes from deobfuscation #839

Closed ghost closed 3 years ago

ghost commented 3 years ago

Is it possible to exclude certain classes from deobfuscation? If so how? I was unable to find any documentation on this. Additionally, what is a -path file for the method normalizer? What is that file supposed to have in it?

Janmm14 commented 3 years ago

Excluding certain classes from deobfuscation is not possible via any configuration setting.

What you could to is manually split the jar you have up into two. 1 contains the classes you want to deobfuscate to be used as input, the other one with the classes you want unchanged will be added to the path. Afterwards you copy contents from jar 2 to the output jar manually. (jars are zip files)


path refers to a list of libraries (including the java runtime library rt.jar) to be specified as seen on the bottom here: https://github.com/java-deobfuscator/deobfuscator/wiki/Getting-Started

Background info: The - of -path refers to the old system where everything was on the command line and not in a config file.

ghost commented 3 years ago

I have the rt.jar and my libraries added, and other transformers work fine, but when I use the MethodRenamer transformer it gives me this:

** DO NOT OPEN AN ISSUE ON GITHUB **
Could not locate a class file.
Have you added the necessary files to the -path argument?
The error was:
com.javadeobfuscator.deobfuscator.exceptions.NoClassInPathException: com/google/common/io/LineProcessor
    at com.javadeobfuscator.deobfuscator.Deobfuscator.assureLoaded(Deobfuscator.java:487)
    at com.javadeobfuscator.deobfuscator.Deobfuscator.loadHierachy(Deobfuscator.java:569)

is It looking for some sort of list of names to rename to?

Janmm14 commented 3 years ago

So do you have guava in your libraries?

ghost commented 3 years ago

now it wants com/sun/jna

ghost commented 3 years ago

now net/minecraft/launchwrapper

ghost commented 3 years ago

how many does it need?

ghost commented 3 years ago

is there a list somewhere with all the jars that are needed? I have like 8 libraries added plus the rt.jar path

ghost commented 3 years ago

resolved