1.将应用程序源码复制进Android源码目录中(提前编译好源码)
2.使用build/envsteup.sh 配置shell -
mm TARGET_PRODUCT=product_name
或直接./build_android.sh 也能完成编译。
3.在源码目录:out/target/product/productname/obj/APPS/test_cert_intermediates 下有三个文件:package.apk package.apk.unsigned package.apk.unaligned
将package.apk.unsigned复制出来,单独进行sign.
4.在Windows下进行sign: jarsigner -verbose -keystore youkey.keystore d:\package.apk.unsigned youkey
5.zipalign -v 4 d:\package.apk.unsigned d:\package.signed.apk