Skip to content
This repository was archived by the owner on Jul 24, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 1.2.0

- Remove Google Drive sync to remove bugs and streamline maintenance.

## 1.1.4

- Maintenance update (keeping up with Android updates and library updates)

## 1.1.3

- Maintenance update

## 1.1.2

- Maintenance update
Expand Down
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ Securely store notes within an encrypted Zip file.

You do not trust bloated password managers with undocumented file formats?
You want to retain 100% control over your data?
Then Secure Zip Notes is your solution.
Then Secure Zip Notes is a solution.

## Features
- View and edit encrypted text files on any platform, using password-protected Zip files.
- Sync with Google Drive or Dropbox.
- Optional sync with Dropbox (they cannot decrypt your data).
- Simple import/export of Zip files.
- Uses hardware-protected storage to avoid retyping the master password every time.
- Open Source: Fetch this app from github if you do not trust us.
- Open Source: Fetch this app from GitHub if you do not trust us.

Our top priority is not only security and privacy, but also long-term stability.
We take the responsiblity to retain your data seriously.
We take the responsibility to retain your data seriously.
Secure Zip Notes guarantees that you can easily decrypt your data in 50 years even if DiTronic Apps ceases to exist.

This app only supports text notes.
If you are seeking advanced features like auto-fill passwords, then we recommend an app like Keepass2Android.
If you are seeking advanced features like auto-fill passwords, then we recommend other apps like Keepass2Android.

## Technical details
- Supported independent programs: 7-Zip, WinZip, The Unarchiver (macOS), Gnome Archive Manager
Expand All @@ -32,14 +33,6 @@ Not all PC operating systems support Zip files with AES encryption by default.
Therefore, you might need to install a PC software like 7-Zip.
_____________________________________________________________________

## Simple File Sync for Android
The [SimpleFileSync](simplefilesync/) library is maintained as a separate module within this repository.

## Tech-Stack Switch

Due to unhappiness with native development tools, I shifted my focus from native apps towards cross-platform apps with Capacitor/React/TypeScript.
Nevertheless, this project remains in maintenance.

## Attributions
This app uses a modified version of the Zip4j library (Apache License 2.0).

6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.ditronic.securezipnotes"
minSdkVersion 19
targetSdkVersion 30
versionCode 6
versionName "1.1.4"
versionCode 7
versionName "1.2.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Causes a "pm clear" command after each test invocation
Expand Down Expand Up @@ -61,7 +61,7 @@ dependencies {
//implementation 'com.android.support:multidex:1.0.3'

implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.3.0-alpha04'
implementation 'com.google.android.material:material:1.3.0-beta01'
implementation 'androidx.cardview:cardview:1.0.0'
implementation "com.jakewharton.timber:timber:4.7.1"

Expand Down
4 changes: 2 additions & 2 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile

# Since this app is open-source I do not want to care about proguard deobfuscation files for Google Play stacktraces.
# Since this app is open-source I do not want to care about proguard deobfuscation.
-dontobfuscate

# ----------------------------------------------------------
# This suff is copied from the Dropbox Core SDK
# This stuff is copied from the Dropbox Core SDK
-dontwarn okio.**
-dontwarn okhttp3.**
-dontwarn com.squareup.okhttp.**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ class ITest {
precondition_fourNotes()

main_renameNote("Note 1", "Note 2", typePassword = true)
Thread.sleep(1000)
assertToast("Note 2 already exists")

main_renameNote("Note 2", "")
Thread.sleep(1000)
assertToast("Empty file names are not allowed")

main_renameNote("Note 2", "directory/")
Expand Down Expand Up @@ -134,20 +136,6 @@ class ITest {
main_assertListState(listOf("Note 1", "Note 3", "Note 4").reversed())
}

// TODO: Fix this test
/*@Test
fun exportNote() {
precondition_singleNote(acRule)
Intents.init()

main_clickOptionsMenu(R.string.export_zip_file)

intended(hasAction(Intent.ACTION_CHOOSER))
intended(hasExtras(BundleMatchers.hasEntry("key", "value")))

Intents.release()
}*/

@Test
fun deleteLastNote() {
precondition_singleNote()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.core.content.FileProvider
import com.ditronic.securezipnotes.R
import com.ditronic.securezipnotes.util.Boast
import com.ditronic.securezipnotes.zip.CryptoZip
import com.ditronic.simplefilesync.DriveFileSync
import com.ditronic.simplefilesync.DropboxFileSync
import com.ditronic.simplefilesync.util.FilesUtil
import java.io.File
Expand Down Expand Up @@ -64,10 +63,6 @@ object MenuOptions {
DropboxFileSync.launchInitialOauthActivity(ac)
return true
}
R.id.action_sync_drive -> {
DriveFileSync.launchInitialOauthActivity(ac)
return true
}
else -> return false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import com.ditronic.securezipnotes.util.OnThrottleItemClickListener
import com.ditronic.securezipnotes.zip.CryptoZip
import com.ditronic.securezipnotes.zip.NotesImport
import com.ditronic.simplefilesync.AbstractFileSync
import com.ditronic.simplefilesync.DriveFileSync
import com.ditronic.simplefilesync.DropboxFileSync
import com.ditronic.simplefilesync.util.ResultCode
import com.ditronic.simplefilesync.util.SSyncResult
Expand Down Expand Up @@ -83,11 +82,6 @@ class MainActivity : AppCompatActivity() {
DropboxFileSync.launchInitialOauthActivity(this@MainActivity)
}
})
binding.btnSyncDrive.setOnClickListener(object : OnThrottleClickListener() {
public override fun onThrottleClick(v: View) {
DriveFileSync.launchInitialOauthActivity(this@MainActivity)
}
})

val bundle = intent.extras
if (bundle != null && bundle.getBoolean(INTENT_NEW_NOTE)) {
Expand Down Expand Up @@ -158,25 +152,18 @@ class MainActivity : AppCompatActivity() {
override fun onPrepareOptionsMenu(menu: Menu): Boolean {

val menuSyncDropbox = menu.findItem(R.id.action_sync_dropbox)
val menuSyncDrive = menu.findItem(R.id.action_sync_drive)
menuSyncDropbox.isCheckable = false
menuSyncDrive.isCheckable = false

val syncBackend = AbstractFileSync.getCurrentSyncBackend(this)
if (syncBackend != null && syncBackend == DropboxFileSync::class.java.simpleName) {
menuSyncDropbox.setCheckable(true).isChecked = true
} else if (syncBackend != null && syncBackend == DriveFileSync::class.java.simpleName) {
menuSyncDrive.setCheckable(true).isChecked = true
}
return true
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)

DriveFileSync.onActivityResultOauthSignIn(this, requestCode, resultCode, data
) { this.initiateFileSync() }

if (requestCode == REQUEST_CODE_IMPORT_FILE_RES_CODE && resultCode == Activity.RESULT_OK) {
val importUri = data!!.data
NotesImport.importFromUri(this, importUri)
Expand Down Expand Up @@ -204,9 +191,6 @@ class MainActivity : AppCompatActivity() {
if (syncBackend == DropboxFileSync::class.java.simpleName) {
DropboxFileSync(this, localFile, REMOTE_BACKUP_FILE_NAME
) { res -> this@MainActivity.onSyncCompleted(res, "Dropbox") }.execute()
} else if (syncBackend == DriveFileSync::class.java.simpleName) {
DriveFileSync(this, localFile, REMOTE_BACKUP_FILE_NAME
) { res -> this@MainActivity.onSyncCompleted(res, "Google Drive") }.execute()
}
}

Expand Down
13 changes: 0 additions & 13 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,6 @@
android:layout_marginBottom="15dp"
/>
</TableRow>
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_sync_drive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
android:text="@string/sync_with_google_drive"
android:gravity="center_vertical"
app:icon="@drawable/ic_drive"
/>
</TableRow>
</TableLayout>

</RelativeLayout>
Expand Down
5 changes: 0 additions & 5 deletions app/src/main/res/menu/menu_noteselect.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,4 @@
android:title="@string/sync_with_dropbox"
app:showAsAction="never" />

<item
android:id="@+id/action_sync_drive"
android:title="@string/sync_with_google_drive"
app:showAsAction="never" />

</menu>
21 changes: 2 additions & 19 deletions simplefilesync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ____

# Simple File Sync

``SimpleFileSync`` is an Android library that enables to easily synchronize individual files with Google Drive or Dropbox.
``SimpleFileSync`` is an Android library that enables to easily synchronize individual files with Dropbox.

``SimpleFileSync`` provides synchronization in both directions, that is: It either uploads or downloads files.
The direction depends on the timestamps.
Expand All @@ -21,11 +21,6 @@ Moreover, ``SimpleFileSync`` compares a hash of the local file with the remote f
- Dropbox Core SDK: `com.dropbox.core:dropbox-core-sdk`.
The Dropbox Core SDK is open-sourced at https://github.com/dropbox/dropbox-sdk-java.


- Play Services Drive library: `com.google.android.gms:play-services-drive`.
The Play Services Drive library is probably not open-source, but the API is documented at https://developers.google.com/drive/api/v3/.
Besides, there exists a demo app at https://github.com/gsuitedevs/android-samples/.

## Dropbox Integration
Integrating ``SimpleFileSync`` into your app involves the following steps:

Expand Down Expand Up @@ -91,24 +86,13 @@ Replace the `MY_APP_KEY` entries with the app key from your Dropbox developer da
<string name="dropbox_app_key_db">db-MY_APP_KEY</string>
```

## Google Drive Integration

- Register an oauth2 app according to the Google Cloud developer documentation:
https://console.cloud.google.com/.
Among other things, you will need to specify the package name of your app
and the SHA-1 fingerprint of your app signing key store (providing different SHA-1 fingerprints for your debug key store and your production key store).
Unlike Dropbox, you do not get an app key that you can simply copy into your app.

- The code integration is mostly the same as for Dropbox, except that you use `DriveFileSync` instead of `DropboxFileSync`.
Unlike Dropbox, however, you need to call `DriveFileSync.onActivityResultOauthSignIn` from the `onActivityResult` of your Activity.

## Potential Issues

#### Optional Auto Backup Configuration
It might be a good idea to disable the Android Auto Backup feature.
This can be done by setting `android:allowBackup="false"` in your application `AndroidManifest.xml`.
Alternatively, you might disable Auto Backup for a selected folder where your local sync files are stored.
Otherwise, the Auto Backup might mess up the synchronization with Dropbox or Google Drive.
Otherwise, the Auto Backup might mess up the synchronization with Dropbox.


#### Build Failure about META_INF/DEPENDENCIES
Expand All @@ -122,4 +106,3 @@ android {
}
}
```

11 changes: 2 additions & 9 deletions simplefilesync/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 29
compileSdkVersion 30


defaultConfig {
minSdkVersion 19
targetSdkVersion 29
targetSdkVersion 30
versionCode 1
versionName "1.0.0"
}
Expand All @@ -22,16 +22,9 @@ dependencies {

implementation "com.jakewharton.timber:timber:4.7.1"
implementation 'com.google.android.gms:play-services-auth:19.0.0'
implementation 'com.google.android.gms:play-services-drive:17.0.0'
implementation ('com.google.http-client:google-http-client-gson:1.38.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation('com.google.api-client:google-api-client-android:1.31.1') {
exclude group: 'org.apache.httpcomponents'
}
implementation('com.google.apis:google-api-services-drive:v3-rev99-1.23.0') {
exclude group: 'org.apache.httpcomponents'
}

implementation 'com.dropbox.core:dropbox-core-sdk:3.1.5'
api 'com.squareup.okhttp3:okhttp:4.9.0'
Expand Down
Loading