About
In order to upload your compiled Android file (apk) you need to sign and algin it. There are several ways to do that, but the easiest is to use the tool APK Signer from Hai Bison.
Requirements
- JDK 1.6+
- JRE 1.6+
- ADT (including zipalgin file)
You can download the needed Java JDK’s and JRE here.
Download APK Signer
Download for the desktop tool is no longer available. Please use Android Studio instead or try the mobile APK Signer from Hai Bison.
Android Studio
Android Studio offers all tools needed to sign and align your next Android project. Please find the download link below.
APK Signer
Create a keystore file
The tool makes it very easy to create your keystore file. This file can be used for all your games. There is no need to create a new one for each app/game.
- (1) – Locate your Java JDK 1.6 installation path (Java/bin/…)
- (2) – Update the information for the keystore file (save your password, you’ll need it every time you want to sign your app!)
- (3) – Click ‘Save as …’ and save the path you want to create the keystore file
- (4) – Click ‘Generate Keyfile’
If you have added all information and the generation was successfully you will get this notification.
Sign your App
Here you find a simple video showing the steps below.
Switch to the ‘Signer’ tab and make sure the path to your JDK 1.6 installation is set.
- (1) – Load your keyfile and enter your two passwords (Hint: if you enter the ‘Password’ press the tabulator key. If you password was right the Alias will be set automatically)
- (2) – Load your app you want to sign (make sure that you have unchecked ‘Sign’ at Intel XDK, otherwise the apk is debug-signed already)
Press ‘sign’ to sign your app. You will get a file named ‘…SINGED_UNALIGNED.apk’
Align your app
Now go to the ‘APK Alignment’ tab and load the apk you got after the signing.
- (1) – Load your signed app file
Press ‘align’ and you will get a file named ‘…SIGNED_ALIGNED.apk’. This file is ready to be uploaded to the Google Play Store.
Issues & Troubleshooting
APK Signer doesn’t start
If you are facing the issue, that the APK Signer tool freezes at startup (only the logo is shown), please go to following steps.
- Remove all newer Java RE’s and JDK’s than 8
- Maybe restart your computer
- Install Java RE & JDK8
- Run again
You also find a video solution guide below.
File.IO Error
If you keep getting the error message that the tool cannot find the jarsigner.exe, please download the latest JDK here.
[wpfilebase tag=file id=66 tpl=button-css-blank /]
And specifiy the path at the APK Signer.
No Solution found?
Got any problem? Please visit our support forum.
[creativ_button url=”https://shatter-box.com/forums/forum/63-sign-align/” icon=”heart” label=”Support” colour=”green” colour_custom=”” size=”large” edge=”rounded” target=”_blank”]
Thank you!
from where do I get the alias and password?
Hi,
You need to set the alias and password when creating the new keystore file. This can be anything. Basically the alias is your brand.
Regards
Andy
When I try “APK Alignment” I get “Verification FAILED” error.
Have you signed the apk first? I never have got this issue on my end. Can you tell the steps you did?
Regards
Andy
Thank you so much for this tool Andy !
No more awful command lines to remember 🙂
Cheers,
Julien
Thank you 🙂 but’s actually not my tool. I just made a Tutorial for it. The author is mentioned above on the guide.
Regards
Andy
Thanks Hai Bison for the tool and thanks you for the tutorial then : )
Hello, after the signature, the apk is not installed on the android, writes the apk is damaged. Signature passes without errors. What is my problem? Help me please.
Edited by Admin, translated into english
Hi,
thanks for your comment. This mostly happens when you sign an APK file which already has been signed with a diffrent key
(debug builds for instance). If this wasn’t the case, you can try to use JDK 6 (1.6.x). You find the download link
in this article at the beginning.
If it still doesn’t work, try to remove the app from the device completely and try to reinstall it again.
Best,
Andy
Awesome! Finally a way to get rid of unwanted app updates.
hi
i am unable to sign my apk file
when i click sign it gives the error “unable to open jar file”
hi
what error?
Error while signing file. Details:
jarsigner: unable to sign jar: java.util.ZipException: invalid intry compressed size (expected 3696 but got 3762 bytes)
I am having the same issue. Any solutions yet?
Hi Matt,
have you tried to install the “debug” signed apk? Does this version work on your phone?
Regards
Andy
Yes my app works on my phone.
i have same error then i realize my app has debug signed by android studio. deleting cert.rsa, cert.sf, manifest.mf files in the apk solved my problem. i hope it helps
hi , when i try Create a keystore file i get an error ” java IOEXEPTION :error keytool filenotfoundexeption c:\program file\test.keystore (accés refusé)
Hi,
It seems that you have no access to the path. Try to run the tool as admin or try another path.
Regards
Andy
Hi,
After sign and align the built, we get the following error message, when we try to upload the apk file into the google play store:
“Failed to run aapt dump badging:
W/ResourceType(292349): Bad resource table: header size 0x2 or total size 0x104c is not on an integer boundary
ERROR: dump failed because the resource table is invalid/corrupt.”
Hi CB,
please post your issue in our support forum! Add as many information as possible.
https://shatter-box.com/forums/forum/63-sign-align/
Thank you!
when I click create keystore, it got error message java.lang 6
please help, thanks
Hi Sam,
please post your issue in our support forum! Add as many information as possible.
https://shatter-box.com/forums/forum/63-sign-align/
Thank you!
thank you very much
Hi
signed and aligned suceessfully .installed in the device also sucess . when open the app it says the app unfortunately stopped pls help
Hi,
This has basically nothing do to with the signing process. If your app crashes on startup, it might be an issue in your code / project.
Regards
Andy
I have this problem. Can you help me to solve it?
http://www.dempafi.com/problem.jpg
Very useful, thank you
hi when i want sign my apk with my new keystore it shows me this error
jarsigner : key associated with apk not a private key
Hi,
please post issues in our support forum.
https://shatter-box.com/forums/forum/63-sign-align/
Thank you!
Regards
Andy
Hii I’m Deepak
After sign and align the built, we get the following error message, when we try to upload the apk file into the google play store:
Failed to run aapt dump badging:
W/ResourceType(211608): Bad resource table: header size 0x116f or total size 0xa54087d2 is larger than data size 0xe1040
ERROR: dump failed because the resource table is invalid/corrupt
Please solition ????
jarsigner error: java.lang.RuntimeException : Keystore load : keystore was tampered with , or Password was incorrect
Hi,
The error message says exactly what your issue is. You have entered an incorrect password for your keystore file.
Regards
Andy
Hello i have a poblem , when i download the file i dont find the File jar i find alot of files like asstes and group and Meta-INF ! please i need a slove to my problem ! i have all the java files !
I am having exactly the same problema tan Alex. Any help please?
Hi,
Can I used certificate which is store in HSM to sign my APK?
Hello, I need help. I signed and aligned successfully, but when I verify i got an “VERIFICATION ERROR” also when I try it on phone, i got “PARSE ERROR, There is a problem parsing the package” Please help. Thankyou
Hi, I try modify name package whatsapp for have 2 whatsapp.
Now I have sign how you tell me and all ok but tell me in installing “app not installed”
Hi,
This is because the app was already signed. Then after your modification you signed it with a diffrent key. That’s why you cannot install it.
Regards
Andy
HI eny idea IPA file (ios app) combile decombile???
You cannot sign an ipa file with this tool. XCode does this for you.
Regards
Andy
this tools, can’t sign apk with DSA key.
please help, i want sign apk with DSA key.
Hi,
The original developer has stopped supporting this tool. So no
changes will be made anymore.
Regards
Andy
Hi,
I am find a little difficulty in running the main file apk-signer-1.8.5.jar.
Its logo appears but the file don’t run.
I tried to copy screenshot but its not allowed.
Any solution for the same.
Hi,
for this matter use our support forum, please.
There you can upload a screenshot.
https://shatter-box.com/forums/forum/63-sign-align/
Thank you!
Hi,
I Successfully created “org.adblockplus.android1.3_SIGNED_ALIGNED.apk ” file but i cant upload it in google play consol , it will give an error –
You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR (Jar signer CERT.RSA): SHA-1 digest of META-INF/MANIFEST.MF section for res/drawable-mdpi/abs__ic_menu_moreoverflow_normal_holo_light.png does not match the digest specified in META-INF/CERT.SF. Expected: , actual: ERROR (Jar signer CERT.RSA): SHA-1 digest of META-INF/MANIFEST.MF section for res/drawable- …………..etc
how can i solve this. . .
Hi,
I successfully installed jdk 1.6 from the following link
http://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-6u3-jdk-6u29-downloads-523388.html
still i got the following error
Your APK cannot be analyzed using aapt. Error output:
Failed to run aapt dump badging:
W/ResourceType(292567): Bad resource table: header size 0x13 or total size 0x4314 is not on an integer boundary
ERROR: dump failed because the resource table is invalid/corrupt.
what to do
Hi,
please use the forum to post issues.
https://shatter-box.com/forums/forum/61-android/
Thank you!
Thanks, this app help me!
Hello.
I have an issue witch is the apksigner doesn’t open, i mean it shows a small black box and that’s it please help me.
Hi,
please post issues in our support forum.
https://shatter-box.com/forums/forum/63-sign-align/
Thank you!
Regards
Andy
this not work for apk recompile using easy apk
Genius, thank you! It’s made submitting apps to Play Store much easier.
Glad to hear 😉
Thank you!
apk signer dosen’t extract in my bureau
Hi!
If have any issues running the APK Signer Tool, please
check the forum thread here.
https://shatter-box.com/forums/forum/63-sign-align/
Please open a new post in the forum and also try tro provide more information,
like OS, Java RE version and so on.
Thanks!
java.io.IOException: Cannot run program “jarsigner”: CreateProcess error=2, The system cannot find the file specified
how to fix this error?
Hi,
please enter your JDK path at the signer (select the bin folder in it).
Please see here
https://shatter-box.com/knowledgebase/android-apk-signing-tool-apk-signer/#create-a-keystore-file
The number (1) shows the accurate path.
Best,
Andy
Hi
After Alin & sign , The game is not installed on the phone ( App not installed )
how to fix this error ?
tnx
Hi,
this issue can come from a previous installed app with the same bundle id and a diffrent key, mostly the debug key.
Can you try to remove the app completely from your device and try again?
If it still doesn‘t work, please open a new topic at the https://shatter-box.com/forums
Thank you!
Best,
Andreas
With this method I can publish an “APK” in google Playstore?
Hi,
If you want to publish an APK file to the play store, you need to sign it with your own
certificate / keystore file. This tool helps you do this effortlessly.
However there are more ways and solutions to achieve that.
For the complete procedure you can find a guide here:
https://shatter-box.com/knowledgebase/publish-android-app-google-play/
Best,
Andy
It is possible to existing application da “Playstore “sign with a new key and publish in google Playstore?
Hi,
not with the same bundle ID. So, if you have lost your key or password, you will not be able to update your app anymore.
You can re-publish with another bundle ID and signed with a diffrent key. But this will be a completely new release,
and everybody needs to download this app again.
Best,
Andy
You’re very good at information. Thank you!
Can you let me know how I can get an existing “APK” and post to the playstore as a new ID? Are there any tutorials or step-by-step?
Hi Maria,
sure, just follow this guide:
https://shatter-box.com/knowledgebase/publish-android-app-google-play/
If you have any additional questions, just visit our forum and open a new topic.
https://shatter-box.com/forums
I’m glad to help you out then.
Best,
Andy
not work, jdk 11
Hi,
the tool is outdated. Either use an older version of JDK, or switch to our version of the APK Signer Tool (v2). See link in the article.
Thanks,
Andy
Dear Sir
I tried to decomp apk but i get success NO
Log For : tvandroid.apk
Log Type : Decompiling
Log Recorded At : 06 2019-08- 20:33:52.59
Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak
——————————————————
W: Config flags size > 38. Exceeding bytes: 0x746E00000000000000000000000000000000.
W: Invalid config flags detected. Dropping resources: string-sr-ERR0
Exception in thread “main” java.lang.ClassCastException: brut.androlib.res.data.value.ResStringValue cannot be cast to brut.androlib.res.data.value.ResAttr
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:114)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:99)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:323)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
——————————————————
Hi,
please open a new topic in the support forum if you got any issues using the tool.
https://shatter-box.com/forums/forum/63-sign-align/
Tag me into the topic, so that I get notfied with @andreas
Please, also provide some additional information like, what JDK version did you use? What OS
are you running?
Thank you!
wonderful, I am looking for apk signer information and you mention such an amazing command.
thanks for sharing with us.
greetings.