tbvdm / sigbak

Export messages from Signal Android backups
86 stars 10 forks source link

SQLite outputs a database with an unexpected token #1

Closed pshem closed 4 years ago

pshem commented 4 years ago

After using sigbak to extract a signal backup to an SQLite database, I opened the database in sqlitebrowser, which discovered two unexpected tokens. Is this normal, or did I run into an edge case? The database passes integrity checks and contains what I would expect otherwise.

pshem@PiDell-K:~/z/source/sigbak$ ./sigbak sqlite ./signal-2020-02-20-11-56-23.backup ./signal_sqlite.db
pshem@PiDell-K:~/z/source/sigbak$ ./sigbak check
pshem@PiDell-K:~/z/research_android$ sqlitebrowser --read-only signal_sqlite.db 
Sqlite parse error: line 1:47: unexpected token: thread_id(CREATE VIRTUAL TABLE sms_fts USING fts5(body, thread_id UNINDEXED, content=sms, content_rowid=_id))
Sqlite parse error: line 1:47: unexpected token: thread_id(CREATE VIRTUAL TABLE mms_fts USING fts5(body, thread_id UNINDEXED, content=mms, content_rowid=_id))

I've built sigbak on Kubuntu 19.10 with the default toolchain of gcc 9.2.1.

pshem commented 4 years ago

Sorry, looks like the problem is with sqlitebrowser no loading the fts5 extension. My bad!

tbvdm commented 4 years ago

No worries. But yes, this is expected. It seems that sqlitebrowser doesn't understand the UNINDEXED option.