Commit Graph

4 Commits

Author SHA1 Message Date
JingMatrix cdc536f10b Adapt LSPosedBridge to convention-based hooker discovery (#534)
We update `LSPosedBridge` to align with upstream API changes, which have replaced annotation-based hooker discovery with a naming convention.

The `doHook` implementation has been refactored to:
- Remove dependencies on the deleted `io.github.libxposed.api.annotations` package (`XposedHooker`, `BeforeInvocation`, `AfterInvocation`).
- Scan for public static methods explicitly named `before` and `after` instead of relying on annotations.
- Enforce validation on these named methods to ensure they match the required signatures.

To adapt to this change, existing Hooker classes are refactored by removing the deprecated annotations and renaming their callback methods to `before` and `after` respectively.

Co-authored-by: frknkrc44 <krc440002@gmail.com>
2026-02-14 16:03:50 +01:00
JingMatrix ea71745430 Implement constructor invocation APIs in LSPosedContext (#533)
Unlike the existing `newInstance` variants which allocate and return a new object, these new APIs execute constructor logic on an existing, pre-allocated instance (`thisObject`). This separation of allocation and initialization allows for invoking original or super constructors within hook callbacks where the object reference is already established.

The implementation leverages the existing JNI `HookBridge` methods, as `invokeOriginalMethod` and `invokeSpecialMethod` already support void-return signatures required for constructor execution.

Co-authored-by: frknkrc44 <krc440002@gmail.com>
2026-02-14 16:02:02 +01:00
JingMatrix 211bd5f115
Centralize dependencies and migrate to submodules (#512)
Centralize dependencies and migrate to submodules

Move `apache` and `axml` modules to a unified `external` directory and migrate libxposed API and service interfaces from Maven dependencies to Git submodules.

Included changes:
- Updated .gitmodules with new paths.
- Simplified core.yml CI workflow.
- Updated Gradle project references to use the new directory structure.
- Added documentation for external components.
2026-01-22 15:13:06 +01:00
JingMatrix 4cec46a074 Fix and refactor DexParser implementation (#509)
In the LSPosedDexParser constructor, the methodIds array is allocated correctly, but the loop condition is wrong: its length is divided by 3 twice.

We rewrite this class in Kotlin, marking the first commit of refactoring LSPosed into Vector.

Co-authored-by: Willian Wang <git@willian.wang>
2026-01-21 18:12:25 +01:00