星哥的博客

  • 首页
  • 系统
  • 虚拟机
  • 网站开发
  • 硬件外设
  • VPS/云主机
  • 心情随笔
  1. 首页
  2. Android系统
  3. 正文

android-apktool 中文使用说明

2013年2月1日 4148点热度 20人点赞 0条评论

Android反编译工具:Apktool,支持Linux 、Windows。

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

1、安装

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

2).到code.google上下载apktool.jar以及相关文件:https://code.google.com/p/android-apktool/downloads/list

点击下载apktool-1.0.0.tar.bz2 和apktool-install-windows-2.1_r01-1.zip

3).解压apktool-install-windows.zip到任意文件夹,然后解压apktool.jar 到apktool-install-windows.zip所在的文件夹下。

QQ截图20130201100759

4).点击开始菜单,运行,输入CMD回车,用cd命令转到刚刚解压apktool-install-windows所在的文件夹,输入apktool,出现一些命令说明即成功安装。

C:\android\android-apktool\apktool-install-windows-r04-brut1>apktool.bat
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 [...]   -- 熟悉dos命令的很容易可以看懂
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> -- 这个需要注意,生成新的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、使用

apktool d XXX.apk ABC 反编译XXX.apk到文件夹ABC

apktool b ABC 从文件夹ABC重建APK,输出到ABC/dist/out.apk

例子:
C:\android\android-apktool\apktool-install-windows-r04-brut1>apktool d C:\android\参考\simple.apk SIMPLE
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Documents and Settings\Administrator\apk
tool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...

C:\android\android-apktool\apktool-install-windows-r04-brut1>apktool b SIMPLE
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...

OK,这样包就重新打好了,可能你并没有直接看到什么东西产生,不过这个时候你看一下 SIMPLE\dist 文件夹的SIMPLE\dist里,已经产生了一个我们修改后的APK,就是它了,但是这个文件目前还不能安装,需要一个签名!下一步就是关于软件签名的,早在09年就已经有老外研究过了,我们现在用的只是人家当年的技术了。
签名程序名为 Autosign ,你可以自己去google搜索.

这个的安装很简单吧,原作者都写了,其实你要做的就是解压,然后使用就OK,当然如果你跟我一样使用Ubuntu/FreeBSD等系统,就执行下面的命令

java -jar signapk.jar  (网上有教程)
Windows用户只要双击exe执行即可,操作已经很简单,不必多说了。Ubuntu/FreeBSD用户可以自己写一个小脚本,很简单也不用多说了。
好了,经过了以上的操作,你的作品就可以公布了。

标签: 暂无
最后更新:2013年2月1日

wangxingcs

这个人很懒,什么都没留下

点赞
< 上一篇

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据。

wangxingcs

这个人很懒,什么都没留下

我的博客

仅记录一些有用的教程,自己的经历,已屏蔽各大搜索引擎收录。

新浪微博 @wangxingcs

Twitter @wangxingcs(常在)

最新 热点 随机
最新 热点 随机
Proxmox VE(PVE)6.X 添加硬盘 PVE解决VM is locked问题 Proxmox VE配置更新源 黑群晖显示真实CPU信息(支持7.0.1) Proxmox VE直通硬盘(全盘映射方式) PVE去除“没有有效订阅”提示
nginx伪静态规则汇总 android-apktool 中文使用说明 在首页显示论坛所有帖子 CentOS6安装nodejs CSS @media 适配代码 微赞自定义二维码功能增强
标签聚合
CMS MTP PVE 虚拟机 驱动 群晖 DSM FineCMS

COPYRIGHT © 2015-2023 wangxingcs.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

陕ICP备13007295号