Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.SecurityException when install apk

Tags:

android

as you know apk is a zip archive, I extracted it and replaced some resources, and zipped it again, when I install it, I get this exception

java.lang.SecurityException: META-INF/MANIFEST.MF has invalid digest

any solution for this error??

like image 798
JustMe Avatar asked May 28 '11 13:05

JustMe


3 Answers

I came across this same error caused by having installed the JDK 7 instead of 6. Hope it helps some other people with this error.

like image 52
Ross Hambrick Avatar answered Oct 06 '22 21:10

Ross Hambrick


Did you sign it after re-packing it? Changing anything in it broke the existing signature.

If the package is already installed and you re-sign the new one with a different signing key, it will also refuse to install.

like image 31
mah Avatar answered Oct 06 '22 21:10

mah


My problem was wrong certificate alias in keystore. I changed it to "CERT" and it started to work. I used this command: keytool -changealias -alias "1" -destalias "CERT" -keystore android.jks

like image 20
Jarda Pavlíček Avatar answered Oct 06 '22 21:10

Jarda Pavlíček