rm package.apk dummy package.unaligned package.unsigned
touch dummy
jar cf package.apk dummy
zip -qd package.apk dummy
aapt package -u -z -M AndroidManifest.xml -S res -I $ANDROID_BUILD_TOP/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk -F package.apk
aapt add -k package.apk classes.dex
mv package.apk package.unsigned
java -jar $ANDROID_BUILD_TOP/out/host/linux-x86/framework/signapk.jar $ANDROID_BUILD_TOP/build/target/product/security/platform.x509.pem $ANDROID_BUILD_TOP/build/target/product/security/platform.pk8 package.unsigned package.signed
mv package.signed package.apk
mv package.apk package.unaligned
zipalign -f 4 package.unaligned package.apk.aligned
mv package.apk.aligned package.apk
阅读(1837) | 评论(0) | 转发(1) |