Skip to content

Commit

Permalink
revised readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Elenkov committed Oct 9, 2018
1 parent 7032c2c commit f2cfd81
Showing 1 changed file with 38 additions and 24 deletions.
62 changes: 38 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ Android backup extractor
Utility to extract and repack Android backups created with ```adb backup``` (ICS+).
Largely based on BackupManagerService.java from AOSP.

# Building

Requires Java 7. Handling encrypted backups requires the JCE unlimited strength
jurisdiction policy.
jurisdiction policy (not needed if using current Java 9 release).

http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

Usage (Eclipse):
Use one of the tools listed below to build or see [Releases](#releases) for pre-built binaries (runnable jar files).

## With Eclipse:

Download the latest version of Bouncy Castle Provider jar
(```bcprov-jdk15on-*.jar```) from here:
Expand All @@ -18,21 +22,8 @@ http://www.bouncycastle.org/latest_releases.html

Drop the latest Bouncy Castle jar in lib/, import in Eclipse and adjust
build path if necessary. Use the ```abe``` script to start the utility.
Syntax:

unpack: abe unpack <backup.ab> <backup.tar> [password]
pack: abe pack <backup.tar> <backup.ab> [password]
pack for 4.4: abe pack-kk <backup.tar> <backup.ab> [password]
(creates version 2 backups, compatible with Android 4.4.3)

If the filename is `-`, then data is read from standard input or written to
standard output.

If the password is not given on the command line, then the environment variable
`ABE_PASSWD` is tried. If you don't specify a password the backup archive won't
be encrypted but only compressed.

Alternatively with Ant:
## With Ant:

Use the bundled Ant script to create an all-in-one jar and run with:
(you still need to put the Bouncy Castle jar in lib/; modify the
Expand All @@ -42,24 +33,31 @@ Use the bundled Ant script to create an all-in-one jar and run with:

(Thanks to Jan Peter Stotz for contributing the build.xml file)

Alternatively with Gradle:
## With Gradle:

Use gradle to create an all-in-one jar:
```./gradlew``` and then:

```java -jar build/libs/abe-all.jar pack|unpack|pack-kk [parameters as above]```

# Releases

[Releases](https://github.com/nelenkov/android-backup-extractor/releases/latest) are build with Travis CI from the master branch and include a runnable fat jar.
# Usage

[![Build Status](https://travis-ci.org/nelenkov/android-backup-extractor.svg?branch=master)](https://travis-ci.org/nelenkov/android-backup-extractor)
## Syntax:
```
unpack: abe unpack <backup.ab> <backup.tar> [password]
pack: abe pack <backup.tar> <backup.ab> [password]
pack for 4.4: abe pack-kk <backup.tar> <backup.ab> [password]
(creates version 2 backups, compatible with Android 4.4.3)
```

# Notes
If the filename is `-`, then data is read from standard input or written to
standard output.

More details about the backup format and the tool implementation in the [associated blog post](https://nelenkov.blogspot.de/2012/06/unpacking-android-backups.html).
If the password is not given on the command line, then the environment variable
`ABE_PASSWD` is tried. If you don't specify a password the backup archive won't
be encrypted but only compressed.

### Packing tar archives
## Packing tar archives

- Android is **very** particular about the order of files in the tar archive. The format is [described here](https://android.googlesource.com/platform/frameworks/base/+/4a627c71ff53a4fca1f961f4b1dcc0461df18a06).
- Incompatible tar archives lead to errors or even system crashes.
Expand All @@ -76,3 +74,19 @@ And then use that list to build the tar file. In the extracted backup directory:
tar cf restore.tar -T package.list
```
You can now pack `restore.tar` and try `adb restore restore.ab`

# Releases

[Releases](https://github.com/nelenkov/android-backup-extractor/releases/latest) are build with Travis CI from the master branch and include a runnable fat jar.

Use the binaries at your own risk.

Please report only bugs in backup extractor itself, I can't answer questions regrading unpacking/repacking backups or tar files.
(See [Usage](#usage) for a mini usage guide.)

[![Build Status](https://travis-ci.org/nelenkov/android-backup-extractor.svg?branch=master)](https://travis-ci.org/nelenkov/android-backup-extractor)

# Notes

More details about the backup format and the tool implementation in the [associated blog post](https://nelenkov.blogspot.de/2012/06/unpacking-android-backups.html).

0 comments on commit f2cfd81

Please sign in to comment.