Centos的APK解包打包签名

目录

安装工具

wget https://android-apktool.googlecode.com/files/apktool1.5.2.tar.bz2
wget https://android-apktool.googlecode.com/files/apktool-install-linux-r05-ibot.tar.bz2

tar xvf apktool1.5.2.tar.bz2
tar xvf apktool-install-linux-r05-ibot.tar.bz2

mv apktool1.5.2 /usr/local/apktool
mv apktool-install-linux-r05-ibot /usr/local/aapt

vim /etc/profile
export PATH=$PATH:/usr/local/aapt:/usr/local/apktool

cp /usr/local/aapt/* /usr/local/bin/
cp /usr/local/apktool/* /usr/local/bin/

安装Java

反编译命令

apktool d -f com.paipai.apk test

打包命令

apktool b -f test test.apk

签名

java -jar signapk.jar testkey.x509.pem testkey.pk8 test.apk test1.apk

问题处理

问题
[root@localhost ~]# aapt 
-bash: /usr/local/bin/aapt: /lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录

查看库在哪个包里
yum whatprovides ld-linux.so.2
安装
yum install glibc-2.12-1.132.el6_5.1.i686


问题
[root@localhost ~]# aapt 
aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

yum whatprovides libz.so.1 
yum install  zlib-1.2.3-29.el6.i686

[root@localhost ~]# aapt 
aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

yum whatprovides libstdc++.so.6
yum install libstdc++-4.4.7-4.el6.i686

目录