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

Unable to access SMS db (malformed) #17

Closed
zzph opened this issue Apr 18, 2023 · 2 comments
Closed

Unable to access SMS db (malformed) #17

zzph opened this issue Apr 18, 2023 · 2 comments

Comments

@zzph
Copy link

zzph commented Apr 18, 2023

Hi,

Awesome work on this project- thank you.

When I try to open /HomeDomain/Library/SMS/sms.db, it tells me "database disk image is malformed".

So I tried:
sqlite3 sms.db > .tables > ERROR: database disk image is malformed

I tried to take a dump to remove any issues- sqlite3 sms.db ".dump" | sqlite3 new.db but kept getting no such table errors such as
main.chat_handle_join.

Any ideas on how to fix this issue?

@MaxiHuHe04
Copy link
Owner

Hi!
It seems like the sms.db file often makes problems. I don't know why. In my backups, they work just fine and I haven't found any other corrupted files yet. That makes it hard to debug. I could imagine that the database wasn't saved in a consistent state before the backup.
Have you tried the .recover command instead of .dump like recommended in #1? Apparently, .clone has also worked for others: mvt-project/mvt#25 (comment).

@zzph
Copy link
Author

zzph commented Apr 20, 2023

Brilliant- that's the solve, using .recover.

So that's:

sqlite3 sms.db ".recover" | sqlite3 new.db

Again, thanks so much for the great work on this project

@zzph zzph closed this as completed Apr 20, 2023
@MaxiHuHe04 MaxiHuHe04 pinned this issue Apr 20, 2023
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

2 participants