• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

nelenkov/android-backup-extractor: Android backup extractor

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

nelenkov/android-backup-extractor

开源软件地址:

https://github.com/nelenkov/android-backup-extractor

开源编程语言:

Java 90.7%

开源软件介绍:

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 11. Handling encrypted backups requires the JCE unlimited strength jurisdiction policy (not needed if using current Java 9 release).

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

Use one of the tools listed below to build or see Releases for pre-built binaries (runnable jar files).

With Eclipse:

Download the latest version of Bouncy Castle Provider jar (bcprov-jdk15on-*.jar) from here:

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.

With Maven (requires at least JDK11):

To create a self-executable all-in-one jar: mvn clean package and then:

java -jar target/abe.jar pack|unpack|pack-kk ...

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 bcprov.jar property accordingly)

java -jar abe.jar pack|unpack|pack-kk ...

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

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 ...

Usage

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.

Packing tar archives

  • Android is very particular about the order of files in the tar archive. The format is described here.
  • Incompatible tar archives lead to errors or even system crashes.
  • Apps with the allowBackup flag set to false are not backed up nor restored.
    • (you can try restoring manually via adb push and adb shell)
  • Errors are only printed to logcat, look out for BackupManagerService.

The safest way to pack a tar archive is to get the list of files from the original backup.tar file:

tar tf backup.tar | grep -F "com.package.name" > package.list

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 are built with Travis CI from the master branch and include a runnable fat jar.

Use the binaries at your own risk. No warranty or support provided.

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

Build Status

Notes

More details about the backup format and the tool implementation in the associated blog post.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap