1. Home
  2. Knowledge Base
  3. Android
  4. Keystore & Signing
  5. Android APK Signing Tool v2 (apksigner)

Android APK Signing Tool v2 (apksigner)

APK Signer is deprecated. The tutorial will be still available, however the download is no longer possible. Please use Android Studio instead.

About

The APK Signer Tool v2 allows you to sign and align your Android application using the “apksigner” included in the Android Build Tools, managing your keystore files and certificates and so on.

Info

The tool uses the .Net runtime by Microsoft. Make sure that you have the runtime installed on your computer.

Download

APK Signer Tool (v2)

Download is no longer available, please use Android Studio instead…

Android Studio

Android Studio offers all tools needed to sign and align your next Android project. Please find the download link below.

JDK

Also to get some features working, you need to install the Java Developement Kit (JDK) on your local machine. Please find the download link below.

Java JDK 8

0.00 KB 43413 downloads

Documentation

Thank you for downloading our APK Signer Tool v2! Please read the following documentaton carefully. If you got any errors, please check the Error Handling section below. If your error is not covered there, please submit a support request either via our Ticket center or our forum.

[creativ_button url=”https://shatter-box.com/submit-ticket/” icon=”edit” label=”Submit a Ticket” colour=”green” colour_custom=”” size=”medium” edge=”rounded” target=”_blank”] or  [creativ_button url=”https://shatter-box.com/forums/forum/94-support-bugs/” icon=”user” label=”Visit our Forum” colour=”dark-gray” colour_custom=”” size=”medium” edge=”rounded” target=”_blank”]

Select Pathes

To be able to use all functions of the APK Signer Tool you need to specify the path to your your Java JDK installation and to your Android Build Tools installation.

To do so, just click the corresponding button to browse the installation folder.

If the path is valid, the input form will be set to green.

Important

Please make sure that you have installed the Android Build Tools (via Android Studio) and the Java Developement Kit (JDK) on your local machine first.

Create a KeyStore File

The tool allows you to create your own Keystore file (.jks / .keystore) if you have none. To do so, please select the Keyfile Generator (JDK) tab first.

Select the export path for your KeyStore file with the Browse button. Give it a proper name and click Save.

KeyStoreType

You either can save the key as .jks or .keystore file. Both are working.

Then, please enter all needed information into the input forms. If your input is valid, the input form becomes green.

Please note...

The password must be at least 6 chars long!

When you feel ready, click the “Generate Key File” button below. When the key has been created successfully, you will get a notification.

Align & Sign

If you want to sign or / and align an application, select the Align & Sign tab first.

Here you either can sign or align your application, or do both in one step.

Important

Due to the fact that our tool is using the “apksigner.exe”, you have to align your APK before you sign it!

To align and sign your application, please select your APK file first. To do so, use the Browse button.

Please make sure to select an unsigned and un-aligned APK file!

In the next step, select your keystore file. To do so, please click the Browse button.

My Keys

This tool allows you to save your keys on your local machine. So you only need to select your key at the dropdown to use it. Learn more at the “My Keys” section of this guide.

Please note...

The tool automatically checks the key password. If it’s valid, the alias gets fetched automatically. Otherwise you will get a notification.

If all information are provided, click the Align and Sign button. Then, your APK will be aligned and signed automatically.

When all went good, you will get a notification. You also can check the consol on the right hand side.

My Keys

Save Key

The tool allows you to save your keys in a collection. To do so, just click the “Save to List” button at the Align and Sign tab.

Important

You must enter all information for your key before you can save it to your list!

Manage Keys

To use a saved key, just select it at the dropdown menu at the Align and Sign tab. All needed information will be fetched from the saved key, like the alias, the password and the path.

Important

The key path must be valid! Do not move or delete your key on the saved location!

You find an overview of all your saved keys at the My Keys tab. You easily can delete a key entry from the list by performing a right mouse click on it and select Delete…

Important

This will not delete your keystore file on your local drive. Only the entry in the tool will be removed.

Event Monitor

The event monitor shows the application log. If you have any troubles, please check the event monitor first.

You can clear the log by clicking the Clear Logs button.

Error Handling

The tool has some defined error codes. Those  codes make it easier to find the problem. Please, see the following error codes and their description.

0x0001 – Android Build Tools Path

If you get the error code 0x0001 you have selected an invalid path for the Android Build Tools. Please make sure to select the “build-tools” directory. The application will fetch automatically the highest available version of it.

Information

You need to install “Android Studio” to get the build tools.

Please keep in mind that you need to install Android Studio to get the build tools installed on your computer. Afterwards you can find the build tools here.

[code]C:\Users\USER_NAME\AppData\Local\Android\Sdk\build-tools\[/code]

0x0002 – Outdated Build Tools

If you get this error, please go to Android Studio and update your build tools SDK to the latest version.

To do this, please proceed following steps:

  • Open Android Studio (open a project, if you have none, make a new one)
  • Go to “Tools” -> “SDK Manager”

  • Then select the “SDK Tools” tab, select the latest version of the “Android SDK Build-Tools” and click “Apply” to install / update it

0x0003 – Wrong JDK path

If you get this error code, you have selected the wrong JDK installation (maybe the JRE or a subfolder). Please make sure that you select the root folder.

0x0004 – Application not found

If you get this error, please check your pathes for your JDK and Android Build Tools installation. This error says, that either the “apksigner.exe” (Android Build Tools) or the “keytool.exe” (JDK) cannot be found.

0x0005 – Probelms to clear log

If you get this error code, the tool has problems to clear the log file. This can be caused if you have the log file open with another application. Try to close it and try again to clear the log.

Translation

With the latest update the tool has become localised. For now, it’s available in following languages.

  • English (default)
  • German

If you want to provide any further translation, please let me know in the forum!

Known Issues

Please find a list of the known issues below. Those issues will be fixed with the next update.

Space in path

Thanks to Martin for reporting this issue. It seems that the tool has issues when a space is in the path / folder name. Till this is fixed, please replace the space with another char. Should be fixed in version 2.0.2-beta.

Bugs & Problems

Please, if you are facing any issues, open either a ticket or a forum post. If you just leave a bad feedback to this article, I have no chance to contact you for further details!

[creativ_button url=”https://shatter-box.com/submit-ticket/” icon=”edit” label=”Submit a Ticket” colour=”green” colour_custom=”” size=”medium” edge=”rounded” target=”_blank”] or  [creativ_button url=”https://shatter-box.com/forums/forum/94-support-bugs/” icon=”user” label=”Visit our Forum” colour=”dark-gray” colour_custom=”” size=”medium” edge=”rounded” target=”_blank”]

Changelog

v2.0.6-beta – 2020-03-24

  • Fix: Updated build-tool version checker to also work with the new version strings including “-rc1” and so on.

v2.0.5-beta – 2019-09-15

  • Fix: Changed “apksinger.exe” to “apksinger.bat” in error dialog.
  • Fix: Field validation for the Country has been set down from 3 to 2 chars minimum.

v2.0.4-beta – 2018-12-25

  • Fix: Fixed auto detection of the alias name while using a “.jks” keystore file instead of a “.keystore” file.

v2.0.3-beta – 2018-07-01

  • Improvement: Minior visual adjustments
  • Improvement: Now if you align and sign the APK separately the APK path will be updated automatically to the aligned APK.
  • Fix: Fixed issue that the log file couldn’t be written (was blocked by an unclosed reader of the tool).
  • New: Localisation added. For now the tool is available in English and German. If you want to help translating the tool, please let me know in the forum! Thank you.

v2.0.2-beta – 2018-05-06

  • Improvement: Dialog asking to select your JDK & Android Build Tools Path now will be shown after the Tool has been loaded completely
  • Improvement: Adjusted some error logs to be more specific
  • Fix: Typos fixed
  • Fix: Tool didn’t work if a space was in the APK or Keystore path
  • New: Added EventLog viewer (shows logs from the log file directly in the tool)
  • New: Added button to clear log

v2.0.1-beta – 2018-04-18

  • Hotfix: Avast thought file includes male ware. Added some publisher information to the tool. Now it looks good.

v2.0.0-beta – 2018-04-18

  • First relase
Updated on January 9, 2021

Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Visist our Forum!

Comments

  1. hi im facing a problem with keysotre when i generate the keystore and tri to sign the apk with it ( message popup- your key password seems to be invalid ) itry number only / numbers and words/ words only nothing to seems working
    plz help

  2. how i can find build-tools for apksinger v2
    I hope repond me fast

    thanks

    1. Hi,
      please check the „Error Handling“ above. You need to download the Android Studio Tool. Then you can download the Android Build Tools 😉

      Best,
      Andy

  3. Hi, in cas someone needs it: If you do not get APKSigner to take the key file (error “wrong password” even if you are sure it is the right one), try moving the files to another folder. In my case, APKSigner and the keyfile were buried in a storage folder (which was on another drive, rather lengthy and contained spaces, a “+” and commas in the path). After moving the whole folder (APKSigner and the keyfile) to a temp folder on c: everything suddenly worked fine.

    That being said, a big THANK YOU for this program!

    1. Hi Flo,
      thank you very much for your comment. I actually thought that I‘ve fixed this bug already.
      I‘ll check it again and release an update for it.
      Thanks,
      Andy

  4. Hey man, thanks so much for taking the time to streamline this abhorrent chore for us. Doing the ‘Sign & Align’ dance after FINALLY getting your masterpiece to build successfully is cancer and this little tool is my favourite form of chemotherapy. Interface is slick and logical. Purely a ‘heads up’, the field validation for State (keytool component) throws invalid if the user inputs less than three (3) characters but for some countries, like me in Australia, half of our States/Territories/Provinces have two (2) characters – i.e. me in Western Australia = WA. Not a major problem, obviously, just a note. Love ya work, mate, thanks again for a very useful tool, you’re a champ.

    1. Hi,
      thank you for your comment and letting me know about the field validation problem.
      I’ll update the tool to allow also 2 chars for the Country 🙂

      Thank you,
      Andreas

    2. Hi again,

      I just updated the tool to accept also 2 chars for the state! Thanks again for the hint 🙂
      Just let me know if you are facing further issues, I’m glad to update it 🙂
      Thanks,
      Andreas

    1. Hi Tarik,
      it seems that the alignment has failed on your end.
      Doesn’t work it at all or just not with the current apk file?
      I‘ll check the code once I‘m back ok my computer and let you know.
      Thanks for sharing!

      Andreas

      1. i fix it .. i unstall the jdk latest virsion 13 and i install old verssion of jdk its the 7 version and she work good for me
        thanks you bro andreas you are great man ..

        1. Hi Tarik,
          thanks for letting me know how you fixed it.
          You’re welcome, I’m glad to help 🙂
          Best,
          Andreas

  5. ! Error: “Reading extra field length failed”. Details:

    java.io.IOException: Reading extra field length failed
    at group.pals.desktop.app.apksigner.utils.ZipAlign$ZipAlignmentVerifier.verify(ZipAlign.java:815)
    at group.pals.desktop.app.apksigner.utils.ZipAlign$ZipAlignmentVerifier.run(ZipAlign.java:739)

      1. i create keystore and sign without problems but when i try to upload on google play or verified the signed app i get this error

  6. This doesn’t seem to work with the latest version of Android Studio. The ‘build-tool path'(apksigner.bat) wont accept the path of:

    C:\Users\PC\AppData\Local\Android\Sdk\build-tools\

    I tried everything I could think of to get it to work but i can’t figure it out. The times I do set it to that directory, I get a ‘unhandled exception has occurred’ error and it crashes. Can you update the program to fix this? Either that or which version of Android Studio were you using when it worked? thanks

  7. I have a problem with Align & Sign.

    Build-Tools and JDK path set correctly afaik, both are “green”. I get an error telling me that zipalign.exe could not be found (0x0004).

    Build-Tools path ist set to
    C:\Users\****\AppData\Local\Android\Sdk\build-tools
    There is a subfolder called “30.0.0-rc4”, in this folder I can see the zipalign.exe

    What can I do?

    1. Hat sich erledigt. Ich hatte scheinbar ein falsches Alias-Passwort eingegeben.

      1. Hi,
        glad to hear. Let me know if there is anything else what I can do for you.

        Best,
        Andreas

  8. After signin apk i test in my phone it work, but after try to upload apk to google play i get this problems:
    (You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR (Jar signer LILAX.RSA): JAR signature META-INF/LILAX.SF indicates the APK is signed using APK Signature Scheme v2 but no such signature was found. Signature stripped? ERROR (Jar signer LILAX.RSA): JAR signature META-INF/LILAX.SF indicates the APK is signed using APK Signature Scheme v3 but no such signature was found. Signature stripped?)

  9. bro please help me i have a problem with sign

    java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    please tell me what can i do

  10. when i sign a window with the error check the password key. and its correct the password
    java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
    Error: A JNI error has occurred, please check your installation and try again
    Exception in thread “main”

    1. Hi,
      the tool is deprecated, because the most important IDE‘s for Android coding do support direct signing of the apk files. So there is no benefit to maintain an additional tool doing the same.

      Best,
      Andreas

Reply to Zer0ne Cancel

This site uses Akismet to reduce spam. Learn how your comment data is processed.