Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in running extraction from module SMS: database disk image is malformed #25

Closed
N4M3Z opened this issue Jul 20, 2021 · 4 comments
Closed

Comments

@N4M3Z
Copy link

N4M3Z commented Jul 20, 2021

Running mvt-ios check-backup on a backup newly created idevicebackup2 backup --full and decrypted with mvt-ios decrypt-backup produced the following error:

         INFO     [mvt.ios.modules.fs.sms] Found SMS database at path: Backup/3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28
         ERROR    [mvt.ios.modules.fs.sms] Error in running extraction from module SMS: database disk image is malformed
                  Traceback (most recent call last):
                    File "/usr/local/lib/python3.9/site-packages/mvt/common/module.py", line 134, in run_module
                      module.run()
                    File "/usr/local/lib/python3.9/site-packages/mvt/ios/modules/fs/sms.py", line 57, in run
                      cur.execute("""
                  sqlite3.DatabaseError: database disk image is malformed

Analysis on other payloads works as expected (calls, chrome_favicon etc.).
The device in question has a history that goes back to 2009, so perhaps this is caused by an older attachment format?
(idevicebackup2 1.3.1, mvt at 425d83e).

@Te-k
Copy link
Contributor

Te-k commented Jul 21, 2021

Yep, some files in backups are malformed, there is a way to fix them with them with the .clone sqlite command

@SandMouse
Copy link

SandMouse commented Jul 21, 2021

May I add, I encounter an identical issue with mvt.ios.modules.fs.interactionc

ERROR    [mvt.ios.modules.fs.interactionc] Error in running extraction from module
                  InteractionC: database disk image is malformed
                  Traceback (most recent call last):
                    File "/usr/local/lib/python3.9/site-packages/mvt/common/module.py", line 134, in
                  run_module
                      module.run()
                    File "/usr/local/lib/python3.9/site-packages/mvt/ios/modules/fs/interactionc.py",
                  line 76, in run
                      cur.execute("""
                  sqlite3.DatabaseError: database disk image is malformed

@SandMouse
Copy link

SandMouse commented Jul 21, 2021

Yep, some files in backups are malformed, there is a way to fix them with them with the .clone sqlite command

Can you point me in the right direction how to manually fix this?

Answer to my own question: Use the clone tool, replace the original file.

(https://database.guide/clone-sqlite-database/)

@botherder
Copy link
Contributor

For example:

$ mv Backup/3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28 Backup/3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28.bak
$ sqlite3 Backup/3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28.bak
sqlite> .clone Backup/3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28

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

No branches or pull requests

4 participants