Migrate self-hooking VPN hide module to libxposed API 101#58
Open
1392726643 wants to merge 4 commits intoSagerNet:devfrom
Open
Migrate self-hooking VPN hide module to libxposed API 101#581392726643 wants to merge 4 commits intoSagerNet:devfrom
1392726643 wants to merge 4 commits intoSagerNet:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the self-hooking VPN-hide Xposed module from a vendored libxposed API copy to the official io.github.libxposed:api:101.0.1, updating module entrypoints and metadata accordingly while removing the in-repo third_party/libxposed-api project.
Changes:
- Replace the vendored
third_party/libxposed-apiGradle module with a MavencompileOnly("io.github.libxposed:api:101.0.1")dependency and remove the settings include. - Update the module entry class to use libxposed API 101 lifecycle entry points (
XposedModule()+onModuleLoaded+onSystemServerStarting). - Raise Xposed module metadata
minApiVersion/targetApiVersionto 101 and adjust the caller check inIConnectivityManager.onTransactto use UID→package lookup viaVpnAppStore.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
settings.gradle.kts |
Removes the :libxposed-api included build module wiring. |
app/build.gradle.kts |
Switches Xposed API dependency from the local project to io.github.libxposed:api:101.0.1 (keeps rovo89 API 82 as compileOnly). |
app/src/main/resources/META-INF/xposed/module.prop |
Raises module API compatibility to minApiVersion=101 / targetApiVersion=101. |
app/src/main/java/io/nekohasekai/sfa/xposed/XposedInit.kt |
Migrates module initialization to API 101 callbacks and removes system-context resolution. |
app/src/main/java/io/nekohasekai/sfa/xposed/hooks/IConnectivityManager+onTransact.kt |
Replaces the context-based UID caller check with VpnAppStore.getPackagesForUid(uid). |
third_party/libxposed-api/src/main/java/io/github/libxposed/api/XposedModuleInterface.java |
Deletes vendored libxposed API source (no longer needed after Maven dependency migration). |
third_party/libxposed-api/src/main/java/io/github/libxposed/api/XposedModule.java |
Deletes vendored libxposed API source. |
third_party/libxposed-api/src/main/java/io/github/libxposed/api/XposedInterfaceWrapper.java |
Deletes vendored libxposed API source. |
third_party/libxposed-api/src/main/java/io/github/libxposed/api/XposedInterface.java |
Deletes vendored libxposed API source. |
third_party/libxposed-api/src/main/java/io/github/libxposed/api/utils/DexParser.java |
Deletes vendored libxposed API source. |
third_party/libxposed-api/src/main/java/io/github/libxposed/api/errors/XposedFrameworkError.java |
Deletes vendored libxposed API source. |
third_party/libxposed-api/src/main/java/io/github/libxposed/api/errors/HookFailedError.java |
Deletes vendored libxposed API source. |
third_party/libxposed-api/src/main/AndroidManifest.xml |
Deletes the vendored library manifest stub. |
third_party/libxposed-api/LICENSE |
Removes vendored libxposed license file along with vendored source removal. |
third_party/libxposed-api/build.gradle.kts |
Removes the vendored library module Gradle build file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c203806 to
93927c5
Compare
731b2d5 to
6612096
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Validation
Device Test Report
Environment:
Observed logs:
Functional result:
ot detected