Apk反编译工具ApkTool

相关资源百度网盘

apktool

usage: apktool
 -advance,--advanced   prints advance information.
 -version,--version    prints the version then exits
usage: apktool if|install-framework [options] 
 -p,--frame-path    Stores framework files into .
 -t,--tag           Tag frameworks using .
usage: apktool d[ecode] [options] 
 -f,--force              Force delete destination directory.
 -o,--output        The name of folder that gets written. Default is apk.out
> -p,--frame-path    Uses framework files located in .
 -r,--no-res             Do not decode resources.
 -s,--no-src             Do not decode sources.
 -t,--frame-tag     Uses framework files tagged by .
#####usage: apktool b[uild] [options] 
 -f,--force-all          Skip changes detection and build all files.
 -o,--output        The name of apk that gets written. Default is dist/name.apk
 -p,--frame-path    Uses framework files located in .
For additional info, see: http://ibotpeaches.github.io/Apktool/
For smali/baksmali info, see: https://github.com/JesusFreke/smali

java -jar apktool.jar d [file.apk] -o [folder]
java -jar apktool.jar b [folder] -o [file.apk]

ShakaApktool

usage: ShakaApktool s[mali] [options] [--] [|folder]*
assembles a set of smali files into a dex file
 -?,--help                      显示帮助文本后退出.为调试选项指定的两倍
 -a,--api-level      将按照API级别生成文件信息, 例如.14是ICS. 如果不指定, 默认为 15 (ICS).
 -f,--list-fields         Lists all the field references to FILE
                                (.fields by default)
 -j,--jobs         可用线程数量.默认为内核允许的数量,最大可调至6
 -m,--list-methods        Lists all the method references to FILE
                                (.methods by default)
 -o,--output              dex文件名将被记录,默认命名为 out.dex
 -t,--list-types          Lists all the type references to FILE
                                (.types by default)
 -v,--version                   查看版本信息
 -x,--allow-odex-instructions   允许 odex 指令编译进 dex 文件.仅支持少数命令 -
                                那些可以存放至固定代码路径并且不会导致 dalvik 拒绝的类
 -X,--experimental              启用实验操作码进行编译,即使还不一定被Android运行支持

调试选项:
 -T,--print-tokens     显示每个完成的名字及文本
 -V,--verbose-errors   生成详细错误信息

******************** baksmali ********************

usage: ShakaApktool bs|baksmali [options] 
disassembles and/or dumps a dex file
 -?,--help                                  显示帮助文本后退出.为调试选项指定的两倍
 -a,--api-level                  The numeric api-level of the file
                                            being disassembled. 如果不指定, 默认为 15
                                            (ICS).
 -b,--no-debug-info                         不输出debug信息 (.local, .param, .line,
                                            etc.)
 -c,--bootclasspath          A colon-separated list of
                                            bootclasspath jar/oat files to use
                                            for analysis. Add an initial colon
                                            to specify that the jars/oats should
                                            be appended to the default
                                            bootclasspath instead of replacing
                                            it
 -d,--bootclasspath-dir                目录文件夹搜索 bootclasspath 文件.默认至当面目录
 -e,--dex-file                    搜索文件名为 DEX_FILE 的dex文件,默认至
                                            classes.dex
 -f,--code-offsets                          反编译时添加注释包含代码的每个偏移
 -i,--resource-id-files              the resource ID files to use, for
                                            analysis. A colon-separated list of
                                            prefix=file pairs.  For example
                                            R=res/values/public.xml:android.R=$A
                                            NDROID_HOME/platforms/android-19/dat
                                            a/res/values/public.xml
 -j,--jobs                     可用线程数量.默认为内核允许的数量,最大可调至6
 -k,--check-package-private-access          When deodexing, use the
                                            package-private access check when
                                            calculating vtable indexes. It
                                            should only be needed for 4.2.0
                                            odexes. The functionality was
                                            reverted for 4.2.1.
 -l,--use-locals                            output the .locals directive with
                                            the number of non-parameter
                                            registers, rather than the .register
                                            directive with the total number of
                                            register
 -li,--load-inline-method             load inline method resolver from
                                            file
 -m,--no-accessor-comments                  don't output helper comments for
                                            synthetic accessors
 -n,--normalize-virtual-methods             Normalize virtual method references
                                            to the reference the base method.
 -o,--output                           the directory where the disassembled
                                            files will be placed. The default is
                                            out
 -p,--no-parameter-registers                use the v syntax instead of the
                                            p syntax for registers mapped to
                                            method parameters
 -r,--register-info    print the specificed type(s) of
                                            register information for each
                                            instruction. "ARGS,DEST" is the
                                            default if no types are specified.
                                            Valid values are:
                                            ALL: all pre- and post-instruction
                                            registers.
                                            ALLPRE: all pre-instruction
                                            registers
                                            ALLPOST: all post-instruction
                                            registers
                                            ARGS: any pre-instruction registers
                                            used as arguments to the instruction
                                            DEST: the post-instruction
                                            destination register, if any
                                            MERGE: Any pre-instruction register
                                            has been merged from more than 1
                                            different post-instruction register
                                            from its predecessors
                                            FULLMERGE: For each register that
                                            would be printed by MERGE, also show
                                            the incoming register types that
                                            were merged
 -s,--sequential-labels                     create label names using a
                                            sequential numbering scheme per
                                            label type, rather than using the
                                            bytecode address
 -t,--implicit-references                   Use implicit (type-less) method and
                                            field references
 -v,--version                               查看版本信息
 -x,--deodex                                deodex the given odex file. This
                                            option is ignored if the input file
                                            is not an odex file
 -X,--experimental                          enable experimental opcodes to be
                                            disassembled, even if they aren't
                                            necessarily supported in the Android
                                            runtime yet

调试选项:
 -D,--dump-to         dumps the given dex file into a single annotated
                            dump file named FILE (.dump by default),
                            along with the normal disassembly
 -I,--ignore-errors         ignores any non-fatal errors that occur while
                            disassembling/deodexing, ignoring the class if
                            needed, and continuing with the next class. The
                            default behavior is to stop disassembling and exit
                            once an error is encountered
 -N,--no-disassembly        suppresses the output of the disassembly
 -T,--inline-table    specify a file containing a custom inline method
                            table to use for deodexing

java -jar ShakaApktool.jar d [file.apk] -o [folder]
java -jar ShakaApktool.jar b [folder] -o [file.apk]

问题记录

apk回编的时候出现:error=206, 文件名或扩展名太长

出现这个问题是因为反编译后在目标目录下的apktool.yml文件记录的doNotCompress内容太多。使用ShakaApktool3.0.0.jar版本代替Apktool.jar可以解决。

你可能感兴趣的:(Apk反编译工具ApkTool)