Your script is a standard approach for migrating Android app data between devices using adb, but Signal (org.thoughtcrime.securesms) is a special case due to its security model. Here’s why your method fails for Signal, and what you can do instead:
Signal stores its messages and media in an encrypted SQLite database (signal-db). The encryption key is tied to the device’s hardware-backed keystore (Android’s KeyStore system). When you copy the /data/data/org.thoughtcrime.securesms/ directory, the encrypted database is copied, but the encryption key is not. Without the key, Signal cannot decrypt the database on the new device.
KeyStore to generate and store encryption keys.adb.adb root, you cannot access or transfer these keys.Your script sets the SELinux context (chcon -R u:object_r:app_data_file:s0), but Signal may require additional or different contexts for its files, especially for encrypted data.
Signal may detect that it’s running on a new device (via hardware IDs, keystore, or other checks) and refuse to use the copied data for security reasons.
Signal supports end-to-end encrypted backups and device transfer features:
If you must use adb, you need to preserve the keystore:
Root both devices (LineageOS adb root is not enough; you need full root access).
Dump the keystore keys from the source device:
bashadb -e shell su -c "cat /data/misc/keystore/user_0/<key_files> > /sdcard/keystore_dump"
Copy the keystore to the target device and restore permissions.
Copy Signal’s data as you did, then reboot.
⚠️ Warning:
Most apps do not use hardware-backed encryption for their data. Their databases are either:
/data/data/<app>/ (which your script copies).Signal is an exception due to its focus on security.
adb methods are not recommended and may fail due to encryption and security checks.Question: Are you trying to transfer Signal to a new device, or are you experimenting with backups? If it’s a transfer, the built-in feature is the safest path.
Le Chat can make mistakes. Check answers. Learn more