To sign an Android APK from command line: Sign the APK with jarsigner (using default keystore, android-root is the alias of the signing key): $ jarsigner -signedjar HelloWorld-new.apk HelloWorld-debug-unaligned.apk android-root Enter Passphrase for keystore: password Verify signature (optional) $ jarsigner -verify -verbose -certs HelloWorld-new.apk Align the APK (must use -v 4 option): $ ~/android-sdk-linux_86/tools/zipalign -v 4 HelloWorld-new.apk HelloWorld-new-aligned.apk 查看原帖>>