Skip to content

Create jadx-emulator.json - #26

Merged
skylot merged 2 commits into
jadx-decompiler:mainfrom
nitanmarcel:jadx-emu
Sep 29, 2026
Merged

skylot merged 2 commits into
jadx-decompiler:mainfrom
nitanmarcel:jadx-emu

Conversation

@nitanmarcel

@nitanmarcel nitanmarcel commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

A port of the emulation core of a forgotten project I had: jdex. It so happened that I ran out of space and during the cleanup I came across some sample apk files that I used to test the project on.

In the original form it was able to perform string decryption that usually require the actual code to run and even defeat obfuscators that took advantage of jadx's limitation to purposely emit broken decompilation.

The string deobfuscation part is also ported as an extension for this plugin. But without the native emulation part

https://github.com/nitanmarcel/jadx-emu-string-deobfuscator

@nitanmarcel

Copy link
Copy Markdown
Contributor Author

@skylot take a look please :)

@skylot
skylot merged commit 1cc0b80 into jadx-decompiler:main Sep 29, 2026
1 check passed
@skylot

skylot commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

@nitanmarcel looks nice 👍
And now we have plugins for plugins 🤣

Although, we may need to simplify it somehow, for example, your plugin extensions can be directly jadx plugins but use your plugin instance to register (it is already working for input plugins: smali-input uses dex-input). That way it will easier distribute and install your extensions. Let me know if jadx API missing something.

P.S.: It will be nice to have string decryptor jar in release to avoid building it manually. Or even include it in jadx-emu plugin bundle 🙂

@skylot

skylot commented Sep 29, 2026

Copy link
Copy Markdown
Member

Added to v25 plugins list 🎉

@nitanmarcel

Copy link
Copy Markdown
Contributor Author

@nitanmarcel looks nice 👍 And now we have plugins for plugins 🤣

Although, we may need to simplify it somehow, for example, your plugin extensions can be directly jadx plugins but use your plugin instance to register (it is already working for input plugins: smali-input uses dex-input). That way it will easier distribute and install your extensions. Let me know if jadx API missing something.

P.S.: It will be nice to have string decryptor jar in release to avoid building it manually. Or even include it in jadx-emu plugin bundle 🙂

I forgot to upload the jar 😅 I'll do it as soon as I open my PC.

I've been under the impression that each plugin is contained and they can't access each other, but I'll take a look at that dex/smali-input plugins to see how they work with each other.

@nitanmarcel

nitanmarcel commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

@nitanmarcel looks nice 👍 And now we have plugins for plugins 🤣

Although, we may need to simplify it somehow, for example, your plugin extensions can be directly jadx plugins but use your plugin instance to register (it is already working for input plugins: smali-input uses dex-input). That way it will easier distribute and install your extensions. Let me know if jadx API missing something.

P.S.: It will be nice to have string decryptor jar in release to avoid building it manually. Or even include it in jadx-emu plugin bundle 🙂

I've added a small debug in the string extension to print the class loader and seems that I was right. Each plugin gets it's own URLClassLoader and can't see each other. It can be hacked around from the string extension, but each extension practically needs to do the same thing.

Easier will be if jadx has some kind of requirement management for plugins, the idea is already there with smali-input and dex-input but they only work as it is based on luck.

They get installed in the same directory, get the same class loader, and smali-input can get dex-input's plugin instance because it so happens that S comes after D alphabetically.

@nitanmarcel

nitanmarcel commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Or a new plugin type who's main scope is to provide APIs to other plugins. But a requirement implementation would be better because it could also assert if plugin X required by plugin Y is installed, or even automatically pull the requirement.

One is hacky, takes just a few lines to implement: if plugin marked as api, append it to all plugin's classloader.
The other one is an actual infrastructure implementation.

@skylot

skylot commented Sep 30, 2026

Copy link
Copy Markdown
Member

@nitanmarcel thanks for checking that and for suggestions.
It will be not too hard to add a property to plugin info like parent plugin and load child plugins into inherited from parent classloader.
Also, dependency plugins property to auto install plugins will be nice to have, but it might be harder to implement.

I will open a new jadx issue for futher discussion.

@nitanmarcel

Copy link
Copy Markdown
Contributor Author

Pushed a small update to fix some small bugs. Are plugins automatically updating on this side?

@skylot

skylot commented Sep 30, 2026

Copy link
Copy Markdown
Member

Pushed a small update to fix some small bugs. Are plugins automatically updating on this side?

This list holds only plugins metadata, so you need create PR here only if you update plugin name, description or location.
Actual plugin updates handled by jadx apps.
Although, for now, no automatic update checks, so users needs sometime trigger update:

  • in jadx-cli: jadx plugins --update
  • in jadx-gui: in Preferences->Plugins->Update All button.

I plan to implement periodic auto update checks in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants