转于:http://www.qiansw.com/centos-apk-apktool.html

我使用的是CentOS6.4 64位的系统。
首先需要下载两个包。
这里下载:https://code.google.com/p/android-apktool
打不开的用户直接翻到文章下面下载附件即可(版本可能不是最新的)。

到这里下载java:http://www.java.com/zh_CN/download/manual.jsp

1.把附件中的两个包解压得到三个文件,全部复制到/usr/local/bin目录中。
2.下载完java后安装:

 
1
shell > yum localinstall jre-7u55-linux-x64.rpm

3.错误处理:
反编译命令:
/usr/local/bin/apktool d -f /home/pkg/vv.apk /home/pkg/vv
打包命令:
/usr/local/bin/apktool b -f /home/pkg/vv /home/pkg/vv.apk

Cannot run program "aapt": error=2, No such file or directory
执行aapt的时候报错
-bash: /usr/local/bin/aapt: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
查看需要安装哪个包。
yum provides */ld-linux.so.2
根据提示安装:
yum install glibc-2.12-1.132.el6.i686
尝试继续执行打包命令。
报错aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
yum install zlib-1.2.3-29.el6.i686
报错aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
yum install libstdc++-4.4.7-4.el6.i686
报错: Protected multilib versions: libstdc++-4.4.7-4.el6.i686 != libstdc++-4.4.7-3.el6.x86_64
则表示64位版本的libstdc++版本与需要安装的32位版本不一致,需要先升级64位版本。
yum install libstdc++

整理一下:

Shell
 
1
2
yum localinstall jre-7u55-linux-x64.rpm
yum install -y glibc-2.12-1.132.el6.i686 zlib-1.2.3-29.el6.i686 libstdc++ libstdc++-4.4.7-4.el6.i686
 
 
 

最新文章

  1. tomcat:there is no resources that can be added or removed from server
  2. 为SharePoint 站点添加通知
  3. java程序操作Geometry对象
  4. Nvidia Nsight + .NET
  5. mysql错误用法insert into where
  6. Ruby-Array数组
  7. Spring Autowiring @Qualifier example
  8. iOS网络编程总结
  9. 第一个shell编程,输出hello world!
  10. 【剑指offer】面试题22:栈的压入、弹出序列
  11. spring @Scheduled 执行2次
  12. java程序设计-算术表达式的运算
  13. sqlserver 存储过程 修改
  14. B-dya6
  15. C#程序自动更新软件版本号
  16. Git克隆代码后更新代码上传至服务器
  17. 谷歌地图,国内使用Google Maps JavaScript API,国外业务
  18. luogu P2470 [SCOI2007]压缩
  19. AngularJS之拖拽排序(ngDraggable.js)
  20. sqlserver数据库镜像运行模式

热门文章

  1. python 实现简单的KNN算法
  2. iOS中深拷贝、浅拷贝和retain的区别
  3. Eclipse、svn插件、subclipse的安装
  4. Eclipse错误导致无法启动The workspace exited with unsaved changes in the previous session
  5. PHP5.3配置文件php.ini-development和php.ini-production的区别
  6. [Java基础] java的守护线程与非守护线程
  7. vim的批量列编辑
  8. xpages开发的bom管理系统
  9. [转]黄聪:如何使用CodeSmith批量生成代码
  10. Python 爬取外文期刊论文信息(机械 仪表工业)