First To Sign Or First To Align? Answered.

First, the answer:

  1. Sign using JDK‘s jarsigner.exe and your keystore, SHA1 and timestamp.
  2. Align using zipalign.exe -v 4 (from Android SDK Tools). 4-bytes, is to provide a 32-bit alignment.

Do not align-again (after signing),
not having the archived changed in any way.
You may extract/delete the content of META-INF (not com/*)
and create a new archive (which you may sign/align later).

Simple right? – So why the confusion?

Continue reading