Giter Site home page Giter Site logo

vr-25 / tarb Goto Github PK

View Code? Open in Web Editor NEW
81.0 7.0 4.0 216 KB

A backup solution for Android, with recovery mode support

License: GNU General Public License v3.0

Shell 100.00%
android backup migrator ssaid recovery snapshot titanium titaniumbackup twrp nandroid

tarb's Introduction

Tarb, A Backup Solution for Android, With Recovery Mode Support


Backup/restore apps and respective data, SSAIDs, runtime permissions, system settings, Magisk modules, and more.

All required binaries/executables are included: busybox for general tools, openssl for encryption, tar for archiving, and zstd for compression.

Works in recovery mode as well.


NOTICE

This program, along with all included binaries (busybox, openssl, tar and zstd), are free and open source software. They are provided "as is", and come with absolutely no warranties. One can do whatever they want with those programs, as long as they follow the terms of each license.

The binaries are provided by @osm0sis and @Zackptg5 -- credits to them, other contributors, and original authors. Refer to the sources below for more information:


USAGE

# sh /path/to/executable prints the help text.

e.g., # sh /sdcard/tarb-arm64

The -m option installs Tarb as a Magisk module -- to be available system-wide, as tarb and /data/t (for recovery).


BUILDING FROM SOURCE

$ ./build.sh [o] [CPU architecture...]

o is for offline build: binaries are not downloaded/updated.

wget with SSL/TLS support is required for downloading binaries. Alternatively, one can download them manually.

Supported archs are ARM, ARM64, x86 and x64.

Examples:

$ ./build.sh arm arm64: builds for those two architectures.

$ ./build.sh: builds for all supported architectures.


LINKS

tarb's People

Contributors

vr-25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tarb's Issues

How to use in Recovery Mode?

Read me states there is recovery support, but does not seem to work

# /data/t -r com.android.vending

+ match -r -[br]*
+ eval case -r in -[br]*) return 0;; esac; false
+ return 0
+ exec
+ FLAGS=
+ flag C
+ match *C*
+ eval case *C* in \'\') return 0;; esac; false
+ false
+ echo ./cache
+ COMP_LEVEL=1
+ flag [0-9]
+ match *[0-9]*
+ eval case *[0-9]* in \'\') return 0;; esac; false
+ false
+ flag [nx]
+ match *[nx]*
+ eval case *[nx]* in \'\') return 0;; esac; false
+ false
+ match com.android.vending */*
+ eval case com.android.vending in */*) return 0;; esac; false
+ false
+ [ -n  ]
+ FLAGS=ad
+ flag D
+ match ad *D*
+ eval case ad in *D*) return 0;; esac; false
+ false
+ flag M
+ match ad *M*
+ eval case ad in *M*) return 0;; esac; false
+ false
+ flag O
+ match ad *O*
+ eval case ad in *O*) return 0;; esac; false
+ false
+ :
+ ENCRYPT=false
+ [ -n  ]
+ params=-r com.android.vending
+ shift
+ [ -z -r com.android.vending ]
+ [ -n com.android.vending ]
+ match com.android.vending -p=*
+ eval case com.android.vending in -p=*) return 0;; esac; false
+ false
+ shift
+ [ -n  ]
+ set -f
+ echo -r com.android.vending
+ sed s/ -p=//
+ set -- -r com.android.vending
+ set +f
+ unset params
+ echo ./lib
/data/adb/magisk
/data/adb/magisk.db
Android/data/*/cache
com.google.android.gms.appid.xml
no_backup
+ exclude=
+ [ -z  ]
+ unset exclude
+ [ -n /data/media/0/BACKUP/tarb ]
+ restore -r com.android.vending
+ local one=
+ local regex=
+ local x=v
+ flag c
+ match ad *c*
+ eval case ad in *c*) return 0;; esac; false
+ false
+ flag n
+ match ad *n*
+ eval case ad in *n*) return 0;; esac; false
+ false
+ lspkg -r com.android.vending
+ local b=true
+ local extra=
+ local i=
+ local j=
+ local line=
+ local n=true
+ local r=true
+ local regex=
+ local x=v
+ match -r -r*
+ eval case -r in -r*) return 0;; esac; false
+ return 0
+ match -r -*[nx]*
+ eval case -r in -*[nx]*) return 0;; esac; false
+ false
+ x=
+ match -r -*n*
+ eval case -r in -*n*) return 0;; esac; false
+ false
+ n=false
+ match -r -b*
+ eval case -r in -b*) return 0;; esac; false
+ false
+ b=false
+ match -r -*
+ eval case -r in -*) return 0;; esac; false
+ return 0
+ shift
+ false
+ echo com.android.vending
+ sed -n /+ /p
+ sed s/.*+ //; s/,/|/g; s/\$/ /g
+ extra=
+ extra=
+ extra=
+ echo com.android.vending
+ sed s/ + .*//; s/+ .*//; s/,/|/g; s/\$/ /g
+ regex=com.android.vending
+ true
+ grep -E com.android.vending
+ sed s|/$||; s|.*/|| ;/^_settings_.*/d; s/$/ linuxIsAwesome/
+ grep -v ^vmdl.*\.tmp$
+ ls -1d  [app list redacted for privacy]
+ [ -z  ]
+ false
+ flag a
+ match ad *a*
+ eval case ad in *a*) return 0;; esac; false
+ return 0
+ allow_apk_sideload 1 0
+ settings put secure install_non_market_apps 1
+ /system/bin/settings put secure install_non_market_apps 1

