Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrivacyKit PRO Patcher

An automated, one-command patcher that turns a PrivacyKit APK (com.sal.privacykit) into a fully offline, PRO-unlocked build — no billing, no license keys, no subscriptions, no server contact.

PrivacyKit is an excellent Android privacy tool (LSPosed module) by sal. If you find it useful, consider supporting its developer.


What it does

Every feature gate in PrivacyKit funnels through a single class: com.sal.privacykit.data.license.LicenseRepository. The app locks the UI, enforces a 1-profile free limit, and blocks backup-restore whenever the license plan resolves to EXPIRED / inactive.

This patcher rewrites the three methods that produce license state so they always return a hardcoded entitlement:

Method Original behaviour Patched behaviour
currentStatus() Reads cached/server-signed entitlement, computes trial/expiry Returns LicenseStatus(plan=PRO, state=ACTIVE, expires=2100)
verify-gIAlu-s(key) ECDSA + server challenge-response key verification Always Result.success(PRO status)
refreshActiveLicense() Periodic remote refresh with rollback detection Always Result.success(PRO status)

Because all consumers (navigation lock screen, profile-limit checks, Unlock-Pro / License-Lock screens, settings restore) only ever read this status, the entire app behaves as an activated PRO install. The patched build makes zero network calls for licensing.

How it works

 input.apk ─▶ apktool d ─▶ patch smali ─▶ smali a (classesN.dex)
                                              │
              ┌───────────────────────────────┘
              ▼
 original.apk ──(dex swap via zipfile)──▶ zipalign ──▶ apksigner v1+v2+v3 ──▶ output-pro.apk

Only the patched dex is rebuilt and swapped into a copy of the original APK. Resources are never recompiled — this sidesteps known apktool failures with Material Design's $-prefixed drawable names.

Requirements

  • Python 3.8+
  • Java JDK 11+ (java, keytool)
  • One of:
    • Debian/Kali/WSL: sudo apt install apktool smali (signing tools are fetched automatically, no root needed), or
    • Any OS (Windows/macOS/Termux): a tools/ directory containing apktool.jar, smali.jar, and apksigner.jar + zipalign binary, passed via --tools-dir
sudo apt update && sudo apt install -y python3 default-jdk apktool smali   # Debian-likes

The patcher auto-resolves every tool: binaries on PATH first, then jars (--tools-dir or system jar dirs). See docs/TECHNICAL.md section 9 for the full resolution logic.

Usage

Drop your PrivacyKit APK next to patch.py and run:

python3 patch.py

The tool auto-discovers *.apk in the project directory (skipping previous outputs), patches it, and writes e.g. privacykit-pro-v1.13.apk.

usage: patch.py [-h] [--apk PATH] [--out-dir DIR] [--workdir DIR] [--tools-dir DIR] [--keep]

options:
  --apk PATH        input APK path (default: auto-discover in project dir)
  --out-dir DIR     where to write the final APK   (default: current dir)
  --workdir DIR     scratch directory              (default: <out-dir>/.build)
  --tools-dir DIR   dir with tool binaries/jars    (Windows/macOS/Termux setup)
  --keep            keep intermediate files for inspection

Windows / macOS / Termux

Works with the JDK + jars layout:

python3 patch.py --tools-dir ./tools

Platform-specific notes and current test status: CONTRIBUTING.md - Cross-platform status.

Documentation

Doc Contents
docs/TECHNICAL.md Full internals: license subsystem analysis, smali stub anatomy, build pipeline, update playbook for new app versions, failure catalogue, roadmap to full automation
CONTRIBUTING.md Dev workflow, validation checklist, cross-platform porting matrix, contribution ideas

Install the result

adb install -r privacykit-pro-v1.13.apk

Important: the build is signed with a fresh local debug key, so Android will refuse to update the stock installation. Uninstall the original app first (app data resets once).

Compatibility

Tested against PrivacyKit 1.13 (versionCode 15). The patcher verifies that all three target methods exist before touching anything and fails loudly on unknown versions instead of producing a broken build. For updating the tool to handle a newer release, follow the update playbook.

Troubleshooting

Problem Fix
Missing required tools: ... Install the packages listed under Requirements
Could not download 'apksigner' via apt-get Run sudo apt update, or sudo apt install apksigner zipalign libzopfli1 manually
unsupported app version The smali layout changed in a newer release; re-inspect LicenseRepository.smali and update METHODS
APK installs but doesn't open Make sure the stock app was fully uninstalled first
WSL: keytool: command not found Install a JDK: sudo apt install default-jdk

Legal & disclaimer

This project is provided for educational and personal use only. It does not distribute any copyrighted binaries — you must supply your own copy of the application. Redistribution of pre-patched APKs is not supported and release assets are intentionally kept binary-free. If you like PrivacyKit, buy a license to support its development.

Repository contents

Since no binaries are hosted here, clone the repo, drop in your own APK, run python3 patch.py, and you're done.

About

One-command patcher that turns PrivacyKit (com.sal.privacykit) into a fully offline PRO-unlocked build. Bring your own APK — no binaries hosted.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages