Skip to content

Commit

Permalink
Rebrand, finally :)
Browse files Browse the repository at this point in the history
Linux Android Backup -> Open Android Backup
  • Loading branch information
mrrfv committed May 8, 2023
1 parent 9ce150f commit c591bfb
Show file tree
Hide file tree
Showing 17 changed files with 184 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/test-script.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

adb shell mkdir -p /storage/emulated/0/linux-android-backup-temp
adb shell mkdir -p /storage/emulated/0/open-android-backup-temp

export unattended_mode="yes"
export selected_action="Backup"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-companion-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:
- run: flutter build apk
working-directory: ${{ env.working-directory }}

- run: cp -v companion_app/build/app/outputs/apk/release/app-release.apk ./linux-android-backup-companion.apk
- run: cp -v companion_app/build/app/outputs/apk/release/app-release.apk ./open-android-backup-companion.apk
- run: sudo apt update && sudo apt install p7zip-full
- run: 7z a -bb3 -tzip -mx9 -x!.*\* -x!website\* -x!companion_app\* Linux_Android_Backup_Unstable_Bundle.zip .
- run: 7z a -bb3 -tzip -mx9 -x!.*\* -x!website\* -x!companion_app\* Open_Android_Backup_Unstable_Bundle.zip .

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest" # we need to keep this tag for legacy scripts to work (and as a fallback)
prerelease: true
title: "Linux Android Backup - Unstable Version"
title: "Open Android Backup - Unstable Version"
files: |
companion_app/build/app/outputs/apk/release/app-release.apk
Linux_Android_Backup_Unstable_Bundle.zip
Open_Android_Backup_Unstable_Bundle.zip
8 changes: 4 additions & 4 deletions .github/workflows/build-tagged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
- run: flutter build apk
working-directory: ${{ env.working-directory }}

- run: cp -v companion_app/build/app/outputs/apk/release/app-release.apk ./linux-android-backup-companion.apk
- run: cp -v companion_app/build/app/outputs/apk/release/app-release.apk ./open-android-backup-companion.apk
- run: sudo apt update && sudo apt install p7zip-full
- run: 7z a -bb3 -tzip -mx9 -x!.*\* -x!website\* -x!companion_app\* Linux_Android_Backup_${{ github.ref_name }}_Bundle.zip .
- run: 7z a -bb3 -tzip -mx9 -x!.*\* -x!website\* -x!companion_app\* Open_Android_Backup_${{ github.ref_name }}_Bundle.zip .

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
title: "Linux Android Backup Stable - ${{ github.ref_name }}"
title: "Open Android Backup Stable - ${{ github.ref_name }}"
files: |
companion_app/build/app/outputs/apk/release/app-release.apk
Linux_Android_Backup_${{ github.ref_name }}_Bundle.zip
Open_Android_Backup_${{ github.ref_name }}_Bundle.zip
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Linux Android Backup
# Open 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.
Open 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. This project works on Windows, macOS and Linux.

