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.SecurityExceptio
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