Skip to content

Comments

RFC for final stable API#51

Open
Dr-TSNG wants to merge 18 commits intomasterfrom
rfc
Open

RFC for final stable API#51
Dr-TSNG wants to merge 18 commits intomasterfrom
rfc

Conversation

@Dr-TSNG
Copy link
Contributor

@Dr-TSNG Dr-TSNG commented Feb 20, 2026

After the merge, the release will be prepared for MavenCentral, and no further breaking changes are permitted.

Copilot AI review requested due to automatic review settings February 20, 2026 20:35
@Dr-TSNG Dr-TSNG mentioned this pull request Feb 20, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the public LibXposed API toward a “final stable” shape by introducing an explicit module-load callback, restructuring hook handle types around Executable, and raising the Android minSdk accordingly.

Changes:

  • Add onModuleLoaded(ModuleLoadedParam) callback to separate “module attached” from instantiation timing.
  • Redesign hooking APIs: replace Member/MethodUnhooker with Executable-based generics and new hook handle types.
  • Raise api module minSdk from 24 → 26 to support java.lang.reflect.Executable in the public surface.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
api/src/main/java/io/github/libxposed/api/XposedModuleInterface.java Adds onModuleLoaded callback and related Javadoc.
api/src/main/java/io/github/libxposed/api/XposedModule.java Removes constructor-based initialization and updates guidance to use onModuleLoaded.
api/src/main/java/io/github/libxposed/api/XposedInterfaceWrapper.java Switches to late attachment (attachFramework) and updates wrapper methods to new hook APIs.
api/src/main/java/io/github/libxposed/api/XposedInterface.java Updates core API types to Executable, introduces hook handle interfaces, and adjusts invocation/deoptimize APIs.
api/build.gradle.kts Bumps minSdk to 26 to match new Executable usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@libxposed libxposed deleted a comment from hsnabod175 Feb 21, 2026
@DavidBerdik
Copy link

I see that #15 has been closed but it does not look to me like it was implemented in this pull request. Have the plans to implement it been scrapped?

The side effects of individual hooker class are too severe while introducing minimum advantage. Because dsl and lambda becomes impossible, every module would implement its own hook dispatchers, making cooperation impossible and destroy hook dump readability.
@programminghoch10
Copy link

Hi,
where are the resource and layout hooks defined that were present on the previous Xposed API (93)?
For UI modification modules these hooks are absolutely mandatory and would force many great modules to completely rewrite functionality using much more unstable/unreliable code hooks.
Having a centralized proper framework implementation of resource and layout hooks, like the previous API had, would be essential for these kind of modules.

@Dr-TSNG
Copy link
Contributor Author

Dr-TSNG commented Feb 21, 2026

Hi, where are the resource and layout hooks defined that were present on the previous Xposed API (93)? For UI modification modules these hooks are absolutely mandatory and would force many great modules to completely rewrite functionality using much more unstable/unreliable code hooks. Having a centralized proper framework implementation of resource and layout hooks, like the previous API had, would be essential for these kind of modules.

Resource hooks are removed in new API because of already low compatibility with new Android versions. We may offer a more modern resource hook solution in the future, but it is not currently part of the API 100 initiative.

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.

4 participants