Skip to content

Convert recentactivity to artifact_processor#857

Merged
abrignoni merged 1 commit into
mainfrom
convert-recentactivity
Jun 22, 2026
Merged

Convert recentactivity to artifact_processor#857
abrignoni merged 1 commit into
mainfrom
convert-recentactivity

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Converts the Recent Activity artifact (Android system_ce/<user>/recent_tasks snapshots & images) to LAVA @artifact_processor.

What changed

  • Was a per-uid ArtifactHtmlReport rendering a custom vertical key/value table plus two images per task. Now a single flat LAVA table, one row per recent task/activity, with all system_ce/<uid> profiles consolidated and a CE Profile discriminator column (avoids dynamic per-uid report names).
  • Dropped the scratch RecentAct_<uid>.db SQLite buffer entirely — rows are built directly in Python (the temp DB only ever existed to re-run datetime() conversions).
  • Media: snapshot (snapshots/<task_id>.jpg) and recent image (recent_images/...) moved from shutil.copy2 + inline <img> to check_in_media. Added explicit glob paths for the snapshots/ and recent_images/ subfolders so the seeker indexes those files — check_in_media resolves only against the current artifact's files_found.
  • first_active_time / last_active_time / last_time_moved (epoch ms) → timezone-aware UTC datetime columns (was datetime(x/1000,'UNIXEPOCH')).
  • Kept the full task- and activity-level attribute dicts as JSON columns for forensic completeness.

Verification

  • Compiles; pylint clean (-d C,R); PluginLoader loads 492 incl. get_recentactivity.
  • Column names pass the reserved-word audit (confirmed action is a non-reserved SQLite keyword via a live CREATE TABLE).
  • Fixture smoke test (synthetic system_ce/0 with an XML task + snapshot + icon): yields 1 row, 16 cols matching headers, timestamps as aware UTC, both media refs resolved.

- Single LAVA table (was a per-uid ArtifactHtmlReport with a custom
  key/value + image layout); all system_ce/<uid> profiles consolidated
  into one table with a 'CE Profile' discriminator column, one row per
  recent task/activity.
- Dropped the scratch RecentAct_<uid>.db buffer; build rows directly.
- Snapshot and recent-image media migrated from shutil.copy2 + inline
  <img> to check_in_media; added explicit glob paths for the snapshots/
  recent_images subfolders so the seeker tracks them (required for
  check_in_media resolution).
- first/last_active_time and last_time_moved (ms) -> aware UTC.
- Retained raw task/activity attribute dicts as JSON columns.
@abrignoni abrignoni merged commit 0992d1d into main Jun 22, 2026
2 checks passed
@abrignoni abrignoni deleted the convert-recentactivity branch June 22, 2026 02:39
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