Android APK Signing fail ! [SOLVED]

K

Kasra_n

Guest
Hi there, why this happen ?
Code:
```
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 5997 but got 6083 bytes)
cmd /c ""C:\Android\android-sdk\build-tools\24.0.0\zipalign.exe" -v 4 "C:\Users\Gamemaker Studio\AppData\Local\Temp\gm_ttt_35938\gm_ttt_16191\bin\RunnerActivity-release.apk" "C:\Users\Gamemaker Studio\Desktop\android_test.apk""```
it was worked on same sdk ndk and jdk, suddenly it happened
 
Last edited by a moderator:
K

Kasra_n

Guest
i tryed to read oracle docs about this problem, the only thing i found was: oracle is pointing at zipping algorithms and the diffrent sizes that they make, but iam not an expert, i just followed yoyo manuals and it was fine but suddenly crashed !, really no ones here dont know the answer ?
 

pipebkOT

Member
change the name of android_test.apk to androidtest.apk

an clean the cache of the project.


i don't think that this will solve it , but better try it.
 
K

Kasra_n

Guest
change the name of android_test.apk to androidtest.apk

an clean the cache of the project.


i don't think that this will solve it , but better try it.
sure, but that cant be the reason, actually game maker force the apk to sign and align in the same time(and any returned values like 2, 0 [described in oracle manual] from the jdk tools will fail the build) iam worry about this that the game maker is trying to sign a debug apk, (debug apks have their own specific debug sign) so it mean trying sign a signed app ,i wish at lest i could access the noone aligned/signed apk after build to sign it manually, so now any attempts will corrupt the apk, i tryed rename the apk to .zip then removed the meta-inf folder and signed it, but still got that play protect warning, iam pretty sure that there is some beyond the jdk that we dont know about, iam trying to contact oracle to find the real reason, so i will get the answer soon and will share it, and by the way thanks for the reply ;)
 
Last edited by a moderator:
K

Kasra_n

Guest
sure, i found the reason, let me share it with people who still have this problem, actually the reason is a "corrupted keystore", it is a bit long if i want to describe how a keystore will generate and become corrupt, but for a short answer: go to your java folder and generate a new keystore manualluly instead of clicking generate in gm prefrence tab, and place it instead the patch in the android prefrence tab in GM (there is simple manuals for gen-key in google), so people who use gm 1.4 can use this, iam not sure about 2, cuz i usually developing for hobby, and dont have money to buy modules in 2, but if you want to sign something and the signer fails it mean the sign key is corrupted, happy coding, and let me know if you have any problem with playprotect warnings, sometimes it happen for diffrent reasons.
 
Top