Skip to content

Repository files navigation

Latch

Latch Banner

Get it on Google Play


Latch is a private media vault for Android, written in Flutter. It hides photos, videos, and documents behind PIN/password/biometric auth, encrypts them with AES-256, and removes itself from the recents list when you leave (auto-kill).

Renamed from Locker to Latch. The repo directory is still Locker, but the app and all user-facing references are Latch. On Google Play: Download Latch.

Features

Vault

  • Import from gallery, camera, or files; optionally delete the originals
  • Duplicate detection on import
  • Per-file encryption settings and compression
  • Local backup and restore

Organization

  • Nested folders with drag-and-drop, breadcrumbs, and a tree view
  • Albums, color-coded tags, favorites
  • Grid/list explorer with filters, multi-select, sorting (date, name, size, type)
  • Search across name, tags, type, and date

Viewing

  • Image viewer (pinch-zoom, slideshow)
  • Video player (speed, loop)
  • Song player with Flick handoff
  • PDF and Office document viewer
  • Export to Downloads or external apps

Security

  • PIN or password unlock, with biometrics
  • AES-256-GCM (default) or AES-256-CTR, with re-encryption of existing files
  • Argon2id master-key wrapping; per-file PBKDF2
  • Auto-kill, screenshot protection, secure delete
  • Decoy vault behind a separate PIN

Theme

  • Accent colors, custom theming, glassmorphism unlock screen

Moss Ecosystem

Latch is part of the Moss ecosystem. Flick is the companion music player (UAC 2.0 DAC support). Latch can hand audio playback to Flick and return via locker://return. Details in the Flick Integration Guide.

Desktop Backup (Latch Web)

latchd is a tiny companion you run on your desktop. It hosts a local web UI (http://127.0.0.1:7800, loopback only), shows a pairing QR, and receives encrypted vault backups from the phone over Wi-Fi or USB — no server, no accounts, ciphertext only in transit. It can also browse, verify, restore, and export-decrypt a backup.

Installation

Linux (amd64 / arm64) — one-line installer, installs to ~/.local/bin/latchd with sha256 verification:

curl -fsSL https://raw.githubusercontent.com/moss-apps/Latch/HEAD/scripts/install-latchd.sh | bash

Installer overrides (environment variables): LATCHD_BINDIR (install directory), LATCHD_VERSION (pin a release tag, e.g. 0.18.0-beta.1), LATCHD_REPO (alternative fork).

Windows — download latchd-windows-amd64.exe from releases.

From source — needs Go; no repo clone required for the installer paths above:

make latchd          # builds ./latchd/latchd

macOS is not supported yet (prebuilt binaries are Linux/Windows only).

Configuration

latchd needs no config file. Subcommands and their options:

Command Purpose Options
latchd serve Loopback web UI: pairing QR, browse, restore --addr 127.0.0.1:7800 (listen address), --dir latch-backup (backup directory)
latchd verify Verify a local backup against its manifest --dir latch-backup, --password
latchd export-decrypted Decrypt a local backup to plaintext --out <dir> (required), --dir latch-backup, --password
latchd version Print the build version —

The vault password comes from --password, the LATCHD_PASSWORD environment variable, or an interactive prompt. It is never stored and kept in memory only — prefer the prompt or env var over the flag.

Network defaults:

  • Web UI: 127.0.0.1:7800, loopback only — never exposed to the LAN.
  • Pairing receiver: 0.0.0.0:7801 (fixed port so one firewall rule covers every session; falls back to an ephemeral port if taken). It exists only while a pairing session is active and is token-gated. On Linux/ufw, latchd prints the exact rule at session start, e.g. sudo ufw allow from <lan-subnet> to any port 7801 proto tcp.
  • USB: adb reverse tcp:<port> tcp:<port> (shown in the web UI), then tap Connect via USB on the phone and Allow once on the desktop.

Quick start

  1. Run latchd serve and open http://127.0.0.1:7800
  2. Start a pairing session (if your firewall asks, latchd prints the exact rule)
  3. Phone: Latch → Settings → Storage → Desktop Backup → scan the QR

Full spec: docs/desktop_backup.md.

Technology Stack

Flutter

Package Purpose
flutter_riverpod State management
flutter_secure_storage Credentials and metadata
pointycastle AES-256 encryption
photo_manager Gallery access and import
pdfrx Native PDF rendering
syncfusion_flutter_pdf Office document conversion
flutter_image_compress Image compression
video_compress Video compression
archive ZIP/RAR/7Z support
permission_handler Runtime permissions
local_auth Biometric authentication
camera Photo/video capture
just_audio Audio playback
in_app_update Play Store updates

Kotlin / Android

Component Purpose
MainActivity.kt Auto-kill, performance settings, content URI handling
AutoKillService Removes app from recents when backgrounded
PermissionHandler Runtime permission management

Getting Started

Prerequisites: Flutter 3.4.4+, Android SDK API 36, JDK 17, Android 8.0 (API 26)+ device.

flutter pub get
flutter run                                  # debug
flutter run -d <device-id>                   # specific device
flutter build apk --release --obfuscate --split-debug-info=./build/symbols
flutter pub run flutter_launcher_icons       # regenerate icons (optional)

Permissions

Permission Purpose
READ_EXTERNAL_STORAGE / WRITE_EXTERNAL_STORAGE File access (Android ≤12)
READ_MEDIA_IMAGES / READ_MEDIA_VIDEO Media access (Android 13+)
MANAGE_EXTERNAL_STORAGE Full file access for hide/unhide (Android 11+)
CAMERA Capture photos and videos
RECORD_AUDIO Audio with video
USE_BIOMETRIC Biometric authentication

Architecture

Service-based, split into four layers: Services (auth, encryption, file ops, media), Providers (Riverpod reactive state), Screens (feature UI), and a Kotlin backend (auto-kill, permissions, camera). All sensitive data (PINs, passwords, keys) goes through flutter_secure_storage into Android's Keystore. See Media Encryption & Compression.

Documentation

Contributing

Fork → feature branch → flutter analyze + pass tests → pull request. Follow the Dart style guide.

License

MIT, see LICENSE. Free, no ads, no paid features.

Contributors

Transparency

I build this with OpenCode. It writes some of the comments and docs, and it's bailed me out of more than a few nasty-ass bugs. The code, the design calls, and the fuck-ups are all mine.

About

Latch is a secure and simple media-hiding application built with Flutter. It allows you to hide and protect your media files such as images, videos, and documents behind a password-protected screen. This app ensures that your private media stays hidden from prying eyes and only accessible to you.

Resources

Stars

15 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages