All Projects → mrrfv → linux-android-backup

mrrfv / linux-android-backup

Licence: GPL-3.0 license
Back up your device without vendor lock-ins, using insecure software or root. Supports encryption and compression out of the box. Works cross-platform.

Programming Languages

shell
77523 projects
dart
5743 projects
powershell
5483 projects
kotlin
9241 projects

Projects that are alternatives of or similar to linux-android-backup

flutter todos
A cross platform todo list app using flutter, sqlite etc. If you read the code, you will understand how to create simple elegant mobile app using Flutter and Dart language.
Stars: ✭ 60 (-49.58%)
Mutual labels:  android-app, flutter-apps, flutter-app
HistoryOfMe
Your own personal diary.
Stars: ✭ 50 (-57.98%)
Mutual labels:  android-app, flutter-apps, flutter-app
MailcowBackup
Script to backup/restore Mailcow and the host system using borgbackup. Handles 503 error page generation, mailflow stop/restart, SQL database dump, borg backup and prune and integrates with Logwatch for easy monitoring.
Stars: ✭ 28 (-76.47%)
Mutual labels:  backup, backup-script, bash-script
flutter-Anniversary
一款界面优美,功能简洁的纪念日APP
Stars: ✭ 57 (-52.1%)
Mutual labels:  android-app, flutter-apps, flutter-app
car rental lite
A platform for car sharing where users can book any car that suits their needs and wants for their intended journey, from the closest hosts in the community.
Stars: ✭ 28 (-76.47%)
Mutual labels:  flutter-apps, flutter-app
budget my life
Budget your life with ease.
Stars: ✭ 34 (-71.43%)
Mutual labels:  flutter-apps, flutter-app
flutter-app
Full Feature Todos Flutter Mobile app with fireStore integration.
Stars: ✭ 138 (+15.97%)
Mutual labels:  flutter-apps, flutter-app
flutter-system
Flutter Widgets,Components,Demos,Pages:从入门到产品级开发
Stars: ✭ 29 (-75.63%)
Mutual labels:  flutter-apps, flutter-app
butdr
Backup to Cloud( Google Drive, Dropbox ... ) use rclone
Stars: ✭ 49 (-58.82%)
Mutual labels:  backup, backup-script
MediumUnlimited
Android App written with Flutter/Dart to navigate medium.com without limitations.
Stars: ✭ 28 (-76.47%)
Mutual labels:  flutter-apps, flutter-app
time-travel
An rsync based backup script which only transfers modified files. Smooth integration into OSX Notification Center.
Stars: ✭ 43 (-63.87%)
Mutual labels:  backup, backup-script
pgsql-backup
PostgreSQL Backup Script. Ported from AutoMySQLBackup.
Stars: ✭ 24 (-79.83%)
Mutual labels:  backup, backup-script
flip view
A Flutter app with flip animation to view profiles of friends. 🌟
Stars: ✭ 69 (-42.02%)
Mutual labels:  flutter-apps, flutter-app
mmd-gitlab-backuper
a package to backup from all projects that you have on gitlab
Stars: ✭ 27 (-77.31%)
Mutual labels:  backup, backup-script
VestaCP-Sync-Backups-To-Mega
VestaCP: uploading backups to the MEGA cloud
Stars: ✭ 17 (-85.71%)
Mutual labels:  backup, backup-script
Churu
出入是一款用Flutter开发的简约记账应用。
Stars: ✭ 44 (-63.03%)
Mutual labels:  flutter-apps, flutter-app
NJU-Class-Shedule-Flutter
🍻 南哪课表APP Written in Flutter
Stars: ✭ 45 (-62.18%)
Mutual labels:  flutter-apps, flutter-app
backup-suite
Backup database, static files and config to AWS S3 with Cronjob
Stars: ✭ 32 (-73.11%)
Mutual labels:  backup, bash-script
flutter and cloudinary
How to build Photo Diary App using Flutter and Cloudinary
Stars: ✭ 17 (-85.71%)
Mutual labels:  flutter-apps, flutter-app
SocialMedia-App
A fully functional social media app built with flutter with multiple features
Stars: ✭ 646 (+442.86%)
Mutual labels:  flutter-apps, flutter-app

Linux Android Backup

Linux Android Backup is a tiny shell script & Flutter app that makes securely backing up Android devices easy, without vendor lock-ins or using closed-source software that could put your data at risk. It's based on ADB but doesn't use the deprecated adb backup command. Despite its name, this project works on Windows, macOS and Linux.

Demo

Data backed up

  • Apps (.apk files of installed apps)
  • Internal storage (pictures, downloads, videos, Signal backups if enabled, etc)
  • Contacts (exported in vCard format)

These 3 things are the majority of what most people would want to keep safe, but everybody has different expectations and requirements, so suggestions are welcome.

Features

  • Automatically restores backed up data.
  • Works on the 3 major operating systems, and supports any modern Android device.
  • Wireless backups that allow you to normally use your phone while it's being backed up.
  • Backs up data not normally accessible through ADB using a native companion app.
  • Tiny - the script is 5KB in size, and the companion app is around 15 megabytes.
  • Doesn't use proprietary formats - your data is safe even if you can't run the script. Simply open archives created by this script using 7-Zip.
  • Backups are encrypted along with their metadata.
  • All data is compressed using 7-Zip with maximum compression settings.

Installation

Linux

  1. Install p7zip, adb, curl, bc and pv. If you're on Debian or Ubuntu, run this command: sudo apt update; sudo apt install p7zip-full adb curl bc pv.
  2. Clone or download this repository.
  3. Enable developer options and USB debugging on your device, then run backup.sh in a terminal.

macOS

Warning: I've recently switched to an AMD CPU+NVIDIA GPU rig, making it impossible for me to test this script on macOS without buying a Mac. Whilst there is nothing that could prevent this script from running on macOS, you are on your own and support will be very limited.

  1. Install p7zip and adb using Homebrew:
# Tip: Run these commands in the built-in Terminal app (or iTerm if you have that installed).
# Install Homebrew if you haven't yet
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# If you already have Homebrew installed, just run these 2 commands:
brew install --cask android-platform-tools
brew install p7zip pv
  1. Follow the steps 2 and 3 from the install guide for Linux.

Windows

  1. Install the Windows Subsystem for Linux (WSL), a compatibility layer allowing you to run Linux applications (such as this one) on Windows. You only need to follow the Install step.
  2. Clone or download this repository.
  3. Open the repository in the file explorer. Right click on a file called backup-windows.ps1, and click on "Run with PowerShell". IMPORTANT: If you see an error after running the script, search for "Developer Settings" in the Settings app, and apply the settings related to PowerShell.

Usage

Just run backup.sh and the script will walk you through the process. This section covers advanced usage of this program.

Automation/Unattended Backups

Please keep in mind that this project has minimal support for automation and very little support will be provided. In order to export contacts, you still need to have physical access to the device you're backing up as an "unattended mode" for the companion app hasn't been implemented yet.

There are 6 environment variables that control what the script does without user input:

  1. unattended_mode - Instead of waiting for a key press, sleeps for 5 seconds. Can be any value.
  2. selected_action - What the script should do when run. Possible values are Backup and Restore (case sensitive).
  3. archive_path - Path to the backup. Works for both actions.
  4. archive_password - Backup password.
  5. mode - How the script should connect to the device. Possible values are Wired and Wireless (case sensitive).
  6. export_method - The method Linux Android Backup should use to export data from the device. Possible values are tar and adb (case sensitive) - the former is fast & very stable but might not work on all devices, and the latter is widely compatible but has stability issues.

Examples:

# Enable unattended mode, backup the device over the wire to the working directory and use the password "123"
$ unattended_mode="yes" selected_action="Backup" mode="Wired" export_method="tar" archive_path="." archive_password="123" ./backup.sh
# Keep unattended mode disabled, but automatically use the password "456"
$ archive_password="456" ./backup.sh

Building companion app

Note: You don't need to do this, as the precompiled companion app is automatically downloaded at runtime from GitHub Releases.

  1. Install Flutter and Android Studio.
  2. Run flutter doctor and flutter doctor --android-licenses.
  3. Run cd companion_app/ and flutter build apk.

TODO

PRs are appreciated.

  • Migrate the companion app to the Storage Access Framework API for forward compatibility (waiting for Flutter packages providing this functionality to become stable).
  • Improve the error handling and design of the mobile app.
  • Export the calendar and other data.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].