Skip to content

Comments

Adapt LSPosedBridge to convention-based hooker discovery#534

Merged
JingMatrix merged 1 commit intomasterfrom
api
Feb 13, 2026
Merged

Adapt LSPosedBridge to convention-based hooker discovery#534
JingMatrix merged 1 commit intomasterfrom
api

Conversation

@JingMatrix
Copy link
Owner

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.

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.
@JingMatrix
Copy link
Owner Author

The upstream made this change without increasing the libxposed API version, and no backward compatibility is included / mentioned.

It is arguable of how to implement this.

@JingMatrix JingMatrix merged commit 40f09cf into master Feb 13, 2026
1 check passed
JingMatrix added a commit that referenced this pull request Feb 14, 2026
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>
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.

1 participant