tbvdm / sigbak

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

Error messages with Signal v6.5.2 backup #8

Closed DeltaTangoLima closed 1 year ago

DeltaTangoLima commented 1 year ago

I've been attempting to use sigbak to export data out from my latest Signal backup, made with Signal v6.5.2 for Android, but I keep getting errors, which vary based on the sigbak command I try. The errors make me think perhaps Signal have changed DB schema.

Examples:

# sigbak messages -f csv signal-2022-12-12-02-00-01.backup sig.csv
Enter 30-digit passphrase (whitespace is ignored):
sigbak: Cannot get messages: Cannot prepare SQL statement: no such column: address
# sigbak attachments ./signal-2022-12-12-02-00-01.backup
Enter 30-digit passphrase (whitespace is ignored):
sigbak: Cannot prepare SQL statement: no such column: m.date
# sigbak threads signal-2022-12-12-02-00-01.backup
Enter 30-digit passphrase (whitespace is ignored):
sigbak: Cannot prepare SQL statement: no such column: thread_recipient_id

I verified my Signal backup password is correct - I get MAC mismatch error if I try a known bad password. I also used a different project (signalbackup-tools) to successfully extract the database from my backup, using the same password.

tbvdm commented 1 year ago

Yes, the database schema has changed. I've committed a fix on a test branch. Could you give it a try?

git clone -b test https://github.com/tbvdm/sigbak.git
cd sigbak
make
./sigbak messages ...
./sigbak attachments ...
./sigbak threads ...
DeltaTangoLima commented 1 year ago

make (on macOS) is giving me errors, and it's beyond my capability to figure out (more of a Python guy than a compiled C guy). Any chance you'll push this into your Homebrew tap at some point soon?

tbvdm commented 1 year ago

On macOS the build procedure is slightly different. This should work:

brew install libressl make pkg-config protobuf-c sqlite
cd path/to/sigbak
PKG_CONFIG_PATH=$(brew --prefix)/opt/libressl/lib/pkgconfig gmake
./sigbak ...
DeltaTangoLima commented 1 year ago

Thanks for the tip, but I'm getting the same errors trying to build. I tried searching for some answers, but went down a rabbit hole I don't understand, about using different compilers, installing variations of Xcode tools, etc.

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
tbvdm commented 1 year ago

Hmm, that's odd. Alright, I'll commit the fix on the regular branches later today so you can update via brew.

tbvdm commented 1 year ago

Please try this:

brew upgrade --fetch-HEAD sigbak
sigbak att signal-2022-12-12-02-00-01.backup attachments
sigbak msg signal-2022-12-12-02-00-01.backup messages

This should export your attachments and messages to the attachments and messages directories, respectively.

(Also note that the sigbak commands have changed. See the manual page for details.)

DeltaTangoLima commented 1 year ago

Fantastic - the updated version worked perfectly. Thanks.