github Pixel-Props/BetterKnownInstalled 1600
v1.6.0 (1600)

3 hours ago

BetterKnownInstalled v1.6.0

New

  • Stateful metadata database — BKI now tracks per-app original values in metadata.db (pipe-delimited: name|installer|installerUid|installInitiator|packageSource|installOriginator|isOrphaned|installInitiatorUninstalled).
  • First boot: scans packages.xml and builds the DB from original values, then patches.
  • Subsequent boots: prunes dead entries, detects newly installed apps, and re-applies patches. No more blind full-scan of every app on every boot.
  • Uninstall restoration — new uninstall.sh restores each app's exact original metadata from metadata.db during the uninstall reboot, then deletes the DB. Previously patched apps no longer stay locked as com.android.vending.
  • Atomic writes — all XML modifications are staged to .tmp and moved into place (cat > .tmp && mv -f), eliminating the risk of a half-written packages.xml on crash or power loss.

Fixes

  • Accurate uninstall — v1.5.x left every patched app as com.android.vending after uninstall because there was no record of what the original installer was. The DB solves this permanently.
  • Faster subsequent boots — DB prune + new-app detection adds ~50 ms instead of re-processing 500+ apps every boot.

Changes

  • Removed XML backup rotation — the old 4-file rotating backup scheme is gone. metadata.db is the authoritative backup of original values. A single packages.xml.safety text copy is kept for crash recovery only.
  • wait_for_data() moved to util_functions.sh — shared between post-fs-data.sh and uninstall.sh.
  • Added riscv64 architecture support in get_arch().

Technical

  • Engine: sed (unchanged) + single-pass awk for DB operations
  • State: metadata.db in module directory, rebuilt on first boot, pruned/updated on subsequent boots
  • Scope: unchanged — codePath="/data/app/" whitelist, system="true"/"1" guard
  • UID source: com.android.vending self-entry → existing Play Store app fallback

Upgrade Note

If upgrading from v1.5.x, the DB is built from the already patched packages.xml. Apps previously patched will have their patched values recorded as "originals," so uninstall will not revert those specific apps to their true pre-BKI state. Any app installed after v1.6.0 is fully tracked and will restore correctly.

Full Changelog

1520...1600

Don't miss a new BetterKnownInstalled release

NewReleases is sending notifications on new releases.