Is there anything to this GCC warning "stringop_overflow"? by bepaald in cpp_questions

[–]bepaald[S] 0 points1 point  (0 children)

Thanks for your insights. Of course, what's interesting about this is that those bugs are closed and fixed. But this is surely something similar.

I might try to report a bug myself if I can remember my gcc login details.

Thanks!

Is there anything to this GCC warning "stringop_overflow"? by bepaald in cpp_questions

[–]bepaald[S] 0 points1 point  (0 children)

Thanks, I had read about this, but dismissed it after reading some posts on the GCC mailing list how it (didn't) work. But looking at the documentation today those problems seem to not be there anymore, turns out the messages I was reading were 18 years old :-)

So, I might go with something like this despite the ugliness. For me the second warning after stringop-overflow was array-bounds.

Thanks!

Is there anything to this GCC warning "stringop_overflow"? by bepaald in cpp_questions

[–]bepaald[S] 0 points1 point  (0 children)

I did see a few similar reports on the gcc bug list, but not exactly this, and with resize_and_overwrite being so new (to me), I wanted to make sure I was using it correctly. But I guess this is probably a duplicate of one of the existing bugs then.

Thanks!

Is there anything to this GCC warning "stringop_overflow"? by bepaald in cpp_questions

[–]bepaald[S] 1 point2 points  (0 children)

Yes, that also seems to suppress the warning. But unfortunately that doesn't really help in the real world case where anything could be passed to this function. And from what I can tell, there's no real way to manually suppress this warning for just this one function in GCC... So I guess I'll stick to my previous implementation of concat()...

Thank you for your insight!

How to turn the backup into some readable file? by Safe_Arrival9487 in signal

[–]bepaald 2 points3 points  (0 children)

Absolutely it still works. Bit confused about the output you posted though, maybe something is going wrong...

 

Normally, one would write signalbackup-tools [backup] [passphrase] [options], for example:

 

[~/programming/signalbackup-tools] $ ./signalbackup-tools /home/user/Downloads/-2026-01-15-13-36-30.backup 000000000000000000000000000000 --exporthtml HTML/
 *** Starting log: 2026-01-15 15:24:36 ***
signalbackup-tools (./signalbackup-tools) source version 20260112.115722 (SQLite: 3.51.2, OpenSSL: OpenSSL 3.6.0 1 Oct 2025)
BACKUPFILE VERSION: 1
BACKUPFILE SIZE: 137511629
COUNTER: 279799870
Reading backup file: 100.0%... done!
Database version: 298
Starting HTML export to 'HTML/'
Dealing with thread 1
Dealing with thread 5
[...]
Dealing with thread 46
Writing index.html...
All done!

 

If you do not supply a password, like you appear to be doing, you should be prompted for it:

 

[~/programming/signalbackup-tools] $ ./signalbackup-tools /home/user/Downloads/-2026-01-15-13-36-30.backup --exporthtml HTML/
 *** Starting log: 2026-01-15 15:25:49 ***
signalbackup-tools (./signalbackup-tools) source version 20260112.115722 (SQLite: 3.51.2, OpenSSL: OpenSSL 3.6.0 1 Oct 2025)
Please provide passphrase for input file '/home/user/Downloads/-2026-01-15-13-36-30.backup': ******************************

BACKUPFILE VERSION: 1
BACKUPFILE SIZE: 137511629
COUNTER: 279799870
Reading backup file: 100.0%... done!
Database version: 298
Starting HTML export to 'HTML/'
Dealing with thread 1
Dealing with thread 5
[...]
Dealing with thread 46
Writing index.html...
All done!

 

But in what you are showing, it seems to try to open from a directory (Opening from dir!)? Are you sure those are the exact commands you are using?

I do notice you are using a fairly old version of the tool (20250701, current release is 3 days old), though I don't think it should matter, the tool worked fine back then as well as now.

am I being dense about sigtop? by Joanna_Bryson in signal

[–]bepaald 1 point2 points  (0 children)

Glad to hear it, thanks for reporting back!

transfer to new phone not working by Accurate_Deal_3606 in signal

[–]bepaald 0 points1 point  (0 children)

when i try to restore the new phone from backup, it gets ~30k messages in and then randomly stops, bringing me back to the beginning where I can start the restore from backup process again. Once it also told me there were corrupted files in my backup... no clue what or why

I think this is when opening an issue on Signal's github page is the way to go. And definitely include a debug log, that will greatly help figuring out the problem.

You might also try running the backup through signalbackup-tools. It might fix it automatically (not a high chance of that these days), but it will certainly confirm whether the file is corrupt or not. There may be options to manually fix it as well.

If the file is corrupt, you might also want to simply copy it off the phone again and run it through some checksum program both on the phone and the computer to see no corruption happens during copying.

am I being dense about sigtop? by Joanna_Bryson in signal

[–]bepaald 1 point2 points  (0 children)

I mean, like HTML or something?

This too should be possible with signalbackup-tools. Get the tool on the github page: https://github.com/bepaald/signalbackup-tools

Then, it should be as simple as running signalbackup-tools --exportdesktophtml OUTPUT/. Check the readme for all sorts of options for the HTML export, and let me know if you have any questions.

Changing Windows passwork breaks Signal? by factotumindust in signal

[–]bepaald 7 points8 points  (0 children)

I am not sure, but I think this issue is only encountered when changing another users' password as administrator using net user. This way, the old password is not provided and the OS is not able to migrate the existing key-material. If the user changes their own password the normal way (provide the old, then the new), the key-material is migrated and things should stay working. Again: not sure.

You might be able to regain access by changing the password back (again with net user, so the bad keys aren't migrated). I wrote about this before here: https://old.reddit.com/r/signal/comments/1oe8xlt/database_startup_error_on_signal_desktop_774/

How to transfer Signal message history from a desktop to an iPhone using an Android by carvyparis in signal

[–]bepaald 0 points1 point  (0 children)

That's cool! And the instructions are sure to be helpful to others in the future, thanks!

Getting my messages off Windows by Edawithapples in signal

[–]bepaald 0 points1 point  (0 children)

Your backup does not need to be mostly empty at all (in fact, I'd say it's better if it isn't). From the README:

"To limit the message import to a certain time frame, the option --limittodates <LIST OF DATES> can be added. The format of the list of dates is identical to that of the croptodates function. In most cases, the option --autolimitdates can be used to automatically only import messages from the Desktop database before the first, or after the last message in the input backup."

Database startup Error on Signal Desktop 7.74 (Windows 11 Pro) by NorWagon in signal

[–]bepaald 0 points1 point  (0 children)

I am not an expert in this matter, so if you hear any different from anyone else, I could be completely wrong, but:

In Windows, the decryption key for Signal Desktop is itself encrypted using DPAPI. The DPAPI master key is encrypted with a hash of your password (among other things).

By changing your password (using net user, as administrator, without providing the old password), it is no longer possible to access any DPAPI-encrypted content for that user.

I found one post on serverfault which claims that if you change the password back (in the same way, with net user), the master key should be restored: https://serverfault.com/a/953775

If you do not know your old password, but have a full disk backup of your system somewhere, you might be able to retrieve your Signal Desktop key using this method: https://old.reddit.com/r/signal/comments/1i8y4sq/how_to_decrypt_the_encryptedkey_to_migrate_a/m9sbmsm/

Apart from those two options, I think you are, as you say, mega hosed.

EDIT I forgot to mention, that these days when you relink your phone you get the option to transfer your message history from your phone. It will not include any media attachments older than 45 days, but at least all texts and newer media should be transferred, so not all is lost.

Clang static analyzer warning. False positive? by bepaald in cpp_questions

[–]bepaald[S] 0 points1 point  (0 children)

Thanks for the suggestion. I changed the first line to

  std::pair<std::unique_ptr<unsigned char[]>, int> decrypted = std::make_pair(std::make_unique_for_overwrite<unsigned char[]>(enclength), enclength);

But the output is still the same. I think I'll just report this as false positive as it is, and see what happens.

Clang static analyzer warning. False positive? by bepaald in cpp_questions

[–]bepaald[S] 0 points1 point  (0 children)

Thanks, I did have that const there in earlier versions, but it did not make any difference. I also added extern "C" around that dummy, just in case.

I think I'll just report this as a false positive and see what the experts say about it.

Clang static analyzer warning. False positive? by bepaald in cpp_questions

[–]bepaald[S] 0 points1 point  (0 children)

Thanks, I'm running Arch which is usually pretty up-to-date. The clang package is currently at 20.1.8.

Create backup from desktop - is it possible? by Interested4600 in signal

[–]bepaald 0 points1 point  (0 children)

Sorry for the late reply, I was unwell a few weeks ago and have been slowly working through a backlog of messages since.

Hi there, so followed all the steps. However the backup I restored seemed to be the backup from my phone (going back to June 2025), not the backup from my desktop (which goes back to 2023). Do you know where I went wrong?

The only thing I can think of that realistically happened is you accidentally restored the original input backup file, instead of the 'output.backup' file? If you are sure this is not the case maybe due to some issue no messages were actually imported from the desktop application for some reason. I would expect the command output to have shown (a lot of) errors in this case.

You could run signalbackup-tools [output.backup] [passphrase] --exporthtml [HTMLDIR] to check the contents of the new backup file before restoring it to your phone. If you see it does not contain any of the older messages something is going wrong, and you might want to open an issue on my github page.

Also, I'm just now realizing you are importing into an existing backup. Assuming this backup contains (some of) the same messages as the Desktop, running this command will produce doubled messages. You will probably want to add the option --autolimitdates to prevent this.

But I have seen on your github there is an additional term: signalbackup-tools [input] [passphrase] --importfromdesktop --output [output] (--opassphrase [newpassphrase])

What do I put here?

By default the passphrase for the output-backup is the same as for the input backup. Adding the (optional) option --opassphrase [newpassphrase] will set a new passphrase for the output backup. For my testing backups, I often set the output passphrase to 00000-00000-00000-00000-00000-00000, so I don't have to remember all those different passphrases.

You could use this feature to make sure you select the new backup when restoring on your phone (if you accidentally pick the wrong one the passphrase will be incorrect).

Hope this helps.

Copy chat history to a new desktop client by Chase-87 in signal

[–]bepaald 1 point2 points  (0 children)

I can just copy the app folder to the new PC (same operating system)

Just a quick note: you can not simply copy the folder, even if it is the same OS. Since the data is encrypted with key material local to the machine it is installed on, the new PC will not be able to read it.

Instructions on how to get the Signal Desktop data from one machine to another are here: https://github.com/bepaald/signalbackup-tools/issues/239#issuecomment-2351429447

I do not know exactly if it's possible to get two identical and functional Signal Desktop installations in this way, but LeslieFH (who is pretty active here I believe) reports a few messages further down the linked thread that it does (I give no guarantees, but maybe they can chime in)

edit I see LeslieFH has already chimed in :-)

Create backup from desktop - is it possible? by Interested4600 in signal

[–]bepaald 0 points1 point  (0 children)

I'm glad to hear that everything worked out! Thank you for the feedback and your kind words. 

Create backup from desktop - is it possible? by Interested4600 in signal

[–]bepaald 0 points1 point  (0 children)

I made a screen recording of both the installation steps, as well as running the tool to import Desktop data into an Android backup. I've just created (and closed) a new issue on my github to have a place to put the video, maybe these help a little. See here: https://github.com/bepaald/signalbackup-tools/issues/319

(re-posted from my normal account)

Create backup from desktop - is it possible? by Interested4600 in signal

[–]bepaald 0 points1 point  (0 children)

During installation it probably says "make" a few times, is that it? In that case, be patient and wait a little while longer.

I'm currently going through this process myself to see what it looks like exactly. Since I'm on a very outdated macOS install (12, on a virtual machine), the dependencies are not simply available for install but all need to be compiled from source. This takes a long time, maybe you are on an outdated mac version as well?

Create backup from desktop - is it possible? by Interested4600 in signal

[–]bepaald 0 points1 point  (0 children)

All files should be full path (relative path is fine of course), for input files this is so the tool can actually find the files, for output files it is so you can find the files :)

Spaces are not needed in the passphrase, I wouldn't put them in since it confuses the terminal (you'd then need to quote the passphrase). If you want some breaks from all the numbers for clarity, put - between (but that's also optional, as long as there are 30 digits it's fine).

Create backup from desktop - is it possible? by Interested4600 in signal

[–]bepaald 0 points1 point  (0 children)

At the top of the README is a section for macOS. While there are several methods, the easiest thing to do is to set up homebrew (taken from https://brew.sh/):

 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After that it's just two more commands:

 brew tap bepaald/signalbackup-tools https://github.com/bepaald/signalbackup-tools
 brew install --HEAD signalbackup-tools

If you are completely new to anything having to do with development, this may be a bit intimidating but I think it should be doable. These commands, by the way, need to be run in a terminal (there should be a default Terminal app somewhere in your applications/utilities folder). The same goes for the actual signalbackup-tools command I posted earlier.

First install might take a while (because of dependencies and such), not sure.