Skip to content

Releases: judovana/java-runtime-decompiler

7.0-snapshot.6

16 Oct 14:48
Compare
Choose a tag to compare

7.0-snapshot.6

  • support of jdk8 is becoming problematic
  • updated procyon
  • updated jasm and jcoder (v8)
    • jasm (without -g) have random weird issues
    • jasm and jcoder are now filsesystem-less
  • added jasm variants with -g
  • persisted asmtools v7, add its -g variant
  • decompilers have issues to restruct compilable code
    • => added source-path, to be optionally set if available
    • class avaialable on source path is much more easily "compilable back"
  • runtime bytecode may differ from local one
    • => added additional class-path to be set if available
  • added tools to diff the buffers
  • added tools to apply patch to runtime (still some wok to do)

Ancient side note

  • asmtools 8 do not work with jdk 16 and lower
  • asmtools 7 may not work with newer jdk
    • jasm/jcoder 7 have known issues with lambda

7.0-snapshot.5

14 Jun 15:01
Compare
Choose a tag to compare
7.0-snapshot.5 Pre-release
Pre-release
  • fixed fs vms whch stopped work due to rewroked agents
  • fixed cli's compile whcih stopepd to work due to guessed bytecode level

7.0-snapshot.3

10 Mar 12:55
Compare
Choose a tag to compare
7.0-snapshot.3 Pre-release
Pre-release
  • gui now can detach agents
  • added version reporting from agent
    • both gui and cli
  • Fixed ancient (in scomep of jrd7) issue, vhen decompielrStatus was not checking its agent
  • adde dinitial (not working) gui forattachig custom agents from gui

7.0-snapshot.3

13 Feb 18:16
Compare
Choose a tag to compare
7.0-snapshot.3 Pre-release
Pre-release
  • bumped procyon to 1.0-SNAPSHOT - have many features including multi file finally
  • added procyon disassembler
  • improved decompiler vlaidations
  • decompilers now have help - right now useless, future of decompiler args
  • cli now list agents
  • cli now list/remove overrides
  • list now prints bytecode versions
  • bytecode of just decompiled class is shown
  • bytecode of just decompiled class is forced to compiler (possible to turn off)
  • decomiler can be configured to get only one class, selected class and all its inners, all slected and all its deps bytecodes to process
  • fixed unittests for jdk17
  • fixed issue with bad jvm being used in tests
  • added printstackTrace to code helper

7.0-snapshot.1

08 Jan 09:47
Compare
Choose a tag to compare
7.0-snapshot.1 Pre-release
Pre-release

Agent is niw pernament by default

  • when agent is attached, there is no way to remove it (it was buggy untill now in JRD)
  • our agent is now pernament, and can be connected forever
    • unless its host process ends
    • unless you stop it - the stop close server socket, and remove transformers., nothng else. no magic here
    • gui can clean up on exit

Added JD decompiler

  • is of poor qauality

Added method to list depndencie of class(es)

java-runtime-decompiler-6.1

07 Jan 15:23
Compare
Choose a tag to compare

highlights

  • jdk 8-17 support
  • detailed classinfo - classloader and origin now can be printed
  • init of classes - classes can be initiated if needed
  • override management - overwritten classes can be restored
  • classpathless-compiler now should be feature-completed and by one click working with full setup
  • many gui improvements
  • cli remains future completed with gui
  • gui console (especially for compile errors), but now all what goes wrong is well visible
  • api to insert new fields and variables to overwritten classes. With code completion!
  • filesystem support follows runtime features
  • improved work on classes listing

full log:

Main Features
 * detailed class info
    classloader and origin of class is printed
