Skip to content

Add Settings option to hide manager package name from install detection#96

Open
shakir2117 wants to merge 1 commit into
JingMatrix:masterfrom
shakir2117:hide-packagename
Open

Add Settings option to hide manager package name from install detection#96
shakir2117 wants to merge 1 commit into
JingMatrix:masterfrom
shakir2117:hide-packagename

Conversation

@shakir2117

@shakir2117 shakir2117 commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • Adds a Settings flow to reinstall the manager under a custom package name so other apps cannot detect LSPatch via known-package queries (org.lsposed.lspatch).
  • Decouples Local-mode patched apps from the hardcoded manager package by storing managerPackageName in patch config (metaloader + binder use the configured package; service class stays org.lsposed.lspatch.manager.ModuleService).
  • When cloaked, Settings shows Revert to original, which downloads the latest manager.apk from JingMatrix/LSPatch GitHub releases, restores settings/data, retargets Local apps, installs org.lsposed.lspatch, and uninstalls the cloaked package.

Motivation

Apps can detect LSPatch by checking whether org.lsposed.lspatch is installed. Android cannot rename an installed app in place, so this feature rebuilds/installs under a new id and keeps Local-mode working by updating patch config / loaders.

Implementation notes

  • Cloak: rewrite manifest package + package-prefixed permissions/authorities, keep resources.arsc STORED/4-byte aligned, resign, migrate prefs/db/keystore via an embedded zip, batch-update Local apps, then remove the old package.
  • Requires Shizuku and a configured storage directory (same as patching).
  • Does not hide detection by signature, app label, exported components, or other fingerprinting—only known-package-name checks.

Test plan

  • On stock package: Settings shows Hide package name; cloak with random/custom id succeeds (Shizuku + storage set)
  • After cloak: org.lsposed.lspatch is gone; new package is installed and launchable
  • Local-mode patched apps still connect to the cloaked manager and load modules
  • New Local patches store the current manager package in config
  • On cloaked package: Settings shows Revert to original; revert installs latest GitHub manager as org.lsposed.lspatch and removes the cloaked app
  • Integrated (non-manager) patches are unaffected

Cloak reinstalls under a custom package id, keeps Local patches working
via managerPackageName in patch config, and supports revert from GitHub.
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