Support ab files

This commit is contained in:
Andrea Cavalli 2021-07-20 22:47:57 +02:00
parent 3949449b19
commit 8845fb6fb2
4 changed files with 33 additions and 1 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@
/adb-sync/ /adb-sync/
/work/ /work/
*.kate-swp *.kate-swp
*.ab

View File

@ -31,4 +31,15 @@ This tool allows you to recover apps data from a TWRP-compatible backup
- If the play store tells you an error and you don't have that app, skip to the next app using the volume DOWN button. - If the play store tells you an error and you don't have that app, skip to the next app using the volume DOWN button.
7. At the end restart the phone to fix permissions, if the app are crashing. 7. At the end restart the phone to fix permissions, if the app are crashing.
The program is licensed with GPLv3 by Andrea Cavalli ## ADB ".ab" backups
With .ab backups you must follow these extra steps before the others:
1. `adb backup --twrp`
2. Install the lastest openjdk version of your distro
3. `./ab_fix.sh <path-to-the-ab-file>`
3. follow the other steps
## License
The program is licensed with GPLv3 by Andrea Cavalli (https://cavallium.it)
twrpabx (https://github.com/prudy/twrpabx/tree/img_and_issue4)

19
ab_fix.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
bashdir="$PWD"
outdir="work"
abfile=$(readlink -f "$1")
mkdir -p "$outdir"
outdir=$(readlink -f "$outdir")
mkdir -p "$outdir/ab_backup"
#dd if="$1" bs=512 skip=3 | tar -x -C "$outdir/ab_backup"
#java -jar abe.jar unpack "$1" "$outdir/ab_backup.tar"
cd "$outdir/ab_backup"
"$bashdir/twrpabx" "$abfile"
#tar -xf "$outdir/ab_backup.tar" -C "$outdir/ab_backup"
echo "The backup has been extracted to: \"$outdir/ab_backup\""
echo "Please use that path for the next steps"

BIN
twrpabx Executable file

Binary file not shown.