*   init class - if class is not yet loaded (and thus invisible) by runtime, it can be forcibly initiated
        this is heavily used by runtime classapthless compiler to restore dependencies
        future work in 7.0 is to allow upload of utterly new classes
 * overrides management
    each class which is override by the new bytecode, can be restructured to the original state
        this works also for filesystem work in single gui session
 * runtime (classapth-less) compilation
    With host classes, do not be fatal on failed BYTE command, as it may be system class
    Cli-compile now should get all config  
    Passed --verbose flag to compilers
	the compielr now can get arguments
		eg.: source/target (more to do in this field in 7.0)
        the arguments are persistent, and reused by cli
    use new cplc dependencies
        it now depends on object web asmtools to scan for dependencies in byte code
    Before decompilation with inner classes, all inner classes are activated
    If CPLC is requesting class which do not exists, it tries init it before failing
        for runtime, in FS, it fall-back to host
    Fixed return of untransformed bytecode of overwritten classes
        As it was, our own return, contained original, untransformed byte[]
        Now it returns bytecode correctly in by-us transformed form
 * runtime compiler got api, which can allow to insert new variables
    all global, fields and instance's variables in both synchornised and unsynchronised way are supported
    the complexity goes fro int to any runnable with custom code
    there is code completion for this api, as it is quite complex
 * file system
    FSvm now can list locations (as in class details, just without class-loader)
    nested jars no longer have cache
        Each read now leads to unpack, and each write leads to pack
    Adds option to edit which file extensions are searched as inner jars
        Made nested jar extensions save to config file

Frontend
    quick compile and upload buttons
        by one click you can upload modified code back to running vm!
    many GUI improvements, like LaF, icons, borders...
        Replaced other MainFrameView text-based buttons with icon-based ones
    Improved tip for multi-select
    Made Classlist scroll to the top on reload when nothing is selected
    Added case sensitivity option to Source buffer search
    copypasting of class list - via rich popup menu
		Fixed being able to select multiple classes
	    Implemented right click class list interval selection
	    Copy of (detailed) classes to clipboard is now more customizable
	Added classloader string to class loading with info
    Implemented frontend for loading classes with info
    loading  of decompiled bytecode now have progressbar
    Majorly refactored SettingsView into 3 separate panels to ease future setting additions
    implemented global console
        Plugin compiler is now logging to gui and decompilers in verbose mode too
        In verbose mode, put whole trace to console
        Make globalconsole able to change verbose in runtime
    Extracted Undo and Redo buttons onto the toolbar common for both buffers
    Implemented frontend for CPLC settings
    Implemented frontend for saving FS VMs after JRD closes
    Added 'Remove VM' GUI buttons to remote and FS VM tabs, with backend support
    Made bytecode buffers detachable via a toolbar button
    improved search in both decompiled code and binary
        Added regex support to bytecode search
        Made binary buffer editable by pressing 'Space' or 'Enter'
        Implemented undo and redo functionalities of text fields
        Made both bytecodeSearch and hexSearch text blink red if it was not found
        Implemented bytecode search 'Previous' and 'Next' buttons
        The bytecode search field now uses the same JPanel design as hex search.
        Moved the search bar to the bottom to match hex search.
        Fixed bytecode search match-case discrepancy

Cli
    cli now can print details
    listjvms, listplugins, api now can use saveaas
    Added generation of manpage to image
    Cli now have access to agent api

Development
    Made jdk17 compilable
        on both development and runtime
    Restored source/release 1.8 comaptibility
       jdk11 ramins the latest runtime usable for host
       agnet can be injected to jdk8 and up
    Introduced & configured a Checkstyle-compliant Maven Formatter plugin
    errors from agent now are propagated with trace and messages
    Made agent location overwritable by property org.jrd.agent.jar
	added tests  
		Our tests, requires agent. And theyneed current agent,not somr random
        Building first agent
    Introduced automatic filling of agent path after installation
    Restructured, updated, corrected and expanded the welcome message.
    Added SpotBugs plugin to run when building, but not fail the build
        and fixed really many many issues
    Introduced checkstyle plugin
    Implemented rudimentary GitHub CI
    Corrected frontend package naming
    Renamed packages to use lowercase naming convention and to better correspond with their current use.
    Made decompilers automatically import on a fresh installation
    Implemented sorting of plugins by scope, name

    mvn clean install -Pimages -Plegacy
        so although built by 17, should be jdk8 compatible.

