I have signed the apk, but when I tried to verify using jarsigner:

jarsigner -verify -verbose -certs sample.signed.apk

But I got an error saying:

jarsigner: Signature Block missing for ANDROIDS

I have no clue where I should look into this issue. Can someone give me a hint?

有帮助吗?

解决方案 2

It turns out the version of jarsigner I was using was on JDK1.6. After I upgraded it to 1.7. The problem was solved.

其他提示

How did you sign the jar file ?

From the Java docs here looks like

-verify
   If this appears on the command line, the specified JAR file will 
   be verified,not signed. If the verification is successful,
   "jar verified" will be displayed. If you try to verify an unsigned
   JAR file, or a JAR file signed with an unsupported algorithm 
   (e.g., RSA when you don't have an RSA provider installed), 
   the following is displayed: "jar is unsigned. (signatures  
   missing or not parsable)" It is possible to verify JAR files 
   signed using either jarsigner or the JDK 1.1 javakey tool, or both.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top