Skip to content

Local & Integrated Modes

When patching with NPatch you must choose one: --manager (Local mode) or --embed (Integrated mode). The two are mutually exclusive on CLI. The difference is where modules come from and whether the patched APK can run standalone.

Local Mode (--manager)

Patches apps without embedding modules. Xposed scope can be changed dynamically without re-patching. Apps only work with NPatch Manager installed on the same device.

At runtime, the injected Xposed environment queries NPatch Manager (package top.nkbe.npatch) for the module list and scope configuration. The Manager does not need to stay running in the background.

Patching additionally injects:

  • assets/npatch/loader.bin (loader dex)
  • assets/npatch/so/<arch>/libnpatch.so (arm64-v8a and x86_64)
  • android.permission.QUERY_ALL_PACKAGES (to query the Manager for modules)

Example

bash
java -jar jar-v1.0.5-639-release.jar --manager target.apk

Good For

  • Your own device, long-term use
  • Adjusting modules or scope at any time without re-patching
  • Patching multiple apps managed by a single Manager
  • Needing higher signature bypass levels (Extreme / Seccomp are exclusive to this mode)

Limitations

  • NPatch Manager must be installed on the device
  • Without the Manager, patched apps still launch but no modules are loaded
  • Patched APK and Manager versions may need to match — very old Managers may not recognize new patches

Integrated Mode (--embed)

Patches apps with modules built in. Patched apps run independently without the Manager but cannot dynamically manage configuration. Ideal for devices without NPatch Manager.

Patching bundles module APKs into the output at assets/npatch/modules/<package>.apk. The output APK is self-contained — at startup the Loader loads modules directly from assets, with no Manager dependency.

Patching adds corresponding Xposed metadata to the manifest (xposedmodule, xposeddescription, xposedminversion).

Example

bash
java -jar jar-v1.0.5-639-release.jar --embed module1.apk --embed module2.apk target.apk

--embed can be repeated, once per module.

Good For

  • Distributing patched APKs to people who don't have the Manager
  • Deploying the same patch across many devices
  • Fixed module combinations that don't need dynamic switching

Limitations

  • Module versions are locked at patch time — updating modules requires re-patching
  • Output APK size increases (contains all module APKs)
  • Cannot disable individual embedded modules at runtime
  • Signature bypass capped at High (2): Extreme and Seccomp are not allowed in this mode

Comparison

ItemLocal (--manager)Integrated (--embed)
Manager requiredYesNo
Module sourceManager on deviceEmbedded in APK assets
Dynamic module switchingYes (via Manager)No (requires re-patch)
Standalone distributionNo (no effect without Manager)Yes
Patched APK sizeSmallerLarger (includes modules)
Max signature bypassSeccomp (4)High (2)
CLI flag--manager--embed <module.apk>
Mutual exclusionCannot use with --embedCannot use with --manager

Can I Mix Both?

Yes — on the same device you can have app A patched with Local mode and app B patched with Integrated mode. They don't interfere. The Manager only sees Local mode apps; Integrated mode apps operate independently.

Other Options

Regardless of mode, these options work with both:

  • --sigbypasslv 0~4 — Signature bypass level (Integrated mode ≤ 2)
  • --useMicroG — Redirect GMS calls to community MicroG (e.g., ReVanced GmsCore), adds fake-signature metadata and FAKE_PACKAGE_SIGNATURE permission to manifest
  • --injectdex — For apps with isolated processes (e.g., browser renderers), ensures proper loading
  • --provider — Inject file picker (from MT Manager) to manage data directory files without Root
  • --debuggable — Mark app as debuggable
  • --allowdown / -r — Set output versionCode to 1, allowing future downgrades

Full CLI options: Usage. Manager capabilities: Manager & Shizuku.

How to Choose

Quick decision guide:

  • Personal use, will adjust modules → Local mode
  • Distributing to others → Integrated mode
  • Single device, fixed modules, don't want to install Manager → Integrated mode
  • Modules update frequently → Local mode (Integrated requires re-patching each time)
  • App has strong signature verification, needs Extreme / Seccomp bypass → Local mode only

NPatch Official Documentation