ShizuStore

NPatch

7723mod

1.1.0 · GitHub

Download APK
Patching Android 9+ 2 weeks ago GPL-3.0 Recommended
4.1k ShizuStore
93.9k GitHub
2.8k Stars
6 MB Size

More about this app

Rootless LSPosed-based Xposed framework that injects the Xposed API into target APKs

Neo LSPatch Framework

Documentation Download Total

Rootless Xposed framework powered by Vector core.

Official Website: npatch.nkbe.top

Introduction

NPatch patches an Xposed loader and the Vector core directly into the target APK, allowing Xposed modules to run seamlessly without Root privileges or system modifications. The patched APK carries its own loader and native core, with no extra extraction required at runtime.

Patching Modes

  • Local Mode (--manager): Patches apps without embedding modules. Modules and scope are managed dynamically by NPatch Manager, so changing or updating modules requires no re-patching.
  • Integrated Mode (--embed): Embeds modules directly into the patched APK, running standalone without requiring NPatch Manager.

Recent hook-stack stability improvements:

  • LSPlt: avoids a transient unmapped GOT/PLT region while installing hooks. This prevents dex2oat/zygote crashes on affected 32-bit Android 10 devices.
  • LSPlant: initializes CloseGuard for synthetic DexFile objects on Android Nougat and below, and aligns hook trampolines correctly for improved ART hook compatibility.

We sincerely invite you to join our Telegram group to get more information and updates about NPatch.

Supported Versions

  • Minimum: Android 9 (API 28)
  • Maximum: Android 17 (SDK 37)

Download

  • Stable Releases: Available on GitHub Releases
  • Canary Builds: Test versions released by developers, available on the Telegram channel @ONPatch

Usage

Through Manager (Recommended)

  1. Download manager-v<verName>-<verCode>-release.apk from Releases and install it.
  2. Select target application and patch it on-device with GUI guidance.

Through CLI (Jar)

java -jar jar-v<verName>-<verCode>-release.jar --manager target.apk

See the Usage Guide for detailed CLI arguments and options.

Star History

Star History Chart

Credits

License

