Feat: add JuiceRemapper runtime class remapping

- add JuiceRemapperService that listens for ClassFileLoadHook and calls
  the Java static Remap.remap(String, byte[]) via cached JNI declarations,
  then writes the returned bytes back to the JVMTI callback
- add JNI bindings (initNative, add/remove/clear include/exclude) with
  Remapper singleton init state and cached jclass/jmethodID stored in
  Remapper (global.hpp)
- cache static class/method declarations lazily in initNative to avoid
  repeated FindClass/GetStaticMethodID
- add generated JuiceRemapper JNI header and runtime-remap example config
This commit is contained in:
xiaozhou233 committed 2026-08-18 16:28:29 +08:00
1 parent 81905d6c3f
commit 4bed99f417
6 files changed
+375

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
[JuiceAgent]
Version = 1
[JuiceAgent.Loader]
# Path to JuiceAgent-API jar, leave empty to use the built-in API
JuiceAgentAPIJarPath = ""
# Path to libagent.dll, default is "./libagent.dll"
JuiceAgentNativeLibraryPath = ""
[JuiceAgent.Modules]
[JuiceAgent.Modules.JuiceRemapper]
Enabled = true