下载两个文件
解压这两个文件

bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/下载$ ls
apktool1.5.2.tar.bz2 apktool-install-linux-r05-ibot.tar.bz2 book.pdf spark_2.4_h5.apk

# 解压bz2文件的方法1,先使用bunzip2转成tar文件,再使用tar xvf 进行解压
bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/下载$ bunzip2 apktool1.5.2.tar.bz2

bunzip2: apktool1.5.2.tar.bz2: trailing garbage after EOF ignored
bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/下载$ ls 
apktool1.5.2.tar apktool-install-linux-r05-ibot.tar.bz2 book.pdf spark_2.4_h5.apk
bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/下载$ tar xvf apktool1.5.2.tar 
apktool1.5.2/
apktool1.5.2/apktool.jar

# 解压bz2文件的方法2,直接解压:tar jxvf  文件.bz2
bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/下载$ tar jxvf apktool-install-linux-r05-ibot.tar.bz2 
apktool-install-linux-r05-ibot/aapt

bzip2: (stdin): trailing garbage after EOF ignored
apktool-install-linux-r05-ibot/
apktool-install-linux-r05-ibot/apktool
bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/下载$ ls -al
总用量 11740
drwxr-xr-x 4 bixiaopeng bixiaopeng 4096 10月 12 10:42 .
drwxr-xr-x 35 bixiaopeng bixiaopeng 4096 10月 12 10:38 ..
drwxrwxr-x 2 bixiaopeng bixiaopeng 4096 2月 3 2013 apktool1.5.2
-rw------- 1 bixiaopeng bixiaopeng 2658304 10月 12 10:37 apktool1.5.2.tar
drwxrwxr-x 2 bixiaopeng bixiaopeng 4096 12月 23 2012 apktool-install-linux-r05-ibot
-rw-rw-r-- 1 bixiaopeng bixiaopeng 419840 10月 12 10:37 apktool-install-linux-r05-ibot.tar.bz2
-rw-rw-r-- 1 bixiaopeng bixiaopeng 943231 10月 12 09:13 book.pdf
-rw-rw-r-- 1 bixiaopeng bixiaopeng 7963744 10月 11 15:21 spark_2.4_h5.apk

#将解压后得到的三个文件apktool.jar /aapt /apktool copy 到 /usr/local/bin/目录下

bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/下载/apktool-install-linux-r05-ibot$ cd /usr/local/bin/
bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:/usr/local/bin$ ls -al
总用量 3704
drwxr-xr-x 2 root root 4096 10月 12 10:51 .
drwxr-xr-x 10 root root 4096 4月 25 01:11 ..
-rwxr-x--- 1 root root 1119899 10月 12 10:51 aapt
-rwxr-xr-x 1 root root 2320 10月 12 10:51 apktool
-rw-r--r-- 1 root root 2655843 10月 12 10:50 apktool.jar

#下面就可以直接使用apktool了,先查看一下帮助文件

bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~$ apktool
Apktool v1.5.2 - a tool for reengineering Android apk files
Copyright 2010 Ryszard Wiśniewski <brut.alll@gmail.com>
with smali v1.4.1, and baksmali v1.4.1
Updated by @iBotPeaches <connor.tumbleson@gmail.com>
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.
-b, --no-debug-info
Baksmali -- don't write out debug info (.local, .param, .line, etc.)
-f, --force
Force delete destination directory.
-t <tag>, --frame-tag <tag>
Try to use framework files tagged by <tag>.
--frame-path <dir>
Use the specified directory for framework files
--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.
-a, --aapt
Loads aapt from specified location. if|install-framework <framework.apk> [<tag>] --frame-path [<location>]
Install framework file to your system. For additional info, see: http://code.google.com/p/android-apktool/
For smali/baksmali info, see: http://code.google.com/p/smali/

至于如何使用apktool,请参考我的另一篇博客http://blog.csdn.net/wirelessqa/article/details/8997168