NPatch is licensed under the GNU General Public License v3 (GPL-3) (http://www.gnu.org/copyleft/gpl.html).

Close

How Shizuku is used

Can install, uninstall, force stop, restart, optimize and diagnose patched apps via `Shizuku`

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

NPatch uses Shizuku to manage patched apps without root by calling privileged package, activity, and logging services.

  • Install patched apps: a patched APK set chosen in the app can be installed silently through Shizuku with a privileged installer session that supports replacing and downgrading the existing app.
  • Uninstall original apps: the unpatched version of a target app can be removed through Shizuku before installing the patched version.
  • Check original install: the app can detect whether the installed copy is the original unpatched app through Shizuku to prompt removal before patching.
  • List installed apps: the app list is read through the privileged package service through Shizuku when available, so installed apps and module information can be shown.
  • Force stop and restart: a patched app can be force stopped through Shizuku, and restarted by stopping it and launching it again.
  • Optimize app code: a patched app can be verified and optimized through Shizuku after patching or loader updates.
  • Activate module display: module information can be delivered to a patched app companion through Shizuku by looking up its content provider with the privileged activity service.
  • Collect diagnostic logs: a diagnostic package for a patched app can include a filtered system log through Shizuku, using the privileged service to run log collection.

Android APIs or commands used

  • IPackageManager.getInstalledPackages
  • IPackageManager.getApplicationInfo
  • IPackageInstaller.createSession
  • IPackageInstaller.openSession
  • PackageInstaller.Session.openWrite
  • PackageInstaller.Session.fsync
  • PackageInstaller.Session.commit
  • PackageInstaller.uninstall
  • IActivityManager.forceStopPackage
  • IPackageManager.performDexOptMode
  • IActivityManager.getContentProviderExternal
  • IContentProvider.call
  • IActivityManager.removeContentProviderExternal
  • logcat

Notable details

Patched apps can still be installed without Shizuku using the normal system install flow or a chosen third party installer, the app list falls back to the normal package manager when Shizuku is not ready, and module activation falls back to a normal provider call.

Close

Changelog

What's new for version 1.1.0

English

🛡️ Core & Native Injection Overhaul

  • Core Base Upgrade: Bumped to the latest Vector core base (core-837), resolving axml headerSize manifest parsing failures on modern APKs.
  • Stealth Injection Backing: Dobby code cave now utilizes memfd backing (/memfd:jit-cache) to evade security scanners targeting anonymous executable memory mappings (rwx/rx).
  • Hook Stack Streamlined: Cleaned up native hook dependencies to allow lightweight, decoupled operation.
  • ROM Compatibility Fixes: Resolved crash issues on MagicOS and related custom ROMs triggered by scanning execute-only (.text) memory pages.
  • DEX Injection Architecture: Re-architected MT Provider injection to use contiguous classesN.dex entries for native system MultiDex loading, eliminating obsolete reflection into internal ClassLoader classes.

📦 Patching & Packaging Engine

  • Signature Integrity: APKS and split APK repacking now strictly adopts STORED (uncompressed) mode with precomputed CRC32 and sizing, preventing V2/V3 signature block offset corruption.
  • Expanded File Input: Added native support for .apkm bundles and duplicate-download .apk.N files while preserving split APK structures intact.

⚡ Architecture Decoupling & Modern Compatibility

  • Remote API Decoupled: Extracted NPatch-Remote-API into a standalone open-source repository (v1.0.1) with real-time clientToken death monitoring and dynamic authority notification fixes.
  • Android 17 Ready: Fully compatible with Android 17 (SDK 37), resolving modern Shizuku package query restrictions and caching reflection looks.
  • Manager Polish: Repositioned home count cards side-by-side, enriched About page build details, and fixed Android 10 storage permission bugs.

中文

🛡️ 核心與 Native 注入強化

  • 核心基座升級:升級至最新 Vector 核心基座(core-837),修復 axml headerSize 於新版 aapt2 建置下的清單解析異常。
  • 記憶體隱蔽性:Dobby code cave 改用 memfd backing,規避對匿名可執行記憶體段(rwx/rx)的安全掃描。
  • Hook 棧精簡輕量化:解耦 native hook 依賴,精簡調用鏈並降低運行衝突。
  • ROM 崩潰修復:修復 MagicOS 等客製化系統上掃描 execute-only (.text) 記憶體段導致的閃退問題。
  • DEX 注入架構重構:改以連續 classesN.dex 追加注入檔案提供器,交由系統 MultiDex 原生加載,拔除已失效的 Dalvik/ART 反射邏輯。

📦 修補與打包引擎

  • 簽名保護修復:APKS / 分包封裝全面改用 STORED 儲存方式並預算 CRC32,避免破壞 V2/V3 簽名 block 造成系統安裝器校驗失敗。
  • 輸入支援擴展:支援直接選取導入 .apkm 安裝包及重名下載的 .apk.N 檔案,自動保持 split APK 完整性。

⚡ 架構獨立與系統相容

  • Remote API 獨立開源:抽離為獨立公開倉庫維護(升級至 v1.0.1),修復自訂 Authority 通知失效並加入客戶端 Binder 死亡清理機制。
  • Android 17 全面適配:適配 Android 17 (SDK 37),修復高版本下 Shizuku 套件查詢失敗問題並加入反射快取。
  • 管理器體驗細節:首頁計數卡片並排重構、關於頁補齊詳細構建資訊與官網連結、修復部分 Android 10 機型可能無法獲取存儲權限的問題。
Close

Permissions

15 permissions requested

  • android.permission.MANAGE_EXTERNAL_STORAGE
  • android.permission.READ_EXTERNAL_STORAGE
  • android.permission.WRITE_EXTERNAL_STORAGE
  • android.permission.QUERY_ALL_PACKAGES
  • android.permission.GET_ACCOUNTS
  • android.permission.REQUEST_INSTALL_PACKAGES
  • android.permission.REQUEST_DELETE_PACKAGES
  • android.permission.KILL_BACKGROUND_PROCESSES
  • android.permission.POST_NOTIFICATIONS
  • android.permission.FOREGROUND_SERVICE
  • android.permission.FOREGROUND_SERVICE_SPECIAL_USE
  • android.permission.RECEIVE_BOOT_COMPLETED
  • android.permission.INTERNET
  • top.nkbe.npatch.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
  • moe.shizuku.manager.permission.API_V23
Close

Sources

2 sources

1.1.0 GitHub · top.nkbe.npatch
Selected Download
1.1.0 GitHub · top.nkbe.npatch
Download