ShizuStore

LSPatch

JingMatrix

1.2 · GitHub

Download APK
Patching Android 9+ 1 month ago GPL-3.0
617 ShizuStore
222.4k GitHub
4k Stars
13 MB Size

More about this app

A non-root Xposed framework extending from LSPosed

LSPatch

Run Xposed modules without root — by patching the app instead of the system

Build Crowdin Download Total


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.xposed modules 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 spotlessApply before submitting. It formats only the files you changed (ktfmt for Kotlin, palantir-java-format for Java), so you never reflow untouched code.

Credits

  • Vector — the Xposed framework and shared manager UI LSPatch is built on (and its own credits)
  • Xpatch — the project LSPatch originally forked from
  • apkzlib — APK repacking
Close

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-stop shell command through Shizuku.
  • Optimize patched apps: a managed app is recompiled in verify mode using the cmd package compile shell 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, and am set-standby-bucket shell commands through Shizuku.
  • Collect and export logs: a shell side collector runs logcat continuously 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.createSession
  • PackageInstaller.openSession
  • PackageInstaller.uninstall
  • IPackageManager.performDexOptMode
  • am force-stop
  • am set-standby-bucket
  • am start-foreground-service
  • cmd deviceidle whitelist
  • cmd appops set
  • cmd package compile -m verify -f
  • settings get global verifier_verify_adb_installs
  • logcat
  • logcat -b main -b crash -b system -v uid -v threadtime
  • getprop
  • ps -A -o PID,PPID,USER,NAME
  • ps -A -o PID,NAME
  • ls -1
  • pkill -f
  • mkdir -p
  • chmod 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.

Close

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 svc or parses it with getPackageArchiveInfo. 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.
Close

Permissions

12 permissions requested

  • android.permission.QUERY_ALL_PACKAGES
  • android.permission.REQUEST_DELETE_PACKAGES
  • android.permission.REQUEST_INSTALL_PACKAGES
  • android.permission.INTERNET
  • android.permission.ACCESS_NETWORK_STATE
  • android.permission.FOREGROUND_SERVICE
  • android.permission.FOREGROUND_SERVICE_SPECIAL_USE
  • android.permission.POST_NOTIFICATIONS
  • android.permission.RECEIVE_BOOT_COMPLETED
  • android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
  • org.lsposed.lspatch.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
  • moe.shizuku.manager.permission.API_V23
Close