johanw666 / Signal-Android

Fork from a private messenger for Android with extra options added: full backup and (partial, ony text) xml backup of messages. Restore can happen at any time, not only after a fresh install. Import SMS database. Import of (unencrypted) WhatsApp databases. Removed apk expire. Choose between passphrase protection and the Android screenlock. Choice for the backup location (internal or removable storage on Android < 11 (on 11 and higher this is already possible)). Set the maptype in the place picker. Option to treat view-once media as normal media. Option to ignore remote deletion. Choose between FCM or websocket notification delivery.
https://johanw.home.xs4all.nl/Signal/signal-jw.html
GNU Affero General Public License v3.0
246 stars 16 forks source link

Unable to restore encrypted ZIP file backups #59

Open Terrance opened 1 year ago

Terrance commented 1 year ago

I had to fumble around a bit trying to restore the custom backups of my messages -- by default they weren't being recognised:

I double-checked the storage location and the built-in Chat backups settings, and the paths are correct (/sdcard/Backups/Signal in this case, with FullBackups/SignalExport.zip and PlaintextBackups/SignalPlaintextBackup.zip inside).

The existing backups I had (both plaintext and full) were created with both the corresponding "store in zipfile" options enabled.

I had the backups password to hand and have successfully decrypted the backups on another device -- what I ended up doing was re-zipping the full backup without a ZIP file password, moving that in place of the existing backup at FullBackups/SignalExport.zip, and then using the Restore encrypted backup option, at which point it restored successfully.

Device info

Device: OnePlus Nord CE Android version: 12 (OxygenOS 12.1) Signal version: 5.40.4.0-JW (I'm aware this is old, I started with the same version used to create the backups)

Looks like the log file export only goes back 10 minutes, so I missed the useful output -- if there's interest in this then I can try it on another device and see if it's reproducible.

johanw666 commented 1 year ago

Seems the Signal install didn't know the key of the zipfiles. That should be restored when restoring a default backup but otherwise I'm afraid this method is the only way around. I should add a password entry field if the zipfile can't be decrypted due to a missing password.