Skip to content

About

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USBCloudBackup

Overview

USBCloudBackup is a native Android application that automatically detects USB storage devices, scans their contents, and backs up files to Firebase Cloud Storage with content-based deduplication and automatic filename versioning.

Purpose

Many users store important files on USB drives but rarely create cloud backups. This app removes all friction from the backup process.

The user installs the app once, completes first-run setup once, and never needs to manually open the app again. Whenever a USB drive is attached:

  1. App detects the USB device via UsbManager and BroadcastReceiver.
  2. App discovers storage volume via hybrid storage access (SAF / MANAGE_EXTERNAL_STORAGE).
  3. WorkManager enqueues a background job chain.
  4. Files are scanned recursively and SHA-256 hashes are computed.
  5. Files already backed up are skipped (content-based deduplication).
  6. New files are uploaded to Firebase Cloud Storage.
  7. Filename collisions produce automatic versioned names (name(1).ext, name(2).ext) reserved transactionally in Firestore.
  8. Operation details are indexed in Firestore and local Room DB for crash recovery.

Target Platform & Baseline

  • Minimum SDK: Android 10 (API 29)
  • Target SDK: Android 16 (API 36)
  • Compile SDK: Android 16 (API 36)
  • Language: Kotlin
  • Jetpack Libraries: Room 2.6+, WorkManager 2.9+, Lifecycle
  • Firebase Platform: BoM 34.17.0 (firebase-auth, firebase-storage, firebase-firestore)

Key Design Principles

  1. Zero-interaction backup — Headless operation after first-run setup.
  2. Content-based deduplication — SHA-256 identity, not filename identity.
  3. Never overwrite — Existing cloud files are never replaced.
  4. Automatic versioning — Filename collisions produce (1), (2), (3) suffixes.
  5. Crash-safe — Multi-stage state machine with upload session resume and cloud reconciliation.
  6. Event-driven — No polling, no permanent idle service.

Documentation Set

Master Architecture Specification:

Detailed Architectural Specifications:

Original Reference Specs:

About

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages