LSPatch
1.2 · GitHub
More about this app
A non-root Xposed framework extending from LSPosed
Introduction
LSPatch is the rootless companion to Vector, the Xposed framework this project is built on. Where Vector hooks the whole system as a Zygisk module and needs Magisk or KernelSU, LSPatch needs neither: it rewrites a single target app's APK to embed the loader and framework runtime, so that one app loads your Xposed modules on its own.
The two share a codebase — the same LSPlant-based hook engine and the same manager UI — and run the same modules. Read Vector's documentation for anything about the framework itself; this README only covers what is specific to the rootless path.
Note
LSPatch changes one app at a time and leaves the rest of the system untouched. It cannot hook system processes or apps you have not patched — that is what the rootful Vector is for.
Modules
Both generations of Xposed module run through the same engine, so the module repository and the API references listed under Vector's Developer Resources apply unchanged:
- Modern — libxposed modules receive a real
IXposedService. - Legacy — classic
de.robv.android.xposedmodules keep working as-is.
Requirements
- Android 9 (API 28) or newer. The upper bound follows Vector — see its compatibility notes.
- Shizuku (optional). With it, the manager installs patched apps silently; without it, grant "install unknown apps" once and install by hand.
Downloads
| Channel | Source |
|---|---|
| Stable Releases | GitHub Releases |
| Canary (CI) Builds | GitHub Actions |
Each release ships the manager (manager.apk) and the command-line patcher (lspatch.jar), plus a
-debug build of each. When reporting a bug, please reproduce it on the debug build first.
Caution
GitHub requires you to be logged in to download CI artifacts. The link above is filtered to the
master branch; builds from pull requests are unverified.
Usage
Manager app — install manager.apk, pick a target, patch it, and install the result. From there
you manage each patched app's modules in place, install modules from the store, and read a live
framework log. Two modes:
- Manager mode keeps the patched app bound to the manager, so module changes apply without re-patching.
- Integrated mode bakes the modules into the APK, producing a self-contained app that needs no manager afterwards.
Command line — download lspatch.jar and run java -jar lspatch.jar to patch an APK from a shell.
Contributing
- Translations are managed on Crowdin.
- Questions go to Discussions; bug reports to Issues.
- Code style is enforced by Spotless — run
./gradlew spotlessApplybefore submitting. It formats only the files you changed (ktfmt for Kotlin, palantir-java-format for Java), so you never reflow untouched code.
Credits
How Shizuku is used
Can silently install and uninstall patched and store apps, force stop and optimize apps, and collect logs via Shizuku with `PackageInstaller` and shell commands.
This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.
How this app uses Shizuku
LSPatch uses Shizuku to install patched apps, manage apps, and collect diagnostics with elevated shell rights.
- Install patched and store apps silently: patched APKs and downloaded store modules are installed without system confirmation through a shell owned installer session, with verification flags adjusted for shell installs.
- Uninstall and replace apps: existing apps are removed through the shell installer when restoring an original, reinstalling after patching, or renaming the manager.
- Force stop apps: a selected patched or managed app is stopped immediately with the
am force-stopshell command through Shizuku. - Optimize patched apps: a managed app is recompiled in verify mode using the
cmd package compileshell command on newer Android or the system dex optimization API on older versions. - Exempt manager from limits: the manager requests removal from battery and background restrictions with
cmd deviceidle whitelist,cmd appops set, andam set-standby-bucketshell commands through Shizuku. - Collect and export logs: a shell side collector runs
logcatcontinuously into verbose and framework streams that the app reads back in chunks for viewing, starting new parts, snapshots, and exporting tombstones, process state, and device info into a report archive. - Keep manager reachable: a shell side watchdog restarts the manager when it is not running, and a shell side process watcher notifies the manager when a module companion app starts so its settings can be connected on demand.
Android APIs or commands used
PackageInstaller.createSessionPackageInstaller.openSessionPackageInstaller.uninstallIPackageManager.performDexOptModeam force-stopam set-standby-bucketam start-foreground-servicecmd deviceidle whitelistcmd appops setcmd package compile -m verify -fsettings get global verifier_verify_adb_installslogcatlogcat -b main -b crash -b system -v uid -v threadtimegetpropps -A -o PID,PPID,USER,NAMEps -A -o PID,NAMEls -1pkill -fmkdir -pchmod 777
Notable details
Installs fall back to the platform installer with user confirmation when Shizuku is unavailable. Log viewing falls back to the app's own process log and the export omits shell owned files when Shizuku is unavailable.
Changelog
What's new for version 1.2
LSPatch v1.2
LSPatch 1.2 adds an opt-in level 3 to the signature bypass, reaches a module's companion the moment its settings open, and fixes several crashes carried over from 1.1.
- 🔏 Signature bypass, level 3. Levels 1 and 2 miss an app that reads its own apk through an inline
svcor parses it withgetPackageArchiveInfo. Level 3 redirects both to the original signer. It rewrites four bytes of the app's own code, which a self-checksumming packer can notice, so it stays opt-in and arm64 only; level 2 remains the default. - 🔌 A companion is reached when its settings open. A value changed in a module's settings app now reaches the running hook without force-stopping the target first — over Shizuku where it is granted, or through a service the companion binds at its own start where it is not.
- ⬆️ Version history and canaries on the update page. Pick any past or prerelease build from the title-bar switcher and follow its notes, channel and install.
- 🩹 Crash fixes. Choosing a language, running a local-mode app under a renamed manager, or re-patching a patched app in a release build no longer crashes.
Permissions
12 permissions requested