mossblaser / signal_for_android_decryption

An (unofficial) tool which decrypts backup files produced by the Signal Android app.
GNU General Public License v3.0
37 stars 8 forks source link

Error parsing message with type 'signal.BackupFrame' with backup from current version of Signal-Android (6.37.2) #5

Closed lapseofreason closed 10 months ago

lapseofreason commented 10 months ago

When I try to decrypt a backup created with the current version of Signal-Android (6.37.2), the following exception is raised:

[user@localhost signal_for_android_decryption]$ python decrypt_backup.py ./signal-2023-10-29-10-33-54.backup ./signal_output/
Backup passphrase: 
Traceback (most recent call last):
  File "/home/user/signal_for_android_decryption/decrypt_backup.py", line 402, in <module>
    main()
  File "/home/user/signal_for_android_decryption/decrypt_backup.py", line 389, in main
    for _ in decrypt_backup(
  File "/home/user/signal_for_android_decryption/decrypt_backup.py", line 248, in decrypt_backup
    backup_frame = decrypt_frame(
                   ^^^^^^^^^^^^^^
  File "/home/user/signal_for_android_decryption/decrypt_backup.py", line 131, in decrypt_frame
    return BackupFrame.FromString(frame_bytes)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
google.protobuf.message.DecodeError: Error parsing message with type 'signal.BackupFrame'

Versions used: Python 3.11.6 cryptography==37.0.2 protobuf==3.19.6

Might be related to https://github.com/mossblaser/signal_for_android_decryption/issues/4 or https://github.com/pajowu/signal-backup-decode/issues/63.

What I already tried:

  1. The same error is raised when I provide an incorrect passphrase, so I verified the passphrase in Signal-Android to exclude that as the source of the problem.
  2. I updated the Backups.proto from here https://github.com/signalapp/Signal-Android/blob/c6473ca9e63236af3eae9959a50cfa643d53272e/app/src/main/protowire/Backups.proto and ran protoc -I=. --python_out=. Backups.proto.
  3. I added some comments to the code to see which frame the problem occurs in. It seems to be the first frame in the loop.

I'd be happy to debug this further if anyone has some pointers of what else I could try.

lapseofreason commented 10 months ago

I'm closing this as I think this is caused by #4.