Google Backup inclusion #21

Closed
opened 2026-07-01 03:21:22 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-01 03:21:22 +00:00 (Migrated from github.com)

Context

AndroidManifest currently sets allowBackup="false" with custom data_extraction_rules.
Add an option to include app data in system-wide Android Backup.

Scope

  • Provide an opt-in to include data in Android Backup (Auto Backup / cloud). Note
    allowBackup is a manifest flag, not a runtime toggle — this likely needs enabling
    backup plus a BackupAgent/rules to gate what's included, or documenting the limitation.
  • Never back up the Keystore-sealed DB passphrase (libremail_dbkey DataStore) or
    credentials — Keystore keys are device-bound and won't restore anyway; exclude the
    encrypted cache + secrets via backup/extraction rules.
  • Define what is safe to back up (settings/preferences) vs. the re-syncable mail cache
    (skip it; it re-downloads via #12).
  • F-Droid: Android Backup relies on Google infrastructure — keep it opt-in and off by
    default; declare an anti-feature if needed (#16).
  • Update res/xml/data_extraction_rules.xml (and full-backup content) accordingly.

Acceptance criteria

  • With the option enabled, only safe data is backed up/restored; secrets and the encrypted DB
    key are excluded; disabled by default.

Relevant files

  • AndroidManifest.xml, res/xml/data_extraction_rules.xml, settings

Dependencies

Interacts with #22 (encryption/keys), #16 (F-Droid), #12/#13 (cache size).

## Context `AndroidManifest` currently sets `allowBackup="false"` with custom `data_extraction_rules`. Add an option to include app data in system-wide Android Backup. ## Scope - [ ] Provide an **opt-in** to include data in Android Backup (Auto Backup / cloud). Note `allowBackup` is a manifest flag, not a runtime toggle — this likely needs enabling backup plus a `BackupAgent`/rules to gate what's included, or documenting the limitation. - [ ] **Never back up** the Keystore-sealed DB passphrase (`libremail_dbkey` DataStore) or credentials — Keystore keys are device-bound and won't restore anyway; exclude the encrypted cache + secrets via backup/extraction rules. - [ ] Define what *is* safe to back up (settings/preferences) vs. the re-syncable mail cache (skip it; it re-downloads via #12). - [ ] F-Droid: Android Backup relies on Google infrastructure — keep it opt-in and off by default; declare an anti-feature if needed (#16). - [ ] Update `res/xml/data_extraction_rules.xml` (and full-backup content) accordingly. ## Acceptance criteria - With the option enabled, only safe data is backed up/restored; secrets and the encrypted DB key are excluded; disabled by default. ## Relevant files - `AndroidManifest.xml`, `res/xml/data_extraction_rules.xml`, settings ## Dependencies Interacts with #22 (encryption/keys), #16 (F-Droid), #12/#13 (cache size).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#21