**Important:** I am looking for volunteers who are interested in helping me with maintaining this project as well as fixing bugs. This project is not being abandoned, I just need a helping hand.
![Demo](https://github.com/mrrfv/open-android-backup/raw/c86602f9e5dbc501e0eacc43fe781c352998e712/.github/images/demo.gif)

![Demo](https://github.com/mrrfv/linux-android-backup/raw/c86602f9e5dbc501e0eacc43fe781c352998e712/.github/images/demo.gif)
**Important:** The `master` branch is reserved for development. If you are looking for a download, please go to Releases or select a tag instead.

## Data backed up

### Restoreable

The following data types can be automatically restored back to the device.

- Apps (.apk files of installed apps)
- Apps (.apk files of installed apps - split APK support is experimental and can be found in the `split-apk-support` branch)
- Internal storage (pictures, downloads, videos, Signal backups if enabled, etc)
- Contacts (exported in vCard format)

Expand Down Expand Up @@ -42,7 +42,7 @@ These things are the majority of what most people would want to keep safe, but e
### Linux

1. Install p7zip, adb, curl, bc, pv and optionally secure-delete. If you're on Debian or Ubuntu, run this command: `sudo apt update; sudo apt install p7zip-full adb curl bc pv secure-delete`.
2. [Download](https://github.com/mrrfv/linux-android-backup/releases/latest) the Linux Android Backup bundle, which contains the script and companion app in one package. You can also grab an experimental build (heavily discouraged) by clicking on [this link](https://github.com/mrrfv/linux-android-backup/archive/refs/heads/master.zip) or cloning.
2. [Download](https://github.com/mrrfv/open-android-backup/releases/latest) the Open Android Backup bundle, which contains the script and companion app in one package. You can also grab an experimental build (heavily discouraged) by clicking on [this link](https://github.com/mrrfv/open-android-backup/archive/refs/heads/master.zip) or cloning.
3. Enable [developer options](https://developer.android.com/studio/debug/dev-options#enable) and USB debugging on your device, then run `backup.sh` in a terminal.

### macOS
Expand All @@ -65,7 +65,7 @@ brew install p7zip pv bash
### Windows

1. Install the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install#install), a compatibility layer allowing you to run Linux applications (such as this one) on Windows. You only need to follow the `Install` step.
2. [Download](https://github.com/mrrfv/linux-android-backup/releases/latest) the Linux Android Backup bundle, which contains the script and companion app in one package. You can also grab an experimental build (heavily discouraged) by clicking on [this link](https://github.com/mrrfv/linux-android-backup/archive/refs/heads/master.zip) or cloning.
2. [Download](https://github.com/mrrfv/open-android-backup/releases/latest) the Open Android Backup bundle, which contains the script and companion app in one package. You can also grab an experimental build (heavily discouraged) by clicking on [this link](https://github.com/mrrfv/open-android-backup/archive/refs/heads/master.zip) or cloning.
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.**

![Powershell Developer Settings](.github/images/windows-powershell-developer-settings.png)
Expand All @@ -76,17 +76,17 @@ Just run `backup.sh` and the script will walk you through the process. This sect

### Hooks

Linux Android Backup hooks allow you to effortlessly include your own backup steps, such as those that require root or work only on specific devices, without modifying the main script. You can upload these hooks to your own GitHub repositories and share them with others.
Open Android Backup hooks allow you to effortlessly include your own backup steps, such as those that require root or work only on specific devices, without modifying the main script. You can upload these hooks to your own GitHub repositories and share them with others.

**Info for users**

After writing or downloading a hook you'd like to use, rename it to `hooks.sh` and place in in the same directory as this script. Next, allow the use of hooks when the script asks you.

**Info for the security conscious**

Using hooks that you don't trust is a security risk that we don't claim responsibility for! They have the same access over your phone and computer as Linux Android Backup, making it possible for attackers to backdoor or wipe your devices. You must check the contents of the hook you'd like to use before running the script.
Using hooks that you don't trust is a security risk that we don't claim responsibility for! They have the same access over your phone and computer as Open Android Backup, making it possible for attackers to backdoor or wipe your devices. You must check the contents of the hook you'd like to use before running the script.

Linux Android Backup doesn't automatically load hooks, and you have to allow the use of them before they are even touched by the program.
Open Android Backup doesn't automatically load hooks, and you have to allow the use of them before they are even touched by the program.

**Info for developers**

Expand Down Expand Up @@ -122,7 +122,7 @@ There are 8 environment variables that control what the script does without user
3. `archive_path` - Path to the backup. Works for both Restore and Backup 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.
6. `export_method` - The method Open 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.
7. `use_hooks` - Whether to use hooks or not. Possible values are `yes` or `no` (case sensitive).
8. `data_erase_choice` - Whether to securely erase temporary files or not. Possible values are `Fast`, `Slow` and `Extra Slow` (case sensitive). The value of this variable is ignored if the command `srm` isn't present on your computer.

Expand Down Expand Up @@ -151,6 +151,12 @@ PRs are appreciated.
- Improve the error handling and design of the mobile app.
- Export the calendar and other data.

## Donations

This project is supported entirely by your kind donations. Thanks to your support, it was possible to get a real domain for this script - [openandroidbackup.me](https://openandroidbackup.me). By donating, you are contributing to the development of a community-driven project that respects your privacy and data. Please consider making a donation today and help keep this project alive and growing.

If you'd like to support me and this project, you can do so by clicking the Sponsor button on the top of the GitHub page or directly visiting the [Liberapay page](https://liberapay.com/mrrfv/).

## License

This program is free software: you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions backup-windows.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Write-Output "This script lets you use linux-android-backup on Windows."
Write-Output "This script lets you use open-android-backup on Windows."
Write-Output "Please ensure that you've installed the Windows Subsystem for Linux and a distro (Ubuntu or Debian) prior to running this script."
Write-Output "If not, close this window, and refer to the README for instructions (https://github.com/mrrfv/linux-android-backup#windows=)"
Write-Output "If not, close this window, and refer to the README for instructions (https://github.com/mrrfv/open-android-backup#windows=)"
Write-Output "If sudo asks you for your account password, don't enter your Windows password!"
Write-Output ""
Write-Output "Warning: WSL 2 is required. WSL will be updated to fix potential issues with the GUI."
Expand Down
2 changes: 1 addition & 1 deletion backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fi
if command -v srm &> /dev/null
then
if [ ! -v data_erase_choice ]; then
cecho "Linux Android Backup creates a temporary folder that contains all the data exported from your device."
cecho "Open Android Backup creates a temporary folder that contains all the data exported from your device."
cecho "Leftovers from this folder might remain on your storage device, even after a successful backup or restore."
cecho "The options below allow you to securely erase this data, making it harder for law enforcement and other adversaries to view your files."
cecho "Your choice will also apply to cleanups, i.e. if the script has previously crashed without removing the files."
Expand Down
2 changes: 1 addition & 1 deletion companion_app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<application
android:requestLegacyExternalStorage="true"
android:label="Linux Android Backup Companion"
android:label="Open Android Backup Companion"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
14 changes: 7 additions & 7 deletions companion_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Linux Android Backup',
title: 'Open Android Backup',
theme: ThemeData(
primarySwatch: Colors.green,
),
Expand Down Expand Up @@ -79,7 +79,7 @@ class _HomeState extends State<Home> {

// Recreate the temp directory if it already exists.
final Directory directory =
Directory("/storage/emulated/0/linux-android-backup-temp");
Directory("/storage/emulated/0/open-android-backup-temp");
if (await directory.exists()) {
await directory.delete(recursive: true);
}
Expand All @@ -89,7 +89,7 @@ class _HomeState extends State<Home> {
for (var i = 0; i < contacts.length; i++) {
final String vCard = contacts[i].toVCard(withPhoto: true);
final File file = File(
"/storage/emulated/0/linux-android-backup-temp/linux-android-backup-contact-$i.vcf");
"/storage/emulated/0/open-android-backup-temp/open-android-backup-contact-$i.vcf");
file.writeAsString(vCard);
setState(() {
contactsExported = i + 1;
Expand Down Expand Up @@ -121,7 +121,7 @@ class _HomeState extends State<Home> {
String csv = const ListToCsvConverter().convert(processedMessages);

final File smsFileExport = File(
"/storage/emulated/0/linux-android-backup-temp/SMS_Messages.csv");
"/storage/emulated/0/open-android-backup-temp/SMS_Messages.csv");
smsFileExport.writeAsString(csv);

// Show a dialog if the export is complete
Expand Down Expand Up @@ -203,7 +203,7 @@ class _HomeState extends State<Home> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Center(child: Text('Linux Android Backup Companion')),
title: const Center(child: Text('Open Android Backup Companion')),
),
body: SingleChildScrollView(
child: Padding(
Expand All @@ -215,10 +215,10 @@ class _HomeState extends State<Home> {
style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold),
),
const Text(
"The Linux Android Backup companion app allows for backups of data not normally accessible through adb. No data is uploaded to a remote server: it is saved to the internal storage and then read by the script running on your computer.",
"The Open Android Backup companion app allows for backups of data not normally accessible through adb. No data is uploaded to a remote server: it is saved to the internal storage and then read by the script running on your computer.",
),
const Text(
"This app requires the Linux Android Backup script running on your computer."),
"This app requires the Open Android Backup script running on your computer."),
// data export section
const Text(
"Export Data",
Expand Down
2 changes: 1 addition & 1 deletion companion_app/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: companion_app
description: Companion app for Linux Android Backup, an easy-to-use tool to backup and restore Android devices.
description: Companion app for Open Android Backup, an easy-to-use tool to backup and restore Android devices.

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
Expand Down
4 changes: 2 additions & 2 deletions extras/backup_archive_info.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a backup archive created by Linux Android Backup.
For more information, please visit the project's GitHub repository: https://github.com/mrrfv/linux-android-backup
This is a backup archive created by Open Android Backup.
For more information, please visit the project's GitHub repository: https://github.com/mrrfv/open-android-backup

"version.txt" is a file containing the version of the script when this backup was created; this data might be used in the future to improve backwards compatibility. Please avoid changing its contents.
8 changes: 4 additions & 4 deletions functions/backup_func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ function backup_func() {
# Export contacts and SMS messages
cecho "Exporting contacts (as vCard) and SMS messages (as CSV)."
mkdir ./backup-tmp/Contacts
get_file /storage/emulated/0/linux-android-backup-temp . ./backup-tmp/Contacts
get_file /storage/emulated/0/open-android-backup-temp . ./backup-tmp/Contacts
mkdir ./backup-tmp/SMS
mv ./backup-tmp/Contacts/SMS_Messages.csv ./backup-tmp/SMS
cecho "Removing temporary files created by the companion app."
adb shell rm -rf /storage/emulated/0/linux-android-backup-temp
adb shell rm -rf /storage/emulated/0/open-android-backup-temp

# Export internal storage
cecho "Exporting internal storage - this will take a while."
Expand Down Expand Up @@ -104,7 +104,7 @@ function backup_func() {
# -mx=9: ultra compression
# -bb3: verbose logging
# The undefined variable (archive_password) is set by the user if they're using unattended mode
declare backup_archive="$archive_path/linux-android-backup-$(date +%m-%d-%Y-%H-%M-%S).7z"
declare backup_archive="$archive_path/open-android-backup-$(date +%m-%d-%Y-%H-%M-%S).7z"
retry 5 7z a -p"$archive_password" -mhe=on -mx=9 -bb3 "$backup_archive" backup-tmp/*

# We're not using 7-Zip's -sdel option (delete files after compression) to honor the user's choice to securely delete temporary files after a backup
Expand All @@ -121,7 +121,7 @@ function backup_func() {
fi

cecho "Backed up successfully."
cecho "Note: SMS messages and call logs cannot be restored by Linux Android Backup at the moment. They are included in the backup archive for your own purposes."
cecho "Note: SMS messages and call logs cannot be restored by Open Android Backup at the moment. They are included in the backup archive for your own purposes."
cecho "You can find them by opening the backup archive using 7-Zip."
rm -rf backup-tmp > /dev/null
}
Loading

0 comments on commit c591bfb

Please sign in to comment.