简介:
Android apktool是一个用来处理APK文件的工具,可以对APK进行反编译生成程序的源代码和图片、XML配置、语言资源等文件,也可以添加新的功能到APK文件中。用该工具来汉化Android软件然后重新打包发布是相当简单的。


1、安装
1).首先安装需要JAVA环境,先下载JDK/JRE,点击下载,已经有JAVA环境的可跳过此步

2).到code.google上下载apktool.jar以及相关文件:http://code.google.com/p/android-apktool/downloads/list
点击下载apktool1.4.3.tar.bz2 和 apktool-install-windows-r04-brut1.tar.bz2

3).解压apktool-install-windows-r04-brut1.tar.bz2到任意文件夹,然后解压apktool1.4.3.tar.bz2,把apktool.jar拷贝至apktool-install-windows-r04-brut1.tar.bz2解压所在的文件夹下,此时文件下有aapt.exe、apktool.bat及apktool.jar三个应用。

4).点击开始菜单,运行,输入CMD回车,用cd命令转到刚刚解压的D:\My Documents\Desktop\apktool-install-windows-r04-brut1所在的文件夹,输入apktool,出现如下命令即说明安装成功(以下信息,即apktool使用命令)。

D:\My Documents\Desktop\apktool-install-windows-r04-brut1>apktool
Apktool v1.4.3 - a tool for reengineering Android apk filesCopyright 2010 Ryszard Wi?niewski <[email protected]>Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)Usage: apktool [-q|--quiet OR -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.For additional info, see: http://code.google.com/p/android-apktool/



2、使用
1).解压APK
D:\My Documents\Desktop\apktool-install-windows-r04-brut1>apktool d F:\document\APK\PushAd.apk F:\document\app
源文件:F:\document\APK\PushAd.apk
解压目录:F:\document\app
I: Baksmaling...I: Loading resource table...I: Loaded.I: Loading resource table from file: D:\My Documents\apktool\framework\1.apkI: Loaded.I: Decoding file-resources...I: Decoding values*/* XMLs...I: Done.I: Copying assets and libs...


2).打包APK
D:\My Documents\Desktop\apktool-install-windows-r04-brut1>apktool b F:\document\app F:\\document\\app.apk
源文件:F:\\document\\app
打包目录:F:\document\app.apk
I: Checking whether sources has changed...I: Smaling...I: Checking whether resources has changed...I: Building resources...I: Building apk file...

更多相关文章

  1. 《Android(安卓)Framework 之路》 N版本 Framework Camera的一些
  2. Android(安卓)开发 之 异常android.os.FileUriExposedException:
  3. 浅析Android之Adapter用法总结
  4. 控制android弹出框不消失
  5. Unity 读写文件之PC端&Android端
  6. Android中级教程之(二)----->Android(安卓)SDK中tools详解
  7. Android(安卓)ndk开发swig编译jni接口配置文件(二)
  8. 学习到的有关android的知识点 单元测试等(1)
  9. Android(安卓)实现一个简单的文件上传工具

随机推荐

  1. Android 接口定义语言AIdl
  2. Android Webview upload 图片上传
  3. [AndroidUI]使用DrawerLayout实现侧滑菜
  4. Android(安卓)在SQLite中存取二进制图片
  5. Android动画原理分析
  6. Android开发之 shape的使用
  7. Android(安卓)实现以太网口共享3G网卡连
  8. android全局异常检测并处理
  9. Android 面试(八):说说 Activity、View、Win
  10. 当修改一些代码时,使用什么编译命令可以