Skip to content

Abort analysis and warn user when backup is encrypted#772

Open
besendorf wants to merge 2 commits intomainfrom
warn-encrypted-backup
Open

Abort analysis and warn user when backup is encrypted#772
besendorf wants to merge 2 commits intomainfrom
warn-encrypted-backup

Conversation

@besendorf
Copy link
Copy Markdown
Collaborator

Fixes #769

Summary

  • Adds a new EncryptedBackupError exception to mvt.common.module
  • In Manifest.run(), catches sqlite3.DatabaseError when querying Manifest.db — the error that occurs when the database is encrypted — and raises EncryptedBackupError
  • In Command.run(), catches EncryptedBackupError from run_module(), logs a clear critical message telling the user to decrypt the backup first using mvt-ios decrypt-backup, and stops the entire analysis immediately

Previously, running check-backup against an encrypted backup would silently continue through all modules, producing a flood of confusing "file is not a database" errors. Now the analysis aborts early with a single actionable message.

When `check-backup` is run against an encrypted backup, Manifest.db
cannot be opened as a plain SQLite database. Previously this caused
a flood of confusing "file is not a database" errors across all modules.

Now the Manifest module detects the sqlite3.DatabaseError on its first
query and raises a new EncryptedBackupError. This exception propagates
out of run_module() and is caught in Command.run(), which logs a clear
critical message instructing the user to decrypt the backup first with
`mvt-ios decrypt-backup`, then stops the analysis immediately.

Fixes #769
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 12, 2026

Coverage

Tests Skipped Failures Errors Time
110 1 💤 0 ❌ 0 🔥 9.525s ⏱️

@Max-RSF
Copy link
Copy Markdown
Contributor

Max-RSF commented Apr 13, 2026

Awesome! It works great for me and protects from so much confusion when starting with MVT 🎉

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.

Warn when trying to analyse encrypted Backup

2 participants