OTG Master

CI License: GPL v3 or later

Android app to open encrypted USB mass-storage devices for read/write without root.

GitHub release: may include beta features not yet fully validated. It is signed with a different key from the F-Droid and Google Play builds, so it cannot update a store install or be updated by one. Uninstall first to switch.

How it works

The app cannot perform a kernel mount on non-rooted Android. Instead it:

  1. Requests USB Host permission for a mass-storage device.
  2. Reads raw sectors through a userspace USB Mass Storage adapter (libaums).
  3. Probes MBR/GPT partitions and detects the encryption type (VeraCrypt, LUKS1, LUKS2, BitLocker or encrypted APFS) on each.
  4. Unlocks the volume header and exposes a decrypted block-device wrapper:
    • VeraCrypt: AES or Serpent, SHA-512 header KDF; also Twofish, the cascades AES-Twofish, AES-Twofish-Serpent, Serpent-AES, Serpent-Twofish-AES and Twofish-Serpent, and the Argon2id header KDF
    • LUKS1: PBKDF2-based KDF, AES-XTS bulk decryption
    • LUKS2: Argon2id-based KDF, AES-XTS bulk decryption
    • BitLocker: password or recovery key; XTS-AES and AES-CBC, with or without the Elephant diffuser
    • APFS (Encrypted): the password goes to the filesystem reader, which unwraps the volume key itself
  5. Feeds the decrypted block device into a userspace filesystem reader (FAT32 via libaums, exFAT via a vendored native libexfat, ext4 via a pure-Kotlin driver, NTFS via a vendored libntfs-3g, and APFS, read-only, via a vendored libfsapfs).
  6. Shows files in the app and through a DocumentsProvider, so other apps (Files, Gallery, etc.) can browse the unlocked volume.
  7. Formats and encrypts from a mounted drive's actions (on the card when they fit, else under More actions), after the user types ERASE:
    • Format writes an empty filesystem of the same size, with the label you give: FAT32, exFAT, ext4 or NTFS (ext4 and NTFS from 0.5.0), the current one by default. A volume inside an encrypted container stays in it, with the same password
    • Encrypt erases the partition and creates a new VeraCrypt volume (any of the ciphers and cascades above, SHA-512 or Argon2id, optional PIM and keyfiles) or, from 0.5.0, a LUKS2 volume (AES-XTS, Argon2id) that Linux opens with its own tools. Either holds a new FAT32, exFAT, ext4 or NTFS filesystem
    • Both overwrite every sector by default; Quick writes only the filesystem structures, and the old data stays on the drive until overwritten
  8. From 0.5.0:
    • Back up copies a folder from a source to a target, each either the phone's storage or a mounted partition, once now and then daily, weekly or monthly. A backup is Plain (dated full copies) or Incremental (snapshots in the restic repository format). A computer opens those snapshots with restic, and a repository restic made is backed up into the same way. The app reminds you when a backup is overdue and names the drive to plug in. Manage backups on the main screen lists every backup's reminders and run history, and mounts an incremental backup read-only, one folder per snapshot, for the Files app
    • Recover deleted files… lists the files a FAT32 or exFAT filesystem has deleted (only those) and copies the chosen ones to another drive or the phone; nothing is written to the drive being recovered
    • Another phone or a camera connected over USB (MTP/PTP) shows up as read-only drives, one per storage

Roadmap

Support