Skip to content

Add developer-only App Inventory module for parsing-coverage analysis#938

Merged
abrignoni merged 2 commits into
mainfrom
app-inventory
Jul 8, 2026
Merged

Add developer-only App Inventory module for parsing-coverage analysis#938
abrignoni merged 2 commits into
mainfrom
app-inventory

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Summary

ALEAPP counterpart of abrignoni/iLEAPP#1680. Adds scripts/alternate_artifacts/appInventory.py — three developer-only artifacts that write machine-readable coverage data into the LAVA SQLite output (_lava_artifacts.db), so downstream tooling (batch-leapp) can determine which installed apps were NOT parsed by ALEAPP. No core/framework changes.

Not part of normal runs. Nothing in ALEAPP loads scripts/alternate_artifacts/. Developer tooling stages the module into scripts/artifacts/ for the duration of a coverage run (batch-leapp will automate this; a README in the folder documents manual use). ALEAPP does not have iLEAPP's --custom_artifacts_path CLI option — if that parity feature is ever ported, this module works with it unchanged.

Artifacts

  • extractionInfo: LEAPP name/version, input path/name, extraction type, report folder, plus Manufacturer / Brand / Model / Device / Android Version / SDK / Build ID / Fingerprint parsed directly from build.prop (system keys preferred over vendor; does not depend on artGlobals ordering).
  • installedAppInventory: one row per package from packages.xml — package name, install/update times (hex-ms converted to UTC, stored as LAVA datetime), installer, code path. Handles plain and Android Binary XML via the existing checkabx/abxread helpers; skips magisk /mirror/ duplicates.
  • appFileInventory (lava_only due to size): every file in the extraction with size and modified time, mapped to its owning package via /data/data/<pkg>, /data/user/<n>/<pkg>, /data/user_de/<n>/<pkg>, Android/{data,media,obb}/<pkg> and /data/app/.../<pkg>-* locations. Enumerates the seeker's existing listings (zip/tar central directory, dir walk) — no extraction/copying.

Modified Time is stored as text, not LAVA datetime: zip archives carry zone-less DOS timestamps, so UTC coercion would be wrong. Tar/dir values are UTC.

Testing

  • PYTHONPATH=. pylint --disable=C,R → 10.00
  • End-to-end run on a synthetic Android zip (build.prop + packages.xml + app data across all five location types): all three tables populate correctly; an app directory present under /data/data but absent from packages.xml is surfaced — the "on disk but unknown/unparsed" signal
  • Normal runs unaffected: the module lives outside scripts/artifacts/ and is never loaded

Three artifacts in scripts/alternate_artifacts/ (not loaded by normal
runs; staged into scripts/artifacts/ by developer tooling) that write
machine-readable coverage data into _lava_artifacts.db:

- extractionInfo: LEAPP version, input path/name, extraction type, and
  device identifiers parsed directly from build.prop (system preferred
  over vendor)
- installedAppInventory: one row per package from packages.xml with
  install/update times, installer and code path (plain and ABX formats)
- appFileInventory (lava_only): every file in the extraction with size
  and modified time, mapped to its owning package via /data/data,
  /data/user[_de], Android/{data,media,obb} and /data/app locations

Enables batch-leapp to diff installed apps against what the tooling
parsed. No core changes.
@abrignoni abrignoni merged commit 3d456f6 into main Jul 8, 2026
2 checks passed
@abrignoni abrignoni deleted the app-inventory branch July 8, 2026 22:22
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.

1 participant