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
250 stars 16 forks source link

Restore an encrypted backup from external memory (sdcard) #6

Closed Go-rom closed 4 years ago

Go-rom commented 4 years ago

Bug description

When i try to restore an encrypted backup (made with the "official" app) with your improved version of Signal, the app answers "No encrypted backup found"

Steps to reproduce

Actual result: it says "no encrypted backup found" Expected result: Restoring my encrypted backup (made with the "official" Signal")

Screenshots

No Screenshots

Device info

Device: Samsung A300-FU (A3 2015) Android version: 6.0.1 Signal version: 4.58.5.0-JW

Link to debug log

https://debuglogs.org/0b42d7fa3b285ed21472a9cfbe60f1ef50332dbe0985f0a9badeef1e47312c07

Thank you !

johanw666 commented 4 years ago

You should select the option Chats and Media - Backups - Backup Location so the backup will be searched at that location. And it need to be in the FullBackups subdirectory.

Go-rom commented 4 years ago

Hello @johanw666

Yes about the Backup Location switch,i did that. I forgot to mention it into my initial post, sorry. I tried with FullBackups subdirectory and Backups subdirectory

But maybe i'm wrong when i'm talking about encrypted backup.

I read this on your website (https://johanw.home.xs4all.nl/Signal/signal-jw.html)

And the several types of backups are stored in their own subdirectories:

  1. Standard backups : Backups
  2. Encrypted backups: FullBackups
  3. Plaintext backups: PlaintextBackups

I would say that i match the first case : Standard backup because i made it with the official app. Question : is your app allows to restore a standard backup from Sd Card ? If yes, how can i do that ?

Thank you

johanw666 commented 4 years ago

Ah yes, I didn't read your post well enough. If you have a backup made with the official client it needs to be in Backups, but you can only restore it during registration when you have no data already present. The import/export screen only looks at the FullBackups and PlaintextBackups directories, both need the backup to be in a specific format so copying the official backup there won't work.

At first app start (or after the deletion of all appdata, be carefull because that also wipes [root of removable storage]/Android/data/org.thoughtcrime.securesms/* ) you can put the official backup in the internal storage\Signal\Backups dir and restore then. Checking the code I see now that the option to restore the first time from removable storage does not work, I will fix that ASAP.

I realize the backup options in my fork are not quite as well organize as they should be and I'm working on ideas to improve that but that is work in progress that does not work yet.

johanw666 commented 4 years ago

Fixed in 4.58.5.1-JW.

Go-rom commented 4 years ago

Hello @johanw666

I realize the backup options in my fork are not quite as well organize as they should be and I'm working on ideas to improve that but that is work in progress that does not work yet.

Well maybe for you as a developer, it may be not enough but from my point of view, what you're offering to signal users is already much more than the official app. I'm encountering a major issue of storage (16gb internal storage only) and thanks to your fork, now there's a workaround.

By the way, i've tested your new release and the import from SD card was successful so thank you for your help, the quick fix and globally for this fork.