Android Backup Extractor
https://sourceforge.net/projects/adbextractor/
LAW WARNING
If you are working with password encrypted adb backups, you need to download these two files:
- local_policy.jar
- US_export_policy.jar
from http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
or http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
and put them in the lib/security folder of all your Java SE 7 or 8 installations, for example:
--Windows:
C:\Program Files\Java\jdk1.7.0_60\jre\lib\security\
c:\Program Files\Java\jdk1.8.0_66\jre\lib\security\
C:\Program Files\Java\jre7\lib\security\
c:\Program Files\Java\jre1.8.0_66\lib\security\
C:\Program Files (x86)\Java\jdk1.7.0_60\jre\lib\security\
C:\Program Files (x86)\Java\jre7\lib\security\
c:\Program Files (x86)\Java\jre1.8.0_66\lib\security\
--Linux:
/usr/local/jdk1.7/jre/lib/security/
/usr/lib/jvm/java-7-oracle/jre/lib/security/
/usr/lib/jvm/java-8-oracle/jre/lib/security/
--BSD:
/usr/lib/jvm/java-7-openjdk-*/jre/lib/security/
--OS X:
/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/security/
/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/lib/security/
Won't work if you supply them with the application, you must have them installed onto your system.
Application name: Android Backup Extractor
Original author: Nikolay Elenkov
Original source code: https://github.com/nelenkov/android-backup-extractor
Website original documentation: http://nelenkov.blogspot.com/2012/06/unpacking-android-backups.html
Packager and improvements: dragomerlin
Format: runnable jar file with additional software
IDE: Eclipse Mars.1 Release (4.5.1) Build id: 20150924-1200
Compiler: Oracle Java SDK 1.8.0_66
Compiler compliance level: Java 1.7. "Major.Minor Version"=51.0
Bouncy Castle version: bcprov-jdk15on-153
Links:
Full local backup infrastructure: https://android.googlesource.com/platform/frameworks/base/+/4a627c71ff53a4fca1f961f4b1dcc0461df18a06
Tar Binary Splitter: https://sourceforge.net/projects/tar-binary-splitter/
Android Backup Splitter: https://sourceforge.net/projects/adb-split/
Perl scripts to encrypt/decrypt adb backup files: http://forum.xda-developers.com/showthread.php?t=1730309
The Legion of the Bouncy Castle: https://www.bouncycastle.org/java.html
Usage:
info: java -jar abe.jar [-debug] [-useenv=yourenv] info <backup.ab> [password]
unpack: java -jar abe.jar [-debug] [-useenv=yourenv] unpack <backup.ab> <backup.tar> [password]
pack: java -jar abe.jar [-debug] [-useenv=yourenv] pack <backup.tar> <backup.ab> [password]
pack-kk: java -jar abe.jar [-debug] [-useenv=yourenv] pack-kk <backup.tar> <backup.ab> [password]
*pack-kk is to create version 2 backups for android kitkat 4.4.3+.
*info gives information about an adb backup without extracting anything.
*yourenv is the environment variable provided to read the password from
*debug shows cryptographic information and password when useenv is used
*If the filename is `-`, then data is read from standard input or written to standard output
If you don't specify a password when packing the backup archive won't be encrypted but only compressed.
Option to create unencrypted and uncompressed backups is possible, but not available on ABE.
Setting environment variables:
--Linux:
To make it persistent between reboots and sessions, add it to your ~/.profile and restart your session:
echo "export FOO=bar" >> ~/.profile
To make is available for all users add it as root to /etc/profile (most linux distros)
sudo echo "export FOO=bar" >> /etc/profile
-- OS X:
To make it persistent for terminal add it to ~/.bash_profile
echo "export FOO=bar" >> ~/.bash_profile
Globally: very tricky, depends on OSX version
-- Windows: very easy
Requirements for compilation:
- Java Development Kit version 7 or 8 (1.7 or 1.8)
- Bouncy Castle java release "JCE with provider and lightweight API" bcprov-jdk15on*
http://www.bouncycastle.org/latest_releases.html
- Oracle Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files (7 or 8) (required when handling encrypted backups)
* http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
* http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
- Set the Compiler compliance level to 1.7 to allow more compatible versions (optional but recommended)
- IDE Eclipse (optional but recommended)
Description and scope:
- Android Backup Extractor is an application written in Java that can extract and create android adb backups from or to TAR format.
It doesn't edit directly.
- You can choose to view an adb backup properties, extract it to tar or create a new one from tar.
- When creating a backup, password if optional. When extracting, if backup is encrypted, entering a password is mandatory.
If it's not provided directly on the command line it will be asked interactively. Will exit if a null or empty string is provided.
- A password can be provided from any environment variable with -useenv=envvar. However, if the password is specified directly on the command line this will be used instead.
- The debug messages can be activated with the -debug flag
- When working with encryption JCE USJPF is required, so will notify and exit if not present.
- Android Backup Splitter are two bash scripts that allow you to create individual adb backups for each app or shared from the full one,
so you can restore apps or shared individually. Same encryption is preserved to them, if any. It also informs when any apk is missing for each app.
* adb-split-extraction.sh extracts the contents of the tar archive(s) to the hard drive and re-tars, but this may lead to problems with not allowed filename characters.
It only generates adbs for apps.
* adb-split-no-extraction.sh splits the adb tar in binary mode instead. It requires the program Tar Binary Splitter.
This is the recommended method. The script generates adb(s) for both apps and shared.
- The adb backups (usually with .ab extension) can be password protected or not. If the device is encrypted this is mandatory and the password must be the same
as the used to unlock the device.
- The adb backups are extracted to tar format, and are created from the tar format as well.
- The files and folders inside the tar archive must be in some specific order, not necessarily alphabetical like tar does by default.
Such order is listed in "Full local backup infrastructure". The easiest way to test is to repackage a tar archive from an already existing one;
for example a part of an archive, and repackage it following the same order as files are listed in the original. If we don't have the original archive,
we have to guess out the order. Some redundancy checksums may be present on the manifest so restoring a modified backup may not work.
Considerations:
- Read the READMEs of Android Backup Splitter and Tar Binary Splitter for further knowledge.
- The tar archives may be extracted and created on filesystems that respect tar's content's permissions, although seems to work anyway when restoring to the android device.
- Directories inside tar archives must not contain trailing slashes. Since GNU tar doesn't have this option, the use of star or pax is mandatory. For Ubuntu and Cygwin star is included.
- star is recommended instead of pax. Pax only supports path length only up to 100 characters, so will fail in some cases. This usually happens with browsers history.
- Java 7 or higher is required because of SYNC_FLUSH mode for the Deflater.
- If the backup contains apk+data for an app, restore will work. If contains only the data, you must install the app first on the device and then restore. Installing the app later won't work.
- If you want a full backup use a nandroid backup with Clockworkmod or TWRP instead of ADB. Nandroid backup has th
- 1
- 2
- 3
前往页