Skip to content

Repository files navigation

SpareNotes

Automatic, one-way Supernote backups to Proton Drive.

SpareNotes app icon

Latest release CI status License

Download · Features · Setup · Security · Build

SpareNotes is a small, native Android app for automatic backup from selected Supernote Nomad folders to Proton Drive.

Version 1.0 supports the Supernote Nomad's ARM64 Android 11 environment. Other Supernote models and Android versions are untested.

Download and install

SpareNotes currently supports the Supernote Nomad's ARM64 Android 11 environment.

  1. Download the latest SpareNotes-v*.apk and matching .sha256 file from GitHub Releases.

  2. Verify the APK hash against the first value in the .sha256 file:

    Get-FileHash .\SpareNotes-v*.apk -Algorithm SHA256
  3. On the Nomad, enable Settings → Security & Privacy → Sideloading.

  4. Install the verified APK.

Only install APKs attached to this repository's releases. Source archives are not installable apps.

What it does

  • Lets you select exact internal-storage or microSD folders with Android's folder picker.
  • Recursively includes every file below each selected folder.
  • Runs only on Wi-Fi. Android schedules a run when Wi-Fi reconnects and once a day while it stays connected; Back up now starts a foreground backup immediately.
  • Uploads new files and replaces changed cloud copies under /my-files/SpareNotes.
  • Never deletes a local file or a Proton Drive file. Removing a source or deleting a local file leaves its existing cloud copy untouched.
  • Sends every selected file through Proton's upload reconciliation. Proton's content digest skips unchanged remote files, while missing or changed remote copies are repaired.
  • Lets you disconnect and reconnect Proton Drive without clearing app data or changing existing cloud files.

Android jobs are intentionally inexact and may be deferred while the Nomad sleeps. Active backups use a foreground service and wake lock so large transfers can finish after the screen sleeps. Android can miss a Wi-Fi disconnect while SpareNotes' process is stopped; the daily job remains the fallback.

Each file is limited to 512 MiB, each backup to 10,000 documents, and folder nesting to 64 levels. SpareNotes reports these limits without deleting local or cloud data.

Nomad setup

  1. Open SpareNotes and tap Connect Proton Drive.
  2. Scan the one-time QR with a phone, sign in directly on Proton's page, and approve access.
  3. Tap Add folder, choose disk for the microSD card, open the desired folder, then tap Use this folder. Repeat for more folders.

The official Proton Drive Android app is not required by SpareNotes.

Security model

  • SpareNotes never receives or stores the Proton password. Authentication happens on Proton's HTTPS page.
  • It uses Proton's official Drive CLI/SDK for authentication, encryption, and uploads. The bundled CLI is trusted application code: it necessarily receives selected file content and the session while a command runs, and its official binary is pinned by checksum during the build.
  • The CLI session is encrypted at rest with an Android Keystore AES-256-GCM key. A private memory-only bridge serves credentials to the CLI, so no plaintext session file is created during Proton commands.
  • Android backups are disabled. CLI requests use an authenticated loopback CONNECT proxy that permits only Proton HTTPS hosts; DNS resolution goes through Android and respects its Private DNS setting.
  • Tiny compatibility and credential wrappers adapt the Linux CLI to Android. They do not grant or bypass Android permissions.
  • The bundled CLI has one source-level byte patch: its desktop-only xdg-open call returns immediately because SpareNotes itself renders the one-time URL and QR. See the prepareProtonCli task in app/build.gradle.kts.

Build from source

Requirements: JDK 17+, Android SDK 36, and Android NDK 27 only when rebuilding the compatibility wrapper.

The first build downloads Proton Drive CLI 0.8.0 from Proton, verifies its official SHA-512 checksum, applies the Android browser-launch patch, and verifies the patched SHA-256 checksum. The 110 MB generated binary is intentionally excluded from Git.

.\gradlew.bat lintDebug testDebugUnitTest assembleDebug

The debug APK is for development only. It is debuggable and must not be installed on a device holding Proton data.

Install only the resulting signed, non-debuggable release APK.

To rebuild the ARM64 compatibility and credential wrappers with NDK 27:

$ndkClang = "$env:LOCALAPPDATA\Android\Sdk\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android30-clang.cmd"
& $ndkClang `
  -O2 -Wall -Wextra -Werror -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE -pie `
  "-Wl,-z,relro,-z,now" app\src\main\cpp\compatwrap.c `
  -o app\src\main\jniLibs\arm64-v8a\libcompatwrap.so
& $ndkClang `
  -O2 -Wall -Wextra -Werror -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE -pie `
  "-Wl,-z,relro,-z,now" app\src\main\cpp\passbridge.c `
  -o app\src\main\jniLibs\arm64-v8a\libpass_bridge.so

GitHub Actions runs lint, unit tests, and a debug build for every pull request and every push to main.

See RELEASING.md for signing and publishing steps.

Bundled runtime

The app bundles Proton Drive CLI 0.8.0, a patched musl loader/runtime, GCC runtime libraries, Alpine's CA bundle, native Android bridges, and ZXing QR support. Exact third-party provenance and licenses are recorded in THIRD_PARTY_NOTICES.md.

About

Native Android app for automatic, one-way backups from Supernote Nomad folders to Proton Drive.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages