8000 GitHub - neocanable/garlic: Java decompiler written in C
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

neocanable/garlic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

garlic-decompiler

License

Java decompiler written in C

Tool for produces java source code from .class or jar file

Features

  • decompile .class file
  • decompile jar file
  • decompile war file

Build

requirements: cmake >= 3.26

No other dependencies

git clone https://github.com/neocanable/garlic.git
cd garlic
cmake -B build
cmake --build build
./build/garlic

Usage

  • decompile .class file

    decompile .class file, default output is stdout

    garlic /path/to/jvm.class
  • decompile jar file

    garlic /path/to/file.jar
    
    garlic /path/to/file.jar -o /path/to/save # -o option is source code output path
    
    garlic /path/to/file.jar -t 5             # -t option is thread count, default is 4

    default output is same level directory as the file

  • javap

    like javap, more faster, disabled LineNumber and StackMapTable attributes

    garlic /path/to/jvm.class -p
  • dexdump

    garlic /path/to/dalvik.dex -p           # only support dexdump
    

Debug

in src/jvm.c, change main function to:

int main(int argc, char **argv)
{
    jar_file_analyse(path_of_jar, out_of_jar, 1);
    return 0;
}

if thread count less than 2, it will disable multiple thread.


Licensed under the Apache 2.0 License

0