6.0-0.pre.3

03 Jan 16:03
Compare
Choose a tag to compare
6.0-0.pre.3 Pre-release
Pre-release

highlights

  • jdk 8-17 support
  • detailed classinfo - classloader and origin now can be printed
  • init of classes - classes can be initiated if needed
  • override management - overwritten classes can be restored
  • classpathless-compiler now should be feature-completed and by one click working with full setup
  • many gui improvements
  • cli remains future completed with gui
  • gui console (especially for compile errors), but now all what goes wrong is well visible
  • api to insert new fields and variables to overwritten classes. With code completion!
  • filesystem support follows runtime features
  • improved work on classes listing

full log:

Main Features
 * detailed class info
    classloader and origin of class is printed
*   init class - if class is not yet loaded (and thus invisible) by runtime, it can be forcibly initiated
        this is heavily used by runtime classapthless compiler to restore dependencies
        future work in 7.0 is to allow upload of utterly new classes
 * overrides management
    each class which is override by the new bytecode, can be restructured to the original state
        this works also for filesystem work in single gui session
 * runtime (classapth-less) compilation
    With host classes, do not be fatal on failed BYTE command, as it may be system class
    Cli-compile now should get all config  
    Passed --verbose flag to compilers
	the compielr now can get arguments
		eg.: source/target (more to do in this field in 7.0)
        the arguments are persistent, and reused by cli
    use new cplc dependencies
        it now depends on object web asmtools to scan for dependencies in byte code
    Before decompilation with inner classes, all inner classes are activated
    If CPLC is requesting class which do not exists, it tries init it before failing
        for runtime, in FS, it fall-back to host
    Fixed return of untransformed bytecode of overwritten classes
        As it was, our own return, contained original, untransformed byte[]
        Now it returns bytecode correctly in by-us transformed form
 * runtime compiler got api, which can allow to insert new variables
    all global, fields and instance's variables in both synchornised and unsynchronised way are supported
    the complexity goes fro int to any runnable with custom code
    there is code completion for this api, as it is quite complex
 * file system
    FSvm now can list locations (as in class details, just without class-loader)
    nested jars no longer have cache
        Each read now leads to unpack, and each write leads to pack
    Adds option to edit which file extensions are searched as inner jars
        Made nested jar extensions save to config file

Frontend
    quick compile and upload buttons
        by one click you can upload modified code back to running vm!
    many GUI improvements, like LaF, icons, borders...
        Replaced other MainFrameView text-based buttons with icon-based ones
    Improved tip for multi-select
    Made Classlist scroll to the top on reload when nothing is selected
    Added case sensitivity option to Source buffer search
    copypasting of class list - via rich popup menu
		Fixed being able to select multiple classes
	    Implemented right click class list interval selection
	    Copy of (detailed) classes to clipboard is now more customizable
	Added classloader string to class loading with info
    Implemented frontend for loading classes with info
    loading  of decompiled bytecode now have progressbar
    Majorly refactored SettingsView into 3 separate panels to ease future setting additions
    implemented global console
        Plugin compiler is now logging to gui and decompilers in verbose mode too
        In verbose mode, put whole trace to console
        Make globalconsole able to change verbose in runtime
    Extracted Undo and Redo buttons onto the toolbar common for both buffers
    Implemented frontend for CPLC settings
    Implemented frontend for saving FS VMs after JRD closes
    Added 'Remove VM' GUI buttons to remote and FS VM tabs, with backend support
    Made bytecode buffers detachable via a toolbar button
    improved search in both decompiled code and binary
        Added regex support to bytecode search
        Made binary buffer editable by pressing 'Space' or 'Enter'
        Implemented undo and redo functionalities of text fields
        Made both bytecodeSearch and hexSearch text blink red if it was not found
        Implemented bytecode search 'Previous' and 'Next' buttons
        The bytecode search field now uses the same JPanel design as hex search.
        Moved the search bar to the bottom to match hex search.
        Fixed bytecode search match-case discrepancy

