木子屋 Dnawo's BLOG

apktool命令参数详解

👤 dnawo 📅 2010-09-01 👁 29547 👍 0 💬 0 🔄 本站原创
apktool是一个命令行工具,可以用来打包/解包apk文件。apk是Android安装包,它类似Symbian sis或sisx的文件格式。具体命令行参数见下边说明:

F:\apk\>apktool
Apktool v1.3.1 - a tool for reengineering Android apk files
Copyright 2010 Ryszard Wi?niewski <brut.alll@gmail.com>
Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

Usage: apktool [-v|--verbose] COMMAND [...]

COMMANDs are:

d[ecode] [OPTS] <file.apk> [<dir>]
Decode <file.apk> to <dir>.

OPTS:

-s, --no-src
Do not decode sources.
-r, --no-res
Do not decode resources.
-d, --debug
Decode in debug mode. Check project page for more info.
-f, --force
Force delete destination directory.
-t <tag>, --frame-tag <tag>
Try to use framework files tagged by <tag>.

b[uild] [OPTS] [<app_path>] [<out_file>]
Build an apk from already decoded application located in <app_path>.

It will automatically detect, whether files was changed and perform
needed steps only.

If you omit <app_path> then current directory will be used.
If you omit <out_file> then <app_path>/dist/<name_of_original.apk>
will be used.

OPTS:

-f, --force-all
Skip changes detection and build all files.
-d, --debug
Build in debug mode. Check project page for more info.

if|install-framework <framework.apk> [<tag>]
Install framework file to your system.

For additional info, see: http://code.google.com/p/android-apktool/

说明1:apktool运行环境

要成功运行apktool,首先需要在机子上安装Java运行环境,JDK/JRE都行,若未安装,运行将报错:

F:\apk>apktool
'java' 不是内部或外部命令,也不是可运行的程序或批处理文件。

其次,apktool若要在windows下运行,还必需依赖相关的脚本才行,这些在google代码中都可以下载得到。apktool-1.3.1.tar.bz2解压出apktool.jar,apktool-install-windows-2.2_r01-2.tar.bz2是windows下的运行脚本,将两个解压放在一块,就可以运行apktool了。

说明2:两种执行方式

java -jar %~dp0\apktool.jar %1 %2 %3 %4 %5 %6 %7 %8 %9

apktool command [args...]

两个执行结果是一样的!

评论(0)

暂无评论。

计算题
评论需审核通过后显示
← 上一篇 ftp错误代码列表 下一篇 → JDK、JRE、JVM的概念及其区别