A very simple api written in java that allows you to read Signal Messenger (https://signal.org/) backup files from the android app.
First, clone the repository using git (recommended):
git clone https://github.com/Terge3141/signalbackupreader.git
Make sure that Java 11 and maven is installed
Go to the SignalBackupReader directory and build package
cd SignalBackupReader
mvn package
Path backupFilePath = Paths.get("backupFilePath"));
Path passphrasePath = Paths.get("passphrasePath");
Path outputDir = Paths.get("outputDir");
DatabaseAndBlobDumper dumper = new DatabaseAndBlobDumper(backupFilePath, passphrasePath, outputDir);
// Create extra sql views
dumper.setCreateExtraSqlViews(true);
dumper.run();
As the Signal Messenger database structure is quite complicated, additional views can be created. The view v_chats contains all messages with senders and chatnames:
- msgid (either from mms or sms table)
- date
- sender (Full name)
- chatname (Either recipient name or name of the group)
- text
- type (either mms or sms)
- thread_recipient_id (id in table threads)
- senderid (id of sender)
The corresponding attachments (e.g. images and pictures) for the mms message can be found in the part table (v_chats.msgid==part.mid)
java -cp target/SignalBackupReader-0.0.1-SNAPSHOT-jar-with-dependencies.jar signalbackupreader.Program <backuppath> <passphrasepath> <outputdir>
- backuppath: Path to the android signal messenger file, normally has the name signal-YYYY-MM-DD-HH-MM-SS.backup
- passphrasepath: Pass to the signal passphrase file. Should contain the 30 digits, spaces and new lines are ignored.
- outputdir: the outputdir were the sql data base and the blobs are written to.
The packages can also be obtained from jitpack.io and directly included into gradle or maven. Replace tag with the git hash or "master-SNAPSHOT" for the latest version. Go to https://jitpack.io/#Terge3141/signalbackupreader for further information.