zoukankan      html  css  js  c++  java
  • (转)apktool+dex2jar+jd_gui

    转:http://www.cnblogs.com/MichaelGuan/archive/2011/10/25/2224578.html

    apktool: 可以解析资源文件,比如布局文件xml等,方便查看。

    使用方法:

    复制代码
    Apktool v1.4.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>.
            --keep-broken-res
                Use if there was an error and some resources were dropped, e.g.:
                "Invalid config flags detected. Dropping resources", but you
                want to decode them anyway, even with errors. You will have to
                fix them manually before building.
        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.
    复制代码

    dex2jar:可以将dex文件转换成jar文件

    用法:

    1.将apk文件后缀改成rar,然后解压,取出其中的class.dex,放到任意位置;

    2.进入cmd,cd到dex2jar所在文件夹,输入命令dex2jar.bat %class.dex所在目录%class.dex

    3. 命令完成后在%class.dex所在目录%就会生成jar文件

    jd_gui:能够将jar文件反编译成java代码

    用法:

    打开jd_gui,然后将jar包拖放到主界面,就可以看到源代码了。

  • 相关阅读:
    grid布局
    flex弹性布局
    数据库连接使用ThreadLocal
    maven核心,pom.xml详解
    src和herf的区别
    表单校验出错,导致表单无法提交
    联机调试,如何配置局域网内文件服务器
    不同语言时间戳长度问题,及Java获取时间戳的效率
    OO设计原则 -- OO设计的原则及设计过程的全面总结
    Maven项目被clean命令之后的红叉或找不到class文件
  • 原文地址:https://www.cnblogs.com/pen-ink/p/3386112.html
Copyright © 2011-2022 走看看