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

Signal locked with passphrase #32

Closed Go-rom closed 3 years ago

Go-rom commented 3 years ago

Bug description

Signal is locked with a passphrase but i didn't setup a passphrase.

Device info

Device: Samsung Galaxy S10+ Android version: 11.0 Signal version: 5.14.2.0-JW then 5.14.3.0-JW then 5.14.4.0-JW

Link to debug log

https://debuglogs.org/c26c2e86522664978ebbd1e779f982623878dad874c778ae06f563afccb99728 I already read these tickets/topics : https://github.com/signalapp/Signal-Android/issues/10367 https://libredd.it/r/signal/comments/k5c4u7/passphrase_i_never_made_one/ https://community.signalusers.org/t/signal-is-locked-enter-passphrase-i-have-not-set-up-a-passphrase/19581/28

But i didn't help me

And i think that i'm not allowed to ask support on Signal boards as i'm using a modified version, am i right ?

Thank you

johanw666 commented 3 years ago

I remember this happened sometimes to the original Signal, they made a solution for it that made password-setup installs unusable so I had to comment it out. I can provide a special build where this code is left in, that should hopefully fix it. If you have a rooted setup you could probably also fix it by editin the main shared preferences file. For a non password setup you need these variables:

pref_disable_passphrase : should be true for a non-passphrase setup pref_enable_passphrase_temporary : should be false for a non-passphrase setup pref_android_screen_lock : should be true or false, depending on wether you have Signal locked with the Android keylock or not. Since this setting does nothing with keys, you can manually switch it on or off if you have no password set.

Go-rom commented 3 years ago

Hello @johanw666

I switched to S10+ recently and getting root access seems to be harder now since Android 10. My previous device (A3 2015 android 6.0.1) was rooted but that was an easy process. I have to take a deep look for the new device. Meanwhile, i would be interested to get the special build please but i would like to also know if there is a way to prevent this weird issue. Thanks a lot.

johanw666 commented 3 years ago

Judging from the code even Greyson has no clue why this happens and just puts in hardcoded code to disable the password setting at app start.

I published a version that fixes this (I hope) at https://github.com/johanw666/Signal-Android/releases/tag/5.15.0.0-JW-no_passwords

Please DON'T install this if you DO have a password set because it might delete an encrypted key from the settings and you could lose access to your messages (and I might not be able to fix that).

Go-rom commented 3 years ago

This version helped me to solve this issue so thank you very much :+1:

I was pretty sure not to have set up a password and i hope that i won't happen again. What about the next releases without this fix ? Is there a way to prevent this situation ?

johanw666 commented 3 years ago

I don't know what causes it, but since this "fix" destroys setups where a password is selected I can't include it in the release versions. If it would happen again I see no other solution than building a new version with this code enabled.

jrdoublet commented 2 years ago

Hello, I have the same issue. I'm on a rooted S10 but I didn't find the shared_prefs file in /data/data I tried using the special build but the app refused to import from a newer signal version. Could you please tell me where to find the shared_prefs xml or make a new special build ? Many thanks,

johanw666 commented 2 years ago

It is in /data/data/org.thoughtcrime.securesms/shared_prefs/org.thoughtcrime.securesms_preferences.xml

If editing that file does not help (always keep a backup!) I can make a special build.

jrdoublet commented 2 years ago

Hi, @johanw666 I was unable to modify the shared_preferences : for some reason I do not have any folder named org.thoughtcrime.securesms under /data/data/ , although I saw the xml file under a backup folder somewhere else. Could you please make a special build ?

johanw666 commented 2 years ago

You can find the special build on https://github.com/johanw666/Signal-Android/releases/tag/5.33.3.0-JW-special_build .

When you regain access you can install a normal 5.33.3.0-JW over it. Please do not try to set a password with this special build.