Cli
    cli now can print details
    listjvms, listplugins, api now can use saveaas
    Added generation of manpage to image
    Cli now have access to agent api

Development
    Made jdk17 compilable
        on both development and runtime
    Restored source/release 1.8 comaptibility
       jdk11 ramins the latest runtime usable for host
       agnet can be injected to jdk8 and up
    Introduced & configured a Checkstyle-compliant Maven Formatter plugin
    errors from agent now are propagated with trace and messages
    Made agent location overwritable by property org.jrd.agent.jar
	added tests  
		Our tests, requires agent. And theyneed current agent,not somr random
        Building first agent
    Introduced automatic filling of agent path after installation
    Restructured, updated, corrected and expanded the welcome message.
    Added SpotBugs plugin to run when building, but not fail the build
        and fixed really many many issues
    Introduced checkstyle plugin
    Implemented rudimentary GitHub CI
    Corrected frontend package naming
    Renamed packages to use lowercase naming convention and to better correspond with their current use.
    Made decompilers automatically import on a fresh installation
    Implemented sorting of plugins by scope, name

    mvn clean install -Pimages -Plegacy
        so although built by 17, should be jdk8 compatible.

6.0-0.pre.2

13 Dec 12:26
Compare
Choose a tag to compare
6.0-0.pre.2 Pre-release
Pre-release

highlights

  • jdk 8-17 support
  • detailed classinfo - classloader and origin now can be printed
  • init of classes - classes can be initiated if needed
  • override management - overwritten classes can be restored
  • classpathless-compiler now should be feature-completed and by one click working with full setup
  • many gui improvements
  • cli remains future completed with gui
  • gui console (especially for compile errors), but now all what goes wrong is well visible
  • api to insert new fields and variables to overwritten classes. With code completion!
  • filesystem support follows runtime features
  • improved work on classes listing

full log:

Main Features
 * detailed class info
    classloader and origin of class is printed
*   init class - if class is not yet loaded (and thus invisible) by runtime, it can be forcibly initiated
        this is heavily used by runtime classapthless compiler to restore dependencies
        future work in 7.0 is to allow upload of utterly new classes
 * overrides management
    each class which is override by the new bytecode, can be restructured to the original state
        this works also for filesystem work in single gui session
 * runtime (classapth-less) compilation
    With host classes, do not be fatal on failed BYTE command, as it may be system class
    Cli-compile now should get all config  
    Passed --verbose flag to compilers
	the compielr now can get arguments
		eg.: source/target (more to do in this field in 7.0)
        the arguments are persistent, and reused by cli
    use new cplc dependencies
        it now depends on object web asmtools to scan for dependencies in byte code
    Before decompilation with inner classes, all inner classes are activated
    If CPLC is requesting class which do not exists, it tries init it before failing
        for runtime, in FS, it fall-back to host
    Fixed return of untransformed bytecode of overwritten classes
        As it was, our own return, contained original, untransformed byte[]
        Now it returns bytecode correctly in by-us transformed form
 * runtime compiler got api, which can allow to insert new variables
    all global, fields and instance's variables in both synchornised and unsynchronised way are supported
    the complexity goes fro int to any runnable with custom code
    there is code completion for this api, as it is quite complex
 * file system
    FSvm now can list locations (as in class details, just without class-loader)
    nested jars no longer have cache
        Each read now leads to unpack, and each write leads to pack
    Adds option to edit which file extensions are searched as inner jars
        Made nested jar extensions save to config file

