Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.3.0

- Added SMS import from SMS xml export

## 1.2.1

- Fixed some messages are not shown after WhatsApp import from DB
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ See: [Signal](docs/Signal.md)

Import messages from:

- [SMS](docs/Sms.md)
- [Telegram](docs/Telegram.md)
- [WhatApp DB](docs/WhatApp_DB.md)
- [WhatApp export](docs/WhatApp_Export.md)
Expand All @@ -39,13 +40,15 @@ bin/move_to_signal.dart \

## Feature Map

| Name | Telegram | WhatApp DB | WhatApp export |
| :------------------------- | :------: | :--------: | :------------: |
| All 1-on-1 text messages | ✅ | ✅ | ❌ |
| Group chats | ❌ | ❌ | ❌ |
| Original timestamps | ✅ | ✅ | ❌ |
| Reactions (emoji) | ❌ | ✅ | ❌ |
| Media (images/audio/links) | ❌ | ❌ | ❌ |
| Name | SMS | Telegram | WhatApp DB | WhatApp export |
| :------------------------- | :-: | :------: | :--------: | :------------: |
| All 1-on-1 text messages | ✅ | ✅ | ✅ | ❌ |
| Group chats | ❌ | ❌ | ❌ | ❌ |
| Original timestamps | ✅ | ✅ | ✅ | ❌ |
| Reactions (emoji) | ❌ | ❌ | ✅ | ❌ |
| MMS Text | ❌ | - | - | - |
| MMS (images/audio/links) | ❌ | - | - | - |
| Media (images/audio/links) | ❌ | ❌ | ❌ | ❌ |

## Known issues

Expand Down
7 changes: 7 additions & 0 deletions bin/move_to_signal.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:move_to_signal/import/signal.dart';
import 'package:move_to_signal/source/sms.dart';
import 'package:move_to_signal/source/telegram.dart';
import 'package:move_to_signal/source/whats_app_db.dart';
import 'package:move_to_signal/source/whats_app_export.dart';
Expand All @@ -18,6 +19,12 @@ void main(List<String> arguments) {
}

switch (command) {
case 'ImportSms':
final smsImport = Sms();
smsImport.verbose = verbose;
smsImport.run(arguments);

break;
case 'ImportTelegram':
final telegramImport = Telegram();
telegramImport.verbose = verbose;
Expand Down
92 changes: 92 additions & 0 deletions docs/Sms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# SMS

Always start by creating a [Signal](docs/Signal.md) backup.

1. Create SMS backup with [SMS Backup & Restore](https://play.google.com/store/apps/details?id=com.riteshsahu.SMSBackupRestore&pli=1) and copy the sms-(timestamp).xml to the working folder.

2. Run MoveToSignal in terminal for prepare the import

Mac arm64 binary

```bash
cd path/to/working/folder/

path/to/MoveToSignal/move_to_signal_Darwin_arm64 \
--command=ImportSms \
--signalBackup=./signal-YYYY-MM-DD-HH-mm-ss.backup \
--signalBackupKey=123451234512345123451234512345 \
--signalPhoneNumber=+49123456789 \
--smsXml="path/to/sms-(timestamp).xml" \
--smsExports=. \
--smsMode=Prepare \
--verbose
```

From source

```bash
cd path/to/working/folder/

dart run path/to/MoveToSignal/bin/move_to_signal.dart \
--command=ImportSms \
--signalBackup=./signal-YYYY-MM-DD-HH-mm-ss.backup \
--signalBackupKey=123451234512345123451234512345 \
--signalPhoneNumber=+49123456789 \
--smsXml="path/to/sms-(timestamp).xml" \
--smsExports=. \
--smsMode=Prepare \
--verbose
```

A new folder named SmsExportsFolder will be created for the export files.
SMS exports will be named eg: +4912345678-(Screen name if found).txt

3. Rename exports

Please review the all .txt files and make sure to file names start with the contact phone number the user uses with Signal.
At this point you can also merge files into one, if a user had multiple SMS identities.
Please delete all files you don't want to import.

All SMS export files must be renamed like:
contactPhoneNumber-Screen Name.txt

eg: +49123456789-Max ExampleName.txt

Only the phone number is important for SMS imports.
The phone number needs to in international format starting with + and must only contain numbers.

4. Run MoveToSignal in terminal to import the prepared messages

Mac arm64 binary

```bash
cd path/to/working/folder/

path/to/MoveToSignal/move_to_signal_Darwin_arm64 \
--command=ImportSms \
--signalBackup=./signal-YYYY-MM-DD-HH-mm-ss.backup \
--signalBackupKey=123451234512345123451234512345 \
--signalPhoneNumber=+49123456789 \
--smsExports=. \
--smsMode=Import \
--verbose
```

From source

```bash
cd path/to/working/folder/

dart run path/to/MoveToSignal/bin/move_to_signal.dart \
--command=ImportSms \
--signalBackup=./signal-YYYY-MM-DD-HH-mm-ss.backup \
--signalBackupKey=123451234512345123451234512345 \
--signalPhoneNumber=+49123456789 \
--smsExports=. \
--smsMode=Import \
--verbose
```

Once done, a new Signal backup file is created, like: signal-signal-YYYY-MM-DD-HH-mm-ss.backup (new timestamp)

5. Follow the "After importing all messages" steps from [Signal](docs/Signal.md)
16 changes: 16 additions & 0 deletions lib/model/sms_message.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'dart:convert';

class SmsMessage {
int date = 0;
String from = '';
String text = '';
bool received = true;

@override
String toString() => {
'"date"': date,
'"from"': jsonEncode(from),
'"text"': jsonEncode(text),
'"received"': received,
}.toString();
}
16 changes: 16 additions & 0 deletions lib/model/sms_thread.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'dart:convert';

import 'package:move_to_signal/model/sms_message.dart';

class SmsThread {
String name = '';
String phoneNumber = '';
List<SmsMessage> messages = [];

@override
String toString() => {
'"name"': jsonEncode(name),
'"phoneNumber"': jsonEncode(phoneNumber),
'"messages"': messages,
}.toString();
}
Loading