https://github.com/signalapp/Signal-Android/issues/1014 Skip to content Sign up * Why GitHub? Features - + Code review + Project management + Integrations + Actions + Packages + Security + Team management + Hosting + Mobile + Customer stories - + Security - * Team * Enterprise * Explore + Explore GitHub - Learn & contribute + Topics + Collections + Trending + Learning Lab + Open source guides Connect with others + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing Plans - + Compare plans + Contact Sales + Nonprofit - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} signalapp / Signal-Android * Watch 787 * Star 14.7k * Fork 3.7k * Code * Issues 821 * Pull requests 134 * Actions * Projects 1 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights New issue Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Pick a username [ ] Email Address [ ] Password [ ] [ ] Sign up for GitHub By clicking "Sign up for GitHub", you agree to our terms of service and privacy statement. We'll occasionally send you account related emails. Already on GitHub? Sign in to your account Jump to bottom WhatsApp Import #1014 Closed Dischi opened this issue Mar 4, 2014 * 33 comments Closed WhatsApp Import #1014 Dischi opened this issue Mar 4, 2014 * 33 comments Comments @Dischi Copy link Quote reply @Dischi Dischi commented Mar 4, 2014 Similar to SMS import it would be nice to have a WhatApp import. I (like others) used WhatApp and would like to keep my old chat history. I have no idea how to get the data from WhatsApp but there are many tools at the Play Store with such a feature, maybe one is open source, too. The text was updated successfully, but these errors were encountered: 48 [?] 10 @lxgr Copy link Contributor @lxgr lxgr commented Mar 4, 2014 On Android, WhatsApp supports writing a database backup to the shared storage. The backup contains all messages in an sqlite file "encrypted" by an AES key which is hardcoded into the application... This is of course ridiculous from a security point of view (not unlike using the same RC4 keystream in both directions), but including that key in TextSecure might cause legal problems for this project. @Dischi Copy link Author @Dischi Dischi commented Mar 4, 2014 I agree, that could cause problems. Too bad they encrypt it since the encryption is useless. WhatsApp supports sending a chat via mail. It would be some extra steps, but maybe import that mail somehow? @moxie0 Copy link Member @moxie0 moxie0 commented Mar 4, 2014 I don't think we can do this. 9 [?] 2 4 @moxie0 moxie0 closed this Mar 4, 2014 @janisz Copy link @janisz janisz commented Jan 7, 2021 I thik we can do slightly different approach. What's app allows exporting chat in txt from https://faq.whatsapp.com /android/chats/how-to-save-your-chat-history/?lang=en It looks like this dd.mm.yyyy, HH:MM - Author: text e.g.: 21.12.2019, 14:00 - John Doe: OK Using this approach we should be able to easily migrate chats. 10 3 @janisz janisz mentioned this issue Jan 8, 2021 Allow chat history import from CSV #10372 Closed @michi7801 Copy link @michi7801 michi7801 commented Jan 8, 2021 Doing it this way would lead to a loss of the included media, but the feature would help a lot of people to get rid of whatsapp and in the end it is better than nothing. 11 @lxgr Copy link Contributor @lxgr lxgr commented Jan 8, 2021 A lot has changed since 2014: Backups are now encrypted with a per-account key that's supplied by WhatsApp servers after recovering an account as far as I know On the other hand, there is now GDPR and other legal provisions for the right to export your own data in some form in many countries. I don't know how applicable this is to client-side data, though. Maybe it helps that at least in Germany, chat to HTML export is no longer available (for patent reasons), so potentially WhatsApp could be required to offer another, maybe more machine-readable export format? 3 @michi7801 Copy link @michi7801 michi7801 commented Jan 8, 2021 * edited At least for me and I am living in Austria, WhatsApp has a export feature which gives you a plain .txt file which is formatted like a log file. The format is like: [date] User: message @lxgr Copy link Contributor @lxgr lxgr commented Jan 8, 2021 * edited This feature is unavailable in Germany due to patent concerns: https: //www.teltarif.de/whatsapp-chat-exportieren-iphone/news/79156.html (article in German) 3 @michi7801 Copy link @michi7801 michi7801 commented Jan 8, 2021 * edited Ok, pretty weird. At least here in Austria (and I suppose in Switzerland too?) this feature is still available. Anyway, as you already state (according to the GDPR) somehow WhatsApp must supplier you with the data they store about you and this is clearly the case with your whole chat history. Edit: The article also states that this is only the case in Germany due to "national regulations" 1 @janisz Copy link @janisz janisz commented Jan 8, 2021 I created community feature request 12 @crisdeodates Copy link @crisdeodates crisdeodates commented Jan 8, 2021 I would strongly upvote for this feature. I used whatsapp exclusively for everything and would like to switch to signal. But wanna shift all my msgs and groups to the new platform too. Its not just me, everyone who is planning to migrate to signal will be pleased to have this. If you enable this, you can assure that signal would surpass WhatsApp in usage. [?] 39 @Brucki Copy link @Brucki Brucki commented Jan 8, 2021 That would be amazing. It's one of the reasons which prevents me to switch completely to Signal. 1 @doersino Copy link @doersino doersino commented Jan 8, 2021 * edited somehow WhatsApp must supplier you with the data they store about you and this is clearly the case with your whole chat history. Does WhatApp permanently keep any message data on their servers, or are messages removed once downloaded by the client(s) (remember that chat backups are performed via Google Drive/iCloud, not through some WhatApp-operated service)? If so, I'm not sure whether GDPR applies in the usual fashion. (I'm on the same page with all of you: There should be a way to export full chat data.) @icyphox Copy link @icyphox icyphox commented Jan 8, 2021 @doersino Quoting their privacy policy: If a message cannot be delivered immediately (for example, if you are offline), we may keep it on our servers for up to 30 days as we try to deliver it. If a message is still undelivered after 30 days, we delete it. 1 @Marioheld Copy link @Marioheld Marioheld commented Jan 8, 2021 At least on iOS it is possible to extract WhatsApp Chats with media. There is a Software called iMazing and it can extract WhatsApp Chats to CSV, Excel, TXT, PDF including: * Group events (who joined and who left a group and when) * Message status: sent, delivered, read, deleted * Contact, location and link sharing * All types of attachments: photos, videos, audio and files Source: https://imazing.com/ print-and-export-iphone-whatsapp-chats 2 @crisdeodates Copy link @crisdeodates crisdeodates commented Jan 8, 2021 somehow WhatsApp must supplier you with the data they store about you and this is clearly the case with your whole chat history. Does WhatApp permanently keep any message data on their servers, or are messages removed once downloaded by the client(s) (remember that chat backups are performed via Google Drive/ iCloud, not through some WhatApp-operated service)? If so, I'm not sure whether GDPR applies in the usual fashion. (I'm on the same page with all of you: There should be a way to export full chat data.) This is interesting. If you consider their web application, it should be retrieving the data from their web servers right? Plz let me know if I am wrong. So there should be some kind of msg storage available in their servers. Even we can go to old message history as far as it allows. @madrian-es Copy link @madrian-es madrian-es commented Jan 8, 2021 This is interesting. If you consider their web application, it should be retrieving the data from their web servers right? Plz let me know if I am wrong. So there should be some kind of msg storage available in their servers. Even we can go to old message history as far as it allows. Web app retrieves messages from the phone, not the servers. At least in theory. 5 @giovanialtelino Copy link @giovanialtelino giovanialtelino commented Jan 8, 2021 * edited Okay, found the issue in HN, I tried to do something similar a while ago, my idea was to offer something like a SAAS CRM using Whatsapp, due to it's huge user base. https://github.com/giovanialtelino/WhatsappMonitor But it's pretty much impossible to officialy backup all your stuff, groups and chats are limited to 40k messages, more than that it will be lost. Your rich media (images, audios, videos) have no official position, only date. You can only backup one chat/group per time (no backup everything choice). Your .txt backup has different date time format, it will consider your location, for example here in Brazil it's "dd/MM/yyyy HH:mm". The main issue is lost message, and the need to backup every single chat, I personally have more than 100 chats, so a lot would be lost... There are unnoficial tools like this one (https://github.com/B16f00t/ whapa) that allow you to access your backup archive in the cloud and extract it, but at least for what I wanted to do it wasn't good enough, since it wasn't a official tool, but maybe it can help you guys. @michi7801 Copy link @michi7801 michi7801 commented Jan 8, 2021 Does WhatApp permanently keep any message data on their servers, or are messages removed once downloaded by the client(s) (remember that chat backups are performed via Google Drive/ iCloud, not through some WhatApp-operated service)? If so, I'm not sure whether GDPR applies in the usual fashion. So if I am correct, Whatsapp stores a key for your data, which itself is in the iCloud or Google Drive. So according to the GDPR Whatsapp must supply the key to me if i asked them to, because it is data which is related to me, isn't it? @nhh Copy link @nhh nhh commented Jan 8, 2021 I installed Whatsapp Business to have a autoresponder. I also completely disabled Notifications afterwards. So for a migration period everyone who writes me in whatsapp gets a small text where to find me. (Signal) [?] 7 @michi7801 Copy link @michi7801 michi7801 commented Jan 8, 2021 Okay, found the issue in HN, I tried to do something similar a while ago, my idea was to offer something like a SAAS CRM using Whatsapp, due to it's huge user base. https://github.com/giovanialtelino/WhatsappMonitor But it's pretty much impossible to officialy backup all your stuff, groups and chats are limited to 40k messages, more than that it will be lost. Your rich media (images, audios, videos) have no official position, only date. You can only backup one chat/group per time (no backup everything choice). Your .txt backup has different date time format, it will consider your location, for example here in Brazil it's "dd/MM/yyyy HH:mm". The main issue is lost message, and the need to backup every single chat, I personally have more than 100 chats, so a lot would be lost... There are unnoficial tools like this one (https://github.com/ B16f00t/whapa) that allow you to access your backup archive in the cloud and extract it, but at least for what I wanted to do it wasn't good enough, since it wasn't a official tool, but maybe it can help you guys. Yeah but a tool to at least backup the most import stuff (and even if it is without media) is better than no tool at all. The problem with the date seems like the biggest issue to me, but this could be handled with a library too. @Marioheld Copy link @Marioheld Marioheld commented Jan 8, 2021 This is interesting. If you consider their web application, it should be retrieving the data from their web servers right? Plz let me know if I am wrong. So there should be some kind of msg storage available in their servers. Even we can go to old message history as far as it allows. Web app retrieves messages from the phone, not the servers. At least in theory. WhatsApp Web is also not usable if your phone is powered off or have no wifi connection. @m000 Copy link @m000 m000 commented Jan 8, 2021 * edited I wonder, would a browser extension be a viable approach to exporting messages? I.e. open WhatsApp Web with your phone powered on, and let the extension scrape your data in a format you can import from Signal. @eeeeeta Copy link @eeeeeta eeeeeta commented Jan 8, 2021 So using one of the reverse-engineered WhatsApp Web libraries, like go-whatsapp (or my own whatscl) lets you create a pretty complete backup of all of your conversations + media. (whatsxmpp uses this to populate its database with your group chat history, so it does indeed work.) That could be one avenue to look down if anyone was interested in implementing this feature... 1 @janisz Copy link @janisz janisz commented Jan 8, 2021 Extracting data from WhatsApp is one part. The problem is that there is no support for importing foreign chats into singal other than full restore from backup or read from SMS that works only for Android. There is Signal for Android fork https://github.com/johanw666/ Signal-Android by @johanw666 but it only support SMS format so it can't handle multi user conversation 1 @x0rzavi Copy link @x0rzavi x0rzavi commented Jan 8, 2021 On Android, WhatsApp supports writing a database backup to the shared storage. The backup contains all messages in an sqlite file "encrypted" by an AES key which is hardcoded into the application... This is of course ridiculous from a security point of view (not unlike using the same RC4 keystream in both directions), but including that key in TextSecure might cause legal problems for this project. If I do remember correctly then the key used to decrypt is found in WhatsApp app data directory and can be decrypted by an app, whose name I don't remember either @juanvisbalco Copy link @juanvisbalco juanvisbalco commented Jan 8, 2021 Doing it this way would lead to a loss of the included media, but the feature would help a lot of people to get rid of whatsapp and in the end it is better than nothing. Agreed. I think the most important part is being able to port conversation history and existing groups. 1 @ariandyy Copy link @ariandyy ariandyy commented Jan 8, 2021 On Android, WhatsApp supports writing a database backup to the shared storage. The backup contains all messages in an sqlite file "encrypted" by an AES key which is hardcoded into the application... This is of course ridiculous from a security point of view (not unlike using the same RC4 keystream in both directions), but including that key in TextSecure might cause legal problems for this project. If I do remember correctly then the key used to decrypt is found in WhatsApp app data directory and can be decrypted by an app, whose name I don't remember either Yes, the private key to decrypt the backup is located in the local (sandboxed) app directory. If the device in question is rooted, one can obtain it easily, and parse the chat database with project like [0]. One trick is to move/transfer WhatsApp temporarily to old rooted Android and extract the private key and the encrypted backups. If rooting is not an option, there is a method that involves spawning an android emulator (which is already "rooted"), install WhatsApp apk inside there, "transfer" the WhatsApp account temporarily, and then the private key can be extracted. [0] https://github.com/B16f00t/whapa @doph Copy link @doph doph commented Jan 8, 2021 I've been looking into this and have considered the following workflow: 1. pre-create groups i want to move over to signal from whatsapp 2. acquire and decrypt signal backup (using https://github.com/ bepaald/signalbackup-tools) 3. acquire and decrypt whatsapp backup (using https://github.com/ B16f00t/whapa) 4. merge chats from whatsapp db into signal db 5. re-encrpyt signal db and restore on phone I've gotten partway through step 3 (trying to acquire whatsapp key), but having seen the signal database schema from step 2, I'm not confident... 1 @fschrempf Copy link @fschrempf fschrempf commented Jan 8, 2021 * edited 3. acquire and decrypt whatsapp backup (using https://github.com /B16f00t/whapa) I can't find a reliable way to do this on non-rooted Android devices. Aquiring the backup is not a problem, but how to retrieve the key for decryption? Edit: I guess the answer is something like mentioned above (#1014 (comment)), but it's quite an effort to set this up and get it working. The last time I tried this using https://github.com/MarcoG3/ WhatsDump it didn't succeed. @jlalfonso21 Copy link @jlalfonso21 jlalfonso21 commented Jan 8, 2021 I thik we can do slightly different approach. What's app allows exporting chat in txt from https:// faq.whatsapp.com/android/chats/how-to-save-your-chat-history/? lang=en It looks like this dd.mm.yyyy, HH:MM - Author: text e.g.: 21.12.2019, 14:00 - John Doe: OK Using this approach we should be able to easily migrate chats. This can be confusing and maybe need a identifier in the txt file for the phone number of the other user @janisz Copy link @janisz janisz commented Jan 8, 2021 How about semi manual step. We can use chat export to get unencrypted backup of chats and then convert it into signal backup. Alternatively there could be an import chat history option in Signal app (just like export in wahtsapp) so no third party app will be involved and this process could be done by non technical users. @janisz Copy link @janisz janisz commented Jan 8, 2021 This can be confusing and maybe need a identifier in the txt file for the phone number of the other user Yes this might be a problem but as long and names in WhatsApp and Signal matches it should work. We can add one confirmation step to allow user choose which contacts are in chat and match WhatsApp names with Signal IDs @bkqtnte10 bkqtnte10 mentioned this issue Jan 8, 2021 Migrate whatsapp chat history to signal #10382 Open 0 of 4 tasks complete Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Assignees No one assigned Labels None yet Projects None yet Milestone No milestone Linked pull requests Successfully merging a pull request may close this issue. None yet 21 participants @m000 @moxie0 @lxgr @juanvisbalco @Dischi @janisz @doersino @ariandyy @Marioheld @Brucki @madrian-es @crisdeodates @eeeeeta @nhh @doph @icyphox @fschrempf @michi7801 @giovanialtelino @jlalfonso21 and others * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Help * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.