Frontend
    quick compile and upload buttons
        by one click you can upload modified code back to running vm!
    many GUI improvements, like LaF, icons, borders...
        Replaced other MainFrameView text-based buttons with icon-based ones
    Improved tip for multi-select
    Made Classlist scroll to the top on reload when nothing is selected
    Added case sensitivity option to Source buffer search
    copypasting of class list - via rich popup menu
		Fixed being able to select multiple classes
	    Implemented right click class list interval selection
	    Copy of (detailed) classes to clipboard is now more customizable
	Added classloader string to class loading with info
    Implemented frontend for loading classes with info
    loading  of decompiled bytecode now have progressbar
    Majorly refactored SettingsView into 3 separate panels to ease future setting additions
    implemented global console
        Plugin compiler is now logging to gui and decompilers in verbose mode too
        In verbose mode, put whole trace to console
        Make globalconsole able to change verbose in runtime
    Extracted Undo and Redo buttons onto the toolbar common for both buffers
    Implemented frontend for CPLC settings
    Implemented frontend for saving FS VMs after JRD closes
    Added 'Remove VM' GUI buttons to remote and FS VM tabs, with backend support
    Made bytecode buffers detachable via a toolbar button
    improved search in both decompiled code and binary
        Added regex support to bytecode search
        Made binary buffer editable by pressing 'Space' or 'Enter'
        Implemented undo and redo functionalities of text fields
        Made both bytecodeSearch and hexSearch text blink red if it was not found
        Implemented bytecode search 'Previous' and 'Next' buttons
        The bytecode search field now uses the same JPanel design as hex search.
        Moved the search bar to the bottom to match hex search.
        Fixed bytecode search match-case discrepancy

Cli
    cli now can print details
    listjvms, listplugins, api now can use saveaas
    Added generation of manpage to image
    Cli now have access to agent api

Development
    Made jdk17 compilable
        on both development and runtime
    Restored source/release 1.8 comaptibility
       jdk11 ramins the latest runtime usable for host
       agnet can be injected to jdk8 and up
    Introduced & configured a Checkstyle-compliant Maven Formatter plugin
    errors from agent now are propagated with trace and messages
    Made agent location overwritable by property org.jrd.agent.jar
	added tests  
		Our tests, requires agent. And theyneed current agent,not somr random
        Building first agent
    Introduced automatic filling of agent path after installation
    Restructured, updated, corrected and expanded the welcome message.
    Added SpotBugs plugin to run when building, but not fail the build
        and fixed really many many issues
    Introduced checkstyle plugin
    Implemented rudimentary GitHub CI
    Corrected frontend package naming
    Renamed packages to use lowercase naming convention and to better correspond with their current use.
    Made decompilers automatically import on a fresh installation
    Implemented sorting of plugins by scope, name

    mvn clean install -Pimages -Plegacy
        so although built by 17, should be jdk8 compatible.

6.0-0.pre.1

01 Dec 15:52
Compare
Choose a tag to compare
6.0-0.pre.1 Pre-release
Pre-release

DISPLAY=:0 mvn clean install -Pimages -Plegacy

.. so although built by 17, should be jdk8 compatible.

java-runtime-decompiler-5.1

12 Aug 12:58
Compare
Choose a tag to compare

pre release of 5.0

  • due to incompatible changes in compiler api and overall delay, JRD will now be jdk11+ only
  • but build in jdk8 compatibility, so you should be able to explore and edit JVMs of JDK8
  • added support for nested classes (for Fernflower and CFR only now)
  • added jasm disassembler
  • added jcoder disassembler
  • added CFR (best, but slowest) decompiler. Recomended for usage with direct back-compilation
  • manpage is generate dout of the box via org.jrd.backend.data.Help
  • inital implementation of back compilation into running JVM without local classpath (deps are pulled from running vm)
    • added connection to classpath-less compiler, but its implementation is not yet done
    • jasm and jcoder can assemble again the dissasembled code
  • enhanced direct upload of modified classes into runing VM
    • jasm/jcoder one click assembly + upload
    • all generic decompiled java classes are compiled onthe fly by runtime classpath and uploaded by one click
  • enhanced CLI
    • classes can now be processed in bulks, and are supported regexes
  • added hexview
    • modified bytes can be attempted to be directly forced to jvm
  • added possibilities too export/import bytecode/decompiled code
  • added support for filesystem "vm", including nested jars
    • by this, this tool can serve as superpowerfull localhost/desktop decompiler/compiler dissasembler/assembler
    • eg:

