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文件中,解开它我们就能获取任何想要的信息.但 ...
随机推荐
- Ubuntu上安装mono并进行C#代码测试
微软的.NET框架与Linux开发和管理,是Buider AU和一个更广泛行业的两个最流行的主题. 大多数时候,这两个主题往往会产生冲突,很少有开发者需要同时了解这两个工具.但是,许多人都没意识到, ...
- python input() 与 raw_input()
使用input和raw_input都可以读取控制台的输入,但是input和raw_input在处理数字时是有区别的 当输入为纯数字时: input返回的是数值类型,如int,floatraw_inpo ...
- 高效能团队协作的JIRA实践
http://www.csdn.net/article/2015-05-21/2824739?utm_source=tuicool 高效能团队是企业生存和发展的基石.任何企业面对当下的激烈竞争,要想脱 ...
- apache使用ssl数字证书
apache配置: <VirtualHost *:443> ServerName web.p2 .com ProxyPreserveHost On ProxyRequests Off SS ...
- TDDL:来自淘宝的分布式数据层
淘宝根据自身业务需求研发了TDDL(Taobao Distributed Data Layer)框架,主要用于解决分库分表场景下的访问路由(持久层与数据访问层的配合)以及异构数据库之间的数据同步,它是 ...
- Redis 利用锁机制来防止缓存过期产生的惊群现象-转载自 http://my.oschina.net/u/1156660/blog/360552
首先,所谓的缓存过期引起的“惊群”现象是指,在大并发情况下,我们通常会用缓存来给数据库分压,但是会有这么一种情况发生,那就是在一定时间 内生成大量的缓存,然后当缓存到期之后又有大量的缓存失效,导致后端 ...
- Debian环境下vi设置
下面给出一个vi编辑器的配置文件,可以放到用户目录的.vimrc文件中: "========================================================= ...
- MySQL计算时间差
MySQL计算两个日期的时间差函数:TIMESTAMPDIFF 语法: TIMESTAMPDIFF(interval, datetime_expr1, datetime_expr2) interval ...
- bzoj4637: 期望
Description 在米国有一所大学,名叫万国歌剧与信息大学(UniversalOperaandInformaticasUniversity).简称UOI大学.UO I大学的建筑与道路分布很有趣, ...
- RMQ问题ST算法 (还需要进一步完善)
/* RMQ(Range Minimum/Maximum Query)问题: RMQ问题是求给定区间中的最值问题.当然,最简单的算法是O(n)的,但是对于查询次数很多(设置多大100万次),O(n)的 ...