command hangs at the last stdout

incremental backup?

Would you consider adding incremental backup using things like rsync or restic?

How to migrate with this system?

I am trying to migrate between a rooted Pixel 2 and Pixel 4 with Magisk installed.

  1. Plug in old phone
  2. adb push tarb-am64 /sdcard
  3. adb shell
  4. su (grant access)
  5. sh /sdcard/tarb-arm64 -b .
  6. adb pull /sdcard/.vr25/tarb
  7. -move cable to the new phone-
  8. adb push tarv /sdcard/.vr25
  9. sh /sdcard/tarb-arm64 -r
  10. adb shell
  11. su (grant access)

And it restored the applications but not their data, accounts etc.

[BUG] Not backing up apk

When I run tarb -b it backs up nothing.

When I run the full desired command:
tarb -badelms10 + $(pm list packages -3 | sed 's/^package://โ€™ | tr '\n' ',') -p='<pwd>'
It seems to back up everything except external data and the apk:

com.android.chrome
  data
  data_de
  data_ext
  runtime_perms

<other packages>

settings globalsettings secure
settings system
settings lineage global
settings lineage secure
settings lineage system

/data/adb

In the actual backup folder no APK and external data backup can be found either.

My current system is

  • LineageOS 19.1
  • MindTheGapps 12.1
  • Magisk 25.2

Thank you for this application. If I get this to work, it'll be my new backup tool of choice.

SSAID Restore Possibly Breaks System

Hi:

Thank you for this amazing tool.

I used this tool to backup all my apps in LineageOS 18.1 (Android 11) using the option "-badDeMOsx . -X *[cC]ache*." When I try to restore an app (rikka.appops) to Evolution X 6.3.1 (Android 12), I cannot boot into system next time after the restore.

Some experiments lead me to the file "/data/system/users/0/settings_ssaid.xml." If I backup the file before restore, and revert the changes tarb made to the file during the restore, I can boot into system next time.

I have attached the two /data/system/users/0/settings_ssaid.xml files before and after the restore, /dev/.vr25/tarb/ssaid and /dev/.vr25/tarb/log. Here is the link.

Thanks

Does not run shell properly on MacOS

Trying to run the build.sh and tarb.sh shell scripts fails due to how MacOS interprets sed command; requires backup file extension as first command.

% bash -x ./build.sh arm64

  • echo

  • set -eu

  • sh -n tarb.sh

  • TMPDIR=build
    ++ awk '/^#binaries.tgz.base64/ { print NR + 1; exit 0; }' tarb.sh

  • BIN_LINE=1142

  • offline=false

  • '[' .arm64 '!=' .o ']'
    ++ head -n1 CHANGELOG

  • ver='v2023.10.22 202310220'

  • echo 'v2023.10.22 202310220'

  • cut -d ' ' -f 2

  • sed -i '/^VERSION=/s/=.*/="v2023.10.22 202310220"/' tarb.sh
    sed: 1: "tarb.sh": undefined label 'arb.sh'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.