Decompile:

$ JAVA_HOME=/usr/lib/jvm/java-11-openjdk sh start.sh  -decompile ~/git/jc/tool/target/tool-1.0.jar  Cfr  '.*'  -saveas /tmp/jc -savelike dir
INFO:  Decompiling class org/jc/Tool
INFO:  ... done
Saved: /tmp/jc/org/jc/Tool.java
...
Saved: /tmp/jc/org/jc/impl/InMemoryJavaClassFileObject.java
INFO:  Decompiling class org/jc/impl/InMemoryJavaSourceFileObject
INFO:  ... done
Saved: /tmp/jc/org/jc/impl/InMemoryJavaSourceFileObject.java

Compile:

JAVA_HOME=/usr/lib/jvm/java-11-openjdk sh start.sh -compile -cp  ~/git/classpathless-compiler/target/classpathless-compiler-1.0-SNAPSHOT.jar  /tmp/jc/org/terminusbrut/classpathless/impl/DebugPrinter.java -savelike fqn -saveas .
Default runtime compiler will be used
Saved: ./org.terminusbrut.classpathless.impl.DebugPrinter.class

Upload:

JAVA_HOME=/usr/lib/jvm/java-11-openjdk sh start.sh  -overwrite  ~/git/classpathless-compiler/target/classpathless-compiler-1.0-SNAPSHOT.jar org.terminusbrut.classpathless.impl.DebugPrinter  org.terminusbrut.classpathless.impl.DebugPrinter.class
WARNING:Class package do not match directories. 
Most likely done successfully.

Disassemble:

$ JAVA_HOME=/usr/lib/jvm/java-11-openjdk sh start.sh  -decompile ~/git/jc/tool/target/tool-1.0.jar  jasm  '.*'  -saveas /tmp/jc -savelike dir 
Note: /home/.../plugins/JasmDecompilerWrapper.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Saved: /tmp/jc/org/jc/Tool.java
Saved: /tmp/jc/org/jc/Tool$Arguments.java
...
Saved: /tmp/jc/org/jc/impl/InMemoryJavaClassFileObject.java
Saved: /tmp/jc/org/jc/impl/InMemoryJavaSourceFileObject.java

Assemble:

$ JAVA_HOME=/usr/lib/jvm/java-11-openjdk sh start.sh  -compile  -p jasm   /tmp/jc -r   -saveas /tmp/bin 
Note: /home/.../plugins/JasmDecompilerWrapper.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
jasm plugin is delivered with its own compiler!!
jasm compiler caled with input of: 16
...
Saved: /tmp/bin/org/jc/api/MessagesListener.class
Saved: /tmp/bin/org/jc/impl/Compiler$1.class
Saved: /tmp/bin/org/jc/impl/InMemoryJavaSourceFileObject.class
Saved: /tmp/bin/org/jc/api/InMemoryCompiler.class

Dont forget that all operations are same over classapth, remote vm, or process of VM - runtime compiler/decompiler!

Known bugs:

  • when used in CLI, with stdout/in not all compilers/decompilers are able to log to stderr, and so stdout, can be poluted. We are working on it. If you enconter it, let us know the combination, and use -saveas + -savelike in meantime
  • Inner classes, and generally back-compilation is heavily decompiler dependant. Use patiently, and fix the decompiled code on your own Usually Crf does best. But Inner classes have best handling in Fernflower. And Procyon can decompile also invalid code...