Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,814,032 Members 44,064 Now Online
XDA Developers Android and Mobile Development Forum

Unable to sign APK files - invalid entry compressed size??

Tip us?
Member - OP
Thanks Meter 0
Posts: 91
Join Date: Feb 2009
Location: Las Vegas
Default Unable to sign APK files - invalid entry compressed size??

Hello all,

I need some help signing my APK files. I have done everything correctly up to the point of signing the file.

I am running the command:

jarsigner -verbose -keystore -my-release-key.keystore oriental.apk alias_name

Jar signer then asks for my password I set up. i put in the password and get:
jarsigner: unable to sign jar: invalid entry compressed size (expected 1110 but got 1119 bytes)

I have scoured the web for hours and tried a few things. All lowercase name ofr the apk file as suggested somewhere. i am at a loss.

Anyone know how to fix this?
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Apr 2009
Default Need to do this on an unsigned apk file...

I ran into this same problem for an android apk using Eclipse. I don't know if your running into the exact same problem. But, I'm guessing the principles are similar.

To fix this I had to do the jarsigner on an unsigned apk file. If you are using Eclipse, the apk is signed with a temporary key (which I think the android market won't allow).

If your using something else, you can see if your apk is already signed using syntax like:

$ jarsigner -verify -verbose my_application.apk

To get an unsigned apk in Eclipse, right click on application name in the Package Explorer window and choose Android Tools, then choose "Export Unsigned Application Package...". Save the package to a new location.

Once you have an unsigned apk. Run the jarsigner command you were using on the unsigned apk file.

This is also possibly explained better (at least for an android user using Eclipse) at:

Like I said earlier if your not using Eclipse to generate an apk, possibly the tool your using has similar options to create an unsigned apk file.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes