APKTool 提取APK文件的资源
APK文件本身是一个压缩包,直接用解压工具即可打开,但里面的文件都已被编码为二进制文件格式,不能直接看,比如程序描述文件AndroidManifest.xml。
使用apktool工具可以将这些文件解码还原出来。apktool(http://code.google.com/p/android-apktool/ 现在地址是: http://ibotpeaches.github.io/Apktool/ )是一个非常著名的开源工具包,功能很强大,可以解包APK文件并重新打包,常用来汉化Android应用。
安装方法,参看 http://ibotpeaches.github.io/Apktool/install/ :
Quick Check
- Apktool 2.x (Versions after
1.5.2)- Is Java 1.7 installed?
- Does executing java -version on command line / command prompt return 1.7?
- If not, please install Java 7 and make it the default.
Installation for Apktool 2.x
- Windows:
- Download Windows wrapper script (Right click, Save Link As
apktool.bat) - Download apktool-2 (find newest here)
- Rename downloaded jar to
apktool.jar - Move both files (
apktool.jar&apktool.bat) to your Windows directory (UsuallyC://Windows) - If you do not have access to
C://Windows, you may place the two files anywhere then add that directory to your Environment Variables System PATH variable. - Try running apktool via command prompt
- Download Windows wrapper script (Right click, Save Link As
- Linux:
- Download Linux wrapper script (Right click, Save Link As
apktool) - Download apktool-2 (find newest here)
- Make sure you have the 32bit libraries (
ia32-libs) downloaded and installed by your linux package manager, if you are on a 64bit unix system. - (This helps provide support for the 32bit native binary aapt, which is required by apktool)
- Rename downloaded jar to
apktool.jar - Move both files (
apktool.jar&apktool) to/usr/local/bin(root needed) - Make sure both files are executable (
chmod +x) - Try running apktool via cli
- Download Linux wrapper script (Right click, Save Link As
- Mac OS X:
- Download Mac wrapper script (Right click, Save Link As
apktool) - Download apktool-2 (find newest here)
- Rename downloaded jar to
apktool.jar - Move both files (
apktool.jar&apktool) to/usr/local/bin(root needed) - Make sure both files are executable (
chmod +x) - Try running apktool via cli
- Download Mac wrapper script (Right click, Save Link As
Note - Wrapper scripts are not needed, but helpful so you don’t have to type java -jar apktool.jar over and over.
我这里没法把他们放在 bin 目录下, 而是放在了 /software/android/tools 目录下。
这样,我解压缩下载目录下的一个apk文件,就是下面命令:
/software/android/tools/apktool d ~/Downloads/com.supercell.clashofclans_v8.116.2-722_Android-4.0.3.apk
解压缩后的目录是: /software/android/tools/ 下面目录。
参数说明:
apktool d [demo.apk] // 参数是 d 而不是 -d。
./apktool
Apktool v2.0.3 - a tool for reengineering Android apk files
with smali v2.1.0 and baksmali v2.1.0
Copyright 2014 Ryszard Wiśniewski <brut.alll@gmail.com>
Updated by Connor Tumbleson connor.tumbleson@gmail.com
usage: apktool
-advance,--advanced prints advance information.
-version,--version prints the version then exits
usage: apktool if|install-framework [options] <framework.apk>
-p,--frame-path <dir> Stores framework files into <dir>.
-t,--tag <tag> Tag frameworks using <tag>.
usage: apktool d[ecode] [options] <file_apk>
-f,--force Force delete destination directory.
-o,--output <dir> The name of folder that gets written. Default is apk.out
-p,--frame-path <dir> Uses framework files located in <dir>.
-r,--no-res Do not decode resources.
-s,--no-src Do not decode sources.
-t,--frame-tag <tag> Uses framework files tagged by <tag>.
usage: apktool b[uild] [options] <app_path>
-f,--force-all Skip changes detection and build all files.
-o,--output <dir> The name of apk that gets written. Default is dist/name.apk
-p,--frame-path <dir> Uses framework files located in <dir>.
For additional info, see: http://ibotpeaches.github.io/Apktool/
For smali/baksmali info, see: https://github.com/JesusFreke/smali
APKTool 提取APK文件的资源的更多相关文章
- apk去广告工具(利用apktool去除apk文件里的广告)
基本知识 apk安装包的文件结构 以知名桌面软件“LauncherPro”为例,apk安装包文件目录: 文件目录如下: - META-INF - res - anim - color - drawab ...
- 关于ipa和apk文件的解压
移动互联网中,主要的两个平台是Android和ios,android上文件的安装包是后缀名为apk的文件,ios上文件的安装包是后缀名为ipa的文件,在本文分析一下这两种文件的特点,以及如何用程序去解 ...
- apktool反编译apk文件
1.首先下载apktool文件,可以从我的网盘下载:http://pan.baidu.com/s/1nvPdbVb 2.将你的apk文件和apktool文件放到一个文件夹下,这里就放到D:\study ...
- apktool 在mac下的使用 -反编译安卓apk文件
1.下载apktool 点击这里下载 ,里面有两个文件,一个是.jar,一个是自己写的脚本.sh 注:最新的apktool.jar 文件可以点击这里下载 .sh脚本是自写脚本可不用更新最新,下载的ja ...
- 『原』在Linux下反编译Android .apk文件 使用apktool dex2jar JD-eclipse
一.使用apktool 将 apk反编译生成程序的源代码和图片.XML配置.语言资源等文件 具体步骤: (1)下载反编译工具包:apktool 官方的打不开 http://apktool.shouji ...
- mac下破解apk文件以及apktool的相关使用
Android apktool是一个用来处理APK文件的工具,可以对APK进行反编译生成程序的源代码和图片.XML配置.语言资源等文件,也可以添加新的功能到APK文件中.用该工具来汉化Android软 ...
- C# .exe和.dll文件图标资源提取工具
Windows 可执行文件(.exe)和动态库文件(.dll)图标资源提取工具 GitHub 功能 图标资源预览 图标资源导出(仅支持导出 PNG 格式) 代码 获取图标资源使用了 Win32 API ...
- Xamarin android如何反编译apk文件
Xamarin android 如何反编译 apk文件 这里推荐一款XamarinAndroid开发的小游戏,撸棍英雄,游戏很简单,的确的是有点大.等一下我们来翻翻译这个Xamarin Android ...
- [翔哥高手无敌之路]0-002.如何提取apk中的信息?
面对一款apk软件,我们如何去获取它的信息,如何获取它的版本号,包名,或者ID,用户权限,这些信息都隐藏在apk包中的AndroidManifest.xml文件中,解开它我们就能获取任何想要的信息.但 ...
随机推荐
- gitignore 忽略文件夹
上面问题,按理说只要在.gitignore文件中加上 /dockAni/Library/ 即可实现. 但是我这样做了以后却发现sourceTree中仍然会列出Library中的文件. 最后在这个帖子中 ...
- 【转】图解CSS的padding,margin,border属性(详细介绍及举例说明)
W3C组织建议把所有网页上的对像都放在一个盒(box)中,设计师可以通过创建定义来控制这个盒的属性,这些对像包括段落.列表.标题.图片以及层.盒模型主要定义四个区域:内容(content).边框距(p ...
- Java C# 加密解密类库
Bouncy Castle 是一种用于 Java 平台的开放源码的轻量级密码术包.它支持大量的密码术算法,并提供 JCE 1.2.1 的实现.因为 Bouncy Castle 被设计成轻量级的,所以从 ...
- Apache ab并发负载压力测试
由于现在网站都需要能够承受高并发要求的能力,所以当我们写完代码后,如果需要上线,最好都经过压力测试后,这样比较好 运行: 在Windows系统下,打开cmd命令行窗口,定位到apache安装目录的bi ...
- [mysql] mysqldump 导出数据库表
1.mysqldump的几种常用方法: (1)导出整个数据库(包括数据库中的数据) mysqldump -u username -p dbname > dbname.sql (2)导出数据库结构 ...
- OData services入门----使用ASP.NET Web API描述
http://www.cnblogs.com/muyoushui/archive/2013/01/27/2878844.html ODate 是一种应用层协议,设计它的目的在于提供一组通过HTTP的交 ...
- Microsoft SQL Server Management Studio 导出触发器脚本
- 【Spring学习笔记-0】Spring开发所需要的核心jar包
spring开发所需要的核心jar 1. libs目录下的核心jar包: 2. common-logging-xxx.jar 来自为知笔记(Wiz) 附件列表
- datagridview 不显示行号的问题
环境:C#,Winform 场景: 窗体上有两个tab页A.B,每个tab页上都有一个DatagridView.窗体加载后,显示tab A选项卡.序号正常显示,但点击B选项卡后,DatagridVie ...
- (四)java程序基本组成
一个基本的java程序一般包括几个部分,分别是程序所在的包名.程序中用到的其他包的路径.程序的类.类中的方法.变量和字面量. package demo; import java.util.Date; ...