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

Feature request: Import Signal desktop database #50

Closed nettnikl closed 2 years ago

nettnikl commented 2 years ago

Hi!

What

I would like to ask for the possibility to import a Signal Desktop database/backup back into the android app. If possible, but not necessarily merging with the existing content.

Use cases

But

Reasoning

There is a great need for seamless, pain-free import from Signal Desktop to Signal Android. This was most prominently asked for here: https://github.com/signalapp/Signal-Desktop/issues/522 but it naturally has been tackled by other projects and asked for elsewhere.

https://community.signalusers.org/t/backup-restore-from-desktop-to-android/29456 https://community.signalusers.org/t/importing-messages-from-desktop-to-mobile/1688/12 https://github.com/signalapp/Signal-Desktop/issues/4264 https://github.com/signalapp/Signal-Android/issues/12144 https://github.com/xeals/signal-back/issues/78 https://github.com/xeals/signal-back/issues/14

As you can see, also the non official projects with this reasoning are very popular.

https://github.com/tbvdm/sigtop https://github.com/carderne/signal-export

In addition, other projects seem to consider this project here to be the most advanced in what it does.

https://github.com/mollyim/mollyim-android/issues/71

Also, i see the official Signal team in quite a few cases ignoring requests by popular demand, as can be seen here.

https://github.com/signalapp/Signal-Android/issues/10618 https://github.com/signalapp/Signal-Android/commit/3134837d56bf5d20b7475a78d43f6f3ac4757b40

All in all, i have a strong feeling, this is the correct project to ask for this feature for. (Sorry for the long text + many links, but x-pinging helps to find all threads i found during my research.)

Issues and Problems

I've read that the db scheme is not only in general different (eg. where are media files stored https://community.signalusers.org/t/backup-restore-from-desktop-to-android/29456), but also changes from time to time. So, this feature may break - however

johanw666 commented 2 years ago

So, this feature may break

Yes, so it requires maintenance. Probably a lot of it. I already included someone else's WA import code in my fork, and adding an extra import could go in the same screen, but doing more than just import messages (which can be done already by putting them in an xml file and using plaintext import) will be a massive job: Signal desktop does not encrypt media so I'd have to write code for that to import it in the database too, it takes contacts from a coupled device so I don't know if there even is a 1:1 mapping possible here.

All in all it is a job that is larger than I have available time now.

nettnikl commented 2 years ago

Could you elaborate further?

What kind of encryption would be needed?

In the code i see some messages being stored as "sms", others as "mms", is this just internal Signal lingo for media messages and text messages?

What data do you need for each entry? Recipient, Text, Timestamp,... ?