【玩转Ubuntu】09. Ubuntu上安装apktool的更多相关文章

  1. Ubuntu 18.04上安装 phpMyAdmin

    我们将安装 phpMyAdmin 在 Ubuntu18.04 上配合 Apache 一起工作. 在安装 phpMyAdmin 之前需要已经安装了LAMP栈并提供了web页面. 如果没有安装可以参照 U ...

  2. Ubuntu 18.04上安装Apache, MySQL, PHP, LAMP

    1.安装 Apache $ sudo apt update && sudo apt install apache2 中间会遇到停顿询问是否继续, 输入 y 然后 回车. 2.测试 Ap ...

  3. 翻译:在Ubuntu 14.04上安装FTP服务器的方法

    说明: 1.原文地址:http://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/ 2.今天要做一个网络日志的迁移程序,搬 ...

  4. 如何在Ubuntu 18.04上安装Pip

    一.简介: Pip是一个软件包管理系统,它简化了用Python编写的软件包(如Python包索引(PyPI)中的软件包)的安装和管理. 在Ubuntu 18.04上缺省没有安装Pip,但安装非常简单. ...

  5. Ubuntu 12.04上安装R语言

    Ubuntu 12.04上安装R语言 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ R的安装 sudo gedit /etc/apt/sources. ...

  6. Ubuntu 12.04上安装HBase并运行

    Ubuntu 12.04上安装HBase并运行 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 一.HBase的安装 在官网上下载HBase-1.1.2 ...

  7. Ubuntu 12.04上安装MySQL并运行

    Ubuntu 12.04上安装MySQL并运行 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 安装MySQL数据库 sudo apt-get upda ...

  8. Ubuntu 12.04上安装Hadoop并运行

    Ubuntu 12.04上安装Hadoop并运行 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 在官网上下载好四个文件 在Ubuntu的/home/w ...

  9. Ubuntu 12.04上安装 MongoDB并运行

    Ubuntu 12.04上安装 MongoDB并运行 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 在Terminal输入 sudo apt-key ...

  10. 如何在Ubuntu 18.04上安装Django

    Django是一个免费的开源高级Python Web框架,旨在帮助开发人员构建安全,可扩展和可维护的Web应用程序. 根据您的需要,有不同的方法来安装Django.它可以使用pip在系统范围内安装或在 ...

随机推荐

  1. ACK

    ACK (Acknowledgement),即确认字符,在数据通信中,接收站发给发送站的一种传输类控制字符.表示发来的数据已确认接收无误. 目录 1基本介绍 2详细释义     1基本介绍编辑 英文缩 ...

  2. Codeforces Round #352 (Div. 2) C. Recycling Bottles 暴力+贪心

    题目链接: http://codeforces.com/contest/672/problem/C 题意: 公园里有两个人一个垃圾桶和n个瓶子,现在这两个人需要把所有的瓶子扔进垃圾桶,给出人,垃圾桶, ...

  3. C#格式化JSON字符串

    很多时候我们需要将json字符串以 {     "status": 1,     "sum": 9 }这种方式显示,而从服务端取回来的时候往往是这样 {&quo ...

  4. 【Tsinsen】【A1365】森林旅店

    KD-Tree 啊哈~检验了一下自己KD-Tree的学习情况,还算可以,模板至少是记下来了. 支持插入(所以要带重建),查询最近的P个点的距离. 然而题目并没有说是按怎样的顺序输出这P个点?...(事 ...

  5. 【BZOJ】【2005】【NOI2010】能量采集

    欧拉函数 玛雅,我应该先看看JZP的论文的……贾志鹏<线性筛法与积性函数>例题一 这题的做法……仔细想下可以得到:$ans=2*\sum_{a=1}^n\sum_{b=1}^m gcd(a ...

  6. OpenSSL 1.0.0生成p12、jks、crt等格式证书的命令个过程(转)

    OpenSSL 1.0.0生成p12.jks.crt等格式证书的命令个过程   此生成的证书可用于浏览器.java.tomcat.c++等.在此备忘!     1.创建根证私钥命令:openssl g ...

  7. org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Server returned error code = 404 for URI.. Check server logs for details

    严重: Servlet.service() for servlet jsp threw exceptionorg.codehaus.xfire.XFireRuntimeException: Could ...

  8. Build Simple HTTP server

    1. The server just support POST&PUT method 2. It is a Python server, and save upload files in sp ...

  9. nginx 杂记

    接触nginx一段时间,有些自己的心得,偶尔在网上会看到一些细小的知识点,总结于此 nginx是以多进程的方式来工作的.nginx在启动后,会有一个master进程和多个worker进程. maste ...

  10. 一系列JavaScript的基础工具

    在我们的bootcamp训练营中,学员们介绍了一些工具和库来扩展他们代码的能力.Kalina,目前我们JavaScript学员中的一员,列举了这些工具,想和其它爱好代码的小伙伴一起分享. 点击看大图 ...