Skip to content

Support Xposed API 102 / Vector 2.2, harden for Zygisk Next, add Nekogram X - #1

Merged
2B-4G10 merged 1 commit into
mainfrom
claude/publish-earlier-changes-8rlgkq
Sep 6, 2026
Merged

2B-4G10 merged 1 commit into
mainfrom
claude/publish-earlier-changes-8rlgkq

Conversation

@2B-4G10

@2B-4G10 2B-4G10 commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Ship both module contracts in one APK: the modern libxposed API 102 entry (META-INF/xposed/java_init.list → xposed.TeleVipModule) used by LSPosed 1.10+ and Vector 2.2, and the legacy API 93 entry (assets/xposed_init → MainHook) for older frameworks. Both funnel into xposed.ModuleEntry#attach, guarded so activating both can never double-hook.
  • Introduce com.my.televip.xposed as the only seam to the framework: XBridge (facade), LegacyBackend (adapts de.robv XposedBridge/XC_MethodHook), ModernBackend (adapts XposedInterface.hook(Executable).intercept(Hooker) with an OkHttp-style interceptor chain rebuilding classic before/after semantics).
  • AbstractMethodHook no longer extends XC_MethodHook; all 58 XposedHelpers call sites move to a self-contained reflect.XReflect reimplementation.
  • Zygisk Next / Vector hardening: module APK path no longer depends on initZygote(); language packs move to src/main/resources/lang and read off the module class loader; logging routes through XBridge with an android.util.Log fallback; startup logs the active backend/framework/version.
  • Adds Nekogram X (nekox.messenger) support with a version-mismatch warning (ClientChecker#checkClientVersion) for obfuscated clients.
  • Repo fixes: removed a non-existent :TeleVip module from settings.gradle, resolved a committed merge conflict in .gitignore, added libxposed 102.0.0 as compileOnly plus ProGuard rules for both entry points, moved xposeddescription to a string resource.

Test plan

  • Run ./gradlew :app:assembleRelease — not verified at the time this landed. The authoring environment had no Android SDK and Maven Central was blocked by egress policy, so this had never been compiled. Since covered by the Build APK workflow added in Build the APK on GitHub, and survive a Telegram update #3.
  • If it fails to compile, check ModernBackend first — the exact shape of XposedInterface.HookBuilder/Chain was taken from the published libxposed 102.0.0 Javadoc rather than the artifact itself.
  • Manual smoke test against LSPosed (legacy path) and Vector 2.2 / Zygisk Next (modern path) once it builds.

Note: the legacy API 93 path described above was removed shortly after this landed — see #2. The module is libxposed API 102 only.

…gram X

Ship both module contracts in one APK: the modern libxposed API 102 entry
(META-INF/xposed/java_init.list -> xposed.TeleVipModule) used by LSPosed 1.10+
and Vector 2.2, and the legacy API 93 entry (assets/xposed_init -> MainHook)
for older frameworks. Both funnel into xposed.ModuleEntry#attach, guarded so
activating both can never double-hook.

Introduce com.my.televip.xposed as the only seam to the framework:

  XBridge        facade: hook, log, module path, deoptimize, framework info
  LegacyBackend  adapts de.robv XposedBridge / XC_MethodHook
  ModernBackend  adapts XposedInterface.hook(Executable).intercept(Hooker)

API 102 replaced the before/after callback pair with an OkHttp-style
interceptor chain, so ModernBackend rebuilds the classic semantics on Chain:
a result set in beforeMethod short-circuits the chain, otherwise
chain.proceed(args) runs with the mutated argument array and its outcome goes
to afterMethod, which may still override it.

AbstractMethodHook no longer extends XC_MethodHook; it is a plain class whose
nested MethodHookParam keeps the same surface, so feature code is unchanged.
XC_MethodReplacement becomes base.MethodReplacement.

A module loaded through the modern API gets no de.robv classes at all, so all
58 XposedHelpers call sites move to reflect.XReflect, a self-contained
reimplementation with the same signatures, the same best-match argument
resolution and the same unchecked NoSuchMethodError/NoSuchFieldError
behaviour.

Zygisk Next / Vector hardening:
- module APK path no longer depends on initZygote(), which the modern API does
  not have and which is unreliable for app-scoped modules; it comes from the
  backend and falls back to deriving it from our own class loader
- language packs move to src/main/resources/lang and are read off the module
  class loader, so no APK path is needed at all (ZIP scan kept as fallback)
- Logger routes through XBridge and degrades to android.util.Log
- startup logs the active backend, framework name and version

Nekogram:
- add Nekogram X (nekox.messenger): resolver, ClientType and xposedscope entry;
  like its Momogram fork it ships unobfuscated symbols
- ClientChecker#checkClientVersion records the client build each resolver table
  was generated against and warns once at startup on a mismatch, loudly for the
  obfuscated clients where a mismatch silently disables every hook

Repo fixes: settings.gradle included a non-existent ':TeleVip' module;
.gitignore had a committed merge conflict; add libxposed 102.0.0 as compileOnly
plus ProGuard rules for both entry points; move xposeddescription to a string
resource and add android:description for the modern API.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VPn1kURKMWHZn5XfXnj9pB
@2B-4G10
2B-4G10 marked this pull request as ready for review September 6, 2026 19:19
@2B-4G10
2B-4G10 merged commit aafc089 into main Sep 6, 2026
@2B-4G10
2B-4G10 deleted the claude/publish-earlier-changes-8rlgkq branch September 6, 2026 21:07
2B-4G10 added a commit that referenced this pull request Sep 25, 2026
Support Xposed API 102 / Vector 2.2, harden for Zygisk Next, add Nekogram X
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.

2 participants