Skip to content

Commit

Permalink
Merge pull request #6 from jukefoxer/5.2.3.0-SW
Browse files Browse the repository at this point in the history
5.2.3.0 sw
  • Loading branch information
jukefoxer authored Jan 23, 2021
2 parents d1a4b78 + 17c2443 commit 7b0b756
Show file tree
Hide file tree
Showing 110 changed files with 4,557 additions and 1,507 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
name: 🛠️ Bug report
about: Let us know that something isn't working as intended
title: ''
labels: ''
assignees: ''

---

<!-- This is a bug report template. By following the instructions below and filling out the sections with your information, you will help the developers get all the necessary data to fix your issue.
You can also preview your report before submitting it. You may remove sections that aren't relevant to your particular case.
Expand Down
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
blank_issues_enabled: false
contact_links:
- name: 📃Support Center
url: https://support.signal.org/
about: Find answers to many common questions.
- name: ✨ Feature request
url: https://community.signalusers.org/c/feature-requests/
about: Missing something in Signal? Let us know.
- name: 💬 Community support
url: https://community.signalusers.org/c/support/
about: Feel free to ask anything.
- name: 📖 Developer documentation
url: https://signal.org/docs/
about: Official Signal developer documentation.
- name: 📚 Translation feedback.
url: https://community.signalusers.org/c/translation-feedback/
about: Share feedback on translations.
- name: ❓ Other issue?
url: https://community.signalusers.org/
about: Search on the community forums.
5 changes: 1 addition & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Install NDK
run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" --sdk_root=${ANDROID_SDK_ROOT}

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ This fork of the Signal App aims at providing a method to import one's WhatsApp

* Import 1-to-1 text conversation threads.
* Import group chat conversations if a group chat with the same name is set up in the Signal App.
* Importing images and videos messages from WhatsApp chats.
* Importing audio images, stickers and videos messages from WhatsApp chats.

### What doesn't work

* Multimedia messages other than images and videos are currently not imported.
* Contact cards and locations are currently not imported.
* It's pretty slow (10 seconds per 1000 messages).

### How to do it

* Extract your unencrypted msgstore.db from your WhatsApp installation. There are several methods to do so. WhatsAppDump seems to offer a possibility that doesn't require rooting the device. A more detailed description of how to do so might be added here in the future.
* Extract your unencrypted msgstore.db from your WhatsApp installation. There are several methods to do so. You can try WhatsApp-Key-Database-Extractor by Yuvraj: https://github.com/YuvrajRaghuvanshiS/WhatsApp-Key-Database-Extractor
* Copy the msgstore.db file to the top level directory of your internal storage
* Make an encrypted Backup of your Signal Messages using the built-in feature of the Signal App.
* Build and install this version of the Signal App and import the encrypted Backup of your signal messages.
* Make an encrypted Backup of your Signal Messages using the built-in feature of the Signal App. You should make sure that the version of your Signal app and the version of the importer match. Otherwise there could be incompatibilities.
* Build and install this version of the Signal App.
* You might have to go to the app permission settings and give it the permission to manage all of the external storage.
* Go to Backup => Import WhatsApp to start the import.
* Got to backups -> import. Select the options you want, and click on import...
* Be patient until it finishes.
* If you're happy with the WhatsApp import create another encrypted backup of all Signal messages.
* Install the original Signal app again and import the encrypted Backup.
* Export a new backup if you're happy with the result.
* Import that new Backup in your existing Signal app (you might have to reinstall it to do so, as the main Signal app only allows to recover backups after a new installation).

# Legal things
## Cryptography Notice
Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ protobuf {
}
}

def canonicalVersionCode = 769
def canonicalVersionName = "5.2.0.0-SW"
def canonicalVersionCode = 772
def canonicalVersionName = "5.2.3.0-SW"

def postFixSize = 100
def abiPostFix = ['universal' : 0,
Expand Down Expand Up @@ -147,6 +147,7 @@ android {
}

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
applicationId 'com.jukefoxer.signal'
}

compileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void onRepairFirstEverAppLaunch(@NonNull Context context) {
TextSecurePreferences.setJobManagerVersion(context, JobManager.CURRENT_VERSION);
TextSecurePreferences.setLastExperienceVersionCode(context, Util.getCanonicalVersionCode());
TextSecurePreferences.setHasSeenStickerIntroTooltip(context, true);
TextSecurePreferences.setPasswordDisabled(context, true);
//TextSecurePreferences.setPasswordDisabled(context, true); // JW
TextSecurePreferences.setLastExperienceVersionCode(context, Util.getCanonicalVersionCode());
ApplicationDependencies.getMegaphoneRepository().onFirstEverAppLaunch();
SignalStore.onFirstEverAppLaunch();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private void handleImportWhatsappBackup() {
} else {
AlertDialog.Builder builder = ImportWhatsappDialog.getWhatsappBackupDialog(getActivity());
builder.setPositiveButton(getActivity().getString(R.string.ImportFragment_import), (dialog, which) -> {
new ImportWhatsappBackupTask(ImportWhatsappDialog.isImportGroups(), ImportWhatsappDialog.isAvoidDuplicates(), ImportWhatsappDialog.isImportMedia()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new ImportWhatsappBackupTask(ImportWhatsappDialog.isImportGroups(), ImportWhatsappDialog.isAvoidDuplicates(), ImportWhatsappDialog.isImportMedia(), ImportWhatsappDialog.getNumDays()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
});
builder.setNegativeButton(getActivity().getString(R.string.ImportFragment_cancel), null);
builder.show();
Expand All @@ -167,7 +167,7 @@ private void handleImportWhatsappBackup() {
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE)
.ifNecessary()
.withPermanentDenialDialog(getString(R.string.ImportExportFragment_signal_needs_the_storage_permission_in_order_to_read_from_external_storage_but_it_has_been_permanently_denied))
.onAllGranted(() -> new ImportWhatsappBackupTask(ImportWhatsappDialog.isImportGroups(), ImportWhatsappDialog.isAvoidDuplicates(), ImportWhatsappDialog.isImportMedia()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR))
.onAllGranted(() -> new ImportWhatsappBackupTask(ImportWhatsappDialog.isImportGroups(), ImportWhatsappDialog.isAvoidDuplicates(), ImportWhatsappDialog.isImportMedia(), ImportWhatsappDialog.getNumDays()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR))
.onAnyDenied(() -> Toast.makeText(getContext(), R.string.ImportExportFragment_signal_needs_the_storage_permission_in_order_to_read_from_external_storage, Toast.LENGTH_LONG).show())
.execute();
});
Expand Down Expand Up @@ -256,11 +256,13 @@ public class ImportWhatsappBackupTask extends AsyncTask<Void, Void, Integer> {
private final boolean importGroups;
private final boolean importMedia;
private final boolean avoidDuplicates;
private final int numDays;

public ImportWhatsappBackupTask(boolean importGroups, boolean avoidDuplicates, boolean importMedia) {
public ImportWhatsappBackupTask(boolean importGroups, boolean avoidDuplicates, boolean importMedia, int numDays) {
this.importGroups = importGroups;
this.avoidDuplicates = avoidDuplicates;
this.importMedia = importMedia;
this.numDays = numDays;
}

@Override
Expand Down Expand Up @@ -305,7 +307,7 @@ protected void onPostExecute(Integer result) {
@Override
protected Integer doInBackground(Void... params) {
try {
WhatsappBackupImporter.importWhatsappFromSd(getActivity(), progressDialog, importGroups, avoidDuplicates, importMedia);
WhatsappBackupImporter.importWhatsappFromSd(getActivity(), progressDialog, importGroups, avoidDuplicates, importMedia, numDays);
return SUCCESS;
} catch (NoExternalStorageException e) {
Log.w(TAG, e);
Expand Down
Loading

0 comments on commit 7b0b756

Please sign in to comment.