Skip to content

Backup and Restore

ProcioneDeConti edited this page Aug 17, 2026 · 1 revision

Backup and Restore

Settings → Backup & Restore lets you save everything the app knows about your setup to a single file, and load it back later - on the same device after a reinstall, or on a new one entirely.

What's included

  • Account credentials for both sites (e621 username/API key, e6AI username/API key) and which one is currently active
  • Your blacklist
  • Adult-mode state and which content ratings are enabled
  • Accent color
  • Image cache limit, grid thumbnail size
  • Video defaults (autoplay, loop, speed)
  • Custom download folder, if set
  • EULA-agreed status (so restoring doesn't re-prompt you for something you already agreed to, assuming the EULA text hasn't changed since)

Not included: anything session-only or device-specific that wouldn't make sense to carry over - for example, the "show everything, ignore blacklist" toggle is intentionally a temporary in-memory switch, not a saved preference, so it's never part of a backup.

Note on the custom download folder: Android's folder-access grant (from Settings → Downloads → Choose folder) is tied to this specific app installation. If you restore a backup after reinstalling or on a different device, the download folder path is restored but the permission to write to it may not carry over - if so, the first download attempt will fail with a clear error, and you just need to pick the folder again from Settings.

Exporting

  1. Settings → Backup & Restore → Export Settings.
  2. Choose whether to encrypt with a password (checked by default - see why below). If encrypting, enter and confirm a password; the Export button stays disabled until they match.
  3. Choose where to save the file via Android's file picker (suggested filename: e621_backup.json).

Importing

  1. Settings → Backup & Restore → Import Settings, and pick a previously exported file.
  2. If the file is password-protected, you'll be prompted for the password. A wrong password shows an inline error and lets you retry without needing to re-pick the file.
  3. On success, every field above is overwritten with what's in the file - immediately, no restart needed.

Why encryption matters

An exported backup contains your API key - functionally equivalent to a password for your account. An unencrypted export is plain, readable JSON; anyone who gets hold of that file (cloud sync, shared drive, a phone that gets lost) can read your credentials directly. The export dialog warns about this explicitly if you leave encryption off - there's no way to export a plaintext file by accident without seeing that warning first.

How the encryption works

For anyone who wants the specifics (or wants to verify the implementation themselves - the code's all in data/backup/):

  • Cipher: AES-256 in GCM mode (authenticated encryption - a wrong password or a tampered/corrupted file fails to decrypt cleanly rather than silently producing garbage).
  • Key derivation: PBKDF2 with HMAC-SHA256, 210,000 iterations (OWASP's current-as-of-2023 minimum recommendation), a random 16-byte salt generated fresh per export.
  • IV: a random 12-byte value generated fresh per export (the standard size for GCM).
  • File format: a small JSON envelope - version, encrypted (bool), salt and iv (base64, only present when encrypted), and payload (base64 - either the plain settings JSON, or the AES-GCM ciphertext of it).
  • Your password itself is never stored anywhere - only the salt and IV needed to re-derive the same key from the password you type in at import time.

Good practices

  • Make a backup right after setting up your account and blacklist the way you want them - it costs ten seconds.
  • Store the file somewhere you'd store any other sensitive credential (a password manager's file storage, an encrypted drive) - the password protects the contents, but losing the file itself still means losing a backup.
  • Re-export after major changes (new blacklist entries, a new account) rather than relying on an old one.

Clone this wiki locally