DEV Community

vedraj360
vedraj360

Posted on

Backpack πŸŽ’ – Secure, Drop-in Google Drive Backups for Room Databases

Hey developers! πŸ‘‹

I wanted to share an open-source Android library I created called Backpack. It provides a secure, drop-in cloud backup solution for Room databases directly to a user's Google Drive.

The Problem

Implementing cloud backups for SQLite/Room databases on Android is surprisingly complex. You have to:

  1. Safely handle SQLite WAL/SHM file locking and checkpointing.
  2. Configure Google Identity Services and handle OAuth tokens.
  3. Manage secure, encrypted file transfers so backups aren't vulnerable.

Backpack handles all of this complexity for you with minimal setup.

Features

  • πŸ” AES-256 Encryption: Automatically encrypts database files before uploading.
  • πŸ“ Google Drive App Folder: Stores backups in an isolated, hidden app folder so users cannot accidentally modify or delete them.
  • ⚑ Kotlin Coroutines & Flow: Built fully asynchronous for modern Android projects.
  • 🎨 Pre-built UI: Includes a customizable BackupView component for easy onboarding and sign-in.
  • πŸš€ Production Proven: Already used in production by apps like AutoSend on Google Play.

Quick Start

Add the dependency to your app's build.gradle file:

dependencies {
    implementation("com.github.vedraj360:Backpack:1.0.3")
}
Enter fullscreen mode Exit fullscreen mode

πŸ”— Links & Resources

To see the full setup guide, view code examples, or star the project:

I'd love to hear your thoughts, feedback, or any feature suggestions in the comments below! If you find it useful for your project, please leave a star ⭐️ on GitHub!

Top comments (0)