Skip to content

Conversation

@Floowen
Copy link

@Floowen Floowen commented Dec 9, 2025

This pull request improves the robustness and adaptability of several artifact extraction scripts by dynamically handling schema changes in SQLite databases and better managing timezone conversions. The main focus is on ensuring compatibility with different database versions and preventing errors when expected columns or tables are missing.

Dynamic SQL Query Adaptation (schema detection):

  • Facebook Messenger: Queries now check for the existence of columns like reaction_timestamp, friendship_status, and contact_relationship_status before including them in SQL statements, preventing failures on missing columns. [1] [2] [3]
  • Google Duo: The extraction of the "File Saved" status in messages now checks if the saved_status column exists before querying, ensuring compatibility with database schema changes. [1] [2]
  • Google Messages: SQL queries for attachment size and location are dynamically constructed based on the presence of file_size_bytes and local_cache_path columns.
  • Google Keep Notes: The script checks for the existence of the full-text search table and adapts its query accordingly, with error handling added for query failures. [1] [2] [3]

Timezone Handling Improvements:

  • Device Health Services (Battery & Bluetooth): Both functions now attempt to retrieve a timezone offset from the seeker object, defaulting to UTC if unavailable, and gracefully fall back to UTC timestamps if conversion fails. [1] [2] [3] [4]

Minor Bug Fixes and Improvements:

  • Google Duo and Keep Notes: Removed unnecessary tuple commas in data header definitions for clarity. [1] [2] [3]
  • Notification History: Improved file handling logic for XML files by switching from if to elif to prevent duplicate parsing. [1] [2]

These changes collectively make the artifact scripts more resilient to database schema differences and improve data accuracy and error handling.

@Floowen Floowen marked this pull request as ready for review December 9, 2025 18:19
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