Compare commits

...
Author SHA1 Message Date
xiaozhou233 5ac0bac555 Doc & Update to Version 3.0 Build 2 2026-04-16 13:26:36 +08:00
xiaozhou233 c7d9336b70 Refactor: preload event 2026-04-05 14:26:33 +08:00
xiaozhou233 c11891e718 Style: rename 2026-04-05 13:48:59 +08:00
xiaozhou233 de56fca73d Doc: README Acknowledgements 2026-04-05 11:28:20 +08:00
5 changed files with 13 additions and 13 deletions

No files matched your search

+2 -2
View File
@@ -96,7 +96,7 @@ InjectorNative injectorNative = new InjectorNative();
injectorNative.inject(<pid>, "<path-to-libloader>", "<path-to-toml-config-dir>");
```
### 4. ✅ Done!
if injection is successful, target process will load `Entry.jar` (or `EntryClass` in config file) and run `EntryMethod` method(or `start` method in config file)
if injection is successful, target process will load `Entry.jar` (or `EntryJarPath` in config file) and run `EntryClass`.`EntryMethod` method(or `start` method in config file)
## Hot To Build
### Environment
@@ -126,4 +126,4 @@ Disclaimer: This project is intended for learning and research in controlled env
- [ReflectiveDLLInjection](https://github.com/stephenfewer/ReflectiveDLLInjection) - DLL Inject
- [plog](https://github.com/SergiusTheBest/plog) - portable, simple and extensible C++ logging library
- [tinytoml](https://github.com/mayah/tinytoml) - A header only C++11 library for parsing TOML.
- [eventpp](https://github.com/wqking/eventpp) - C++ library for event dispatcher and callback list
+3 -2
View File
@@ -132,8 +132,8 @@ injectorNative.inject(<pid>, "<path-to-libloader>", "<path-to-toml-config-dir>")
注入成功后,目标进程将加载:
- Entry.jar(或配置中的 EntryClass)
- 并执行 EntryMethod(默认 start)
- Entry.jar(或配置中的 EntryJarPath)
- 并执行 EntryClass.EntryMethod(默认 com.example.Entry.start() )
---
@@ -175,3 +175,4 @@ JAR 可在 JuiceAgent-API 项目中构建或下载。
- ReflectiveDLLInjection — DLL 注入实现
- plog — 轻量级 C++ 日志库
- tinytoml — C++11 TOML 解析库
- [eventpp](https://github.com/wqking/eventpp) - 用于事件分发器和回调列表的 C++ 库
+1 -1
View File
@@ -1 +1 @@
VERSION = Version 3.0 Build 2
VERSION = Version 3.1 Build 3
File renamed without changes.
+7 -8
View File
@@ -14,13 +14,6 @@ namespace JuiceAgent {
bool Agent::init(JavaVM* jvm, JNIEnv* env, jvmtiEnv* jvmti) {
PLOGI << "JuiceAgent Native EntryPoint Invoked!";
// PreLoad Event
eventbus.post(EventPreLoad{
.jvm = jvm,
.env = env,
.jvmti = jvmti
});
// ======== neccessary environment check ========
if (jvm == nullptr) {
PLOGE << "Failed to initialize JuiceAgent: jvm is null";
@@ -37,9 +30,15 @@ namespace JuiceAgent {
set_jvm(jvm);
set_jvmti(jvmti);
PLOGD << "env: " << env << ", jvmti: " << jvmti;
// PreLoad Event
eventbus.post(EventPreLoad{
.jvm = jvm,
.env = env,
.jvmti = jvmti
});
// ======== Application ability ========
jvmtiCapabilities caps{};
caps.can_get_bytecodes = 1;