FORUMS
Remove All Ads from XDA

[GUIDE]GUI - SignApk Jar File Tutorial to Sign and Align APKs

190 posts
Thanks Meter: 74
 
By munnibhai, Senior Member on 19th January 2014, 11:59 PM
Post Reply Email Thread
Hello guys,
I am here with an easy to use application about creating your own keystore to sign APKs and align them.

Requirements:
  • JDK - Download from www.java.com
  • sign.jar - Download HERE - APK-Signer 1.8.3 by Hai Bison - working link as of 05/03/2016

Please note that you need to have JDK installed in system for jar files to work.

INITIAL SETUPS
  1. Assuming that you have JDK installed, download sign.jar and extract in anywhere you can navigate easy.
  2. I have it in "C:/apktool"
  3. Open Command Prompt (click Start > type cmd in search box and press enter)
  4. Navigate to folder where you extracted jar file, in my case "c:\>cd apktool".
  5. Type, "java -jar sign.jar"
  6. The writing things ends here and you will see application opened in GUI - as follows


CREATE KEYSTORE
  1. Now, we will need to first create a keystore file,
  2. Click on "Save As" in Target Tab and name the file anything, i named it "signedOne"
  3. Click on Save Button
  4. Now We will need to fill the form a little,
  5. In Password, type any password you may remember
  6. in Alias, type any name, usually that should be similar to your UNSIGNED apk file name
  7. Give an Alias Password (for ease, keep it same as password above)
  8. In Name field, Type your first and last name,
  9. This is the minimum required in form, if you want to fill full form, thats upto you.
  10. Click on Button "Generate Keyfile"
  11. Wait until message appears, "Keyfile Generated Successfully". Press OK

SIGN APK
Now its time to sign the APK. - Click on "Signer" Tab.


  1. First, Click on button "Load Keyfile"
  2. Browse for the same keystore file you created, in our case, if you kept the name same as mine, that will be "signedOne.keystore"
  3. Type the password you gave while creating the keystore file.
  4. You will see alias name appearing automatically below if password was correct.
  5. type the alias password you gave earlier.
  6. Click on "Load Target File" and browse for the APK file you want to sign. In my case "whatsapp.apk"
  7. Click on "Sign" button
  8. Wait until the dialog appears, "File Signed"
  9. You will see a new file whatsapp_SIGNED_UNALIGNED.apk in the same folder where whatsapp.apk was already present

ALIGN APK
Click on APK Alignment Tab
  1. Click on "Load APK file" button
  2. Browse for "whatsapp_SIGNED_UNALIGNED.apk
  3. Click on "Align" button
  4. Wait until the message appears "Alignment done, output file: "whatsapp_SIGNED_ALIGNED.apk"
  5. Optional - If you want to verify the alignment, click on "whatsapp_SIGNED_UNALIGNED" button - note that after the alignment, the button name remained same
  6. browse for "whatsapp_SIGNED_ALIGNED.apk
  7. Click on button verify
  8. it will give you a message, "Verification succesful"

TROUBLESHOOTING


If you get java,util exception error, you need to use JDK-6 or lower and give its path in JDK target adress bar
JDK-7 and plus have changed something for which APK signer doesnt sign APKs


Plz click Thanks buttong if it helped u
The Following 7 Users Say Thank You to munnibhai For This Useful Post: [ View ] Gift munnibhai Ad-Free
 
 
29th January 2014, 01:22 AM |#2  
Junior Member
Flag Carbondale Illinois
Thanks Meter: 1
 
More
???
Hey you wouldn't happen to know what im doing wrong in resigning the latest flash player ics.apk from http://helpx.adobe.com/flash-player/...-versions.html im trying to change the user agent and version with a hex editor. So I thought that editing the lib file was goofing it up so I just tried to simple extract the apk and resign it and it still wont work.

Any ideas what wrong?
7th March 2014, 06:15 PM |#3  
munnibhai's Avatar
OP Senior Member
Flag Gujranwala
Thanks Meter: 74
 
More
delete
9th March 2014, 03:48 AM |#4  
munnibhai's Avatar
OP Senior Member
Flag Gujranwala
Thanks Meter: 74
 
More
Quote:
Originally Posted by seraphim5

Hey you wouldn't happen to know what im doing wrong in resigning the latest flash player ics.apk from http://helpx.adobe.com/flash-player/...-versions.html im trying to change the user agent and version with a hex editor. So I thought that editing the lib file was goofing it up so I just tried to simple extract the apk and resign it and it still wont work.

Any ideas what wrong?

Its better to compile the apk back using apktool.

If you are first time using this tutorial above, maybe youare are not creating the keystore file. Can you post the apk here for me to look at it?

Sent from my GT-I9100 using xda app-developers app
15th March 2014, 02:58 AM |#5  
AlfasMP's Avatar
Senior Member
Flag Kerala
Thanks Meter: 339
 
More
Download Zipsigner from playstore . It will help you to sign your app through your mob. device .

Sent from my GT-S7562 using XDA Premium 4 mobile app
The Following User Says Thank You to AlfasMP For This Useful Post: [ View ] Gift AlfasMP Ad-Free
6th May 2014, 01:59 AM |#6  
munnibhai's Avatar
OP Senior Member
Flag Gujranwala
Thanks Meter: 74
 
More
hello
broken apk signer link fixed.

thanks
8th April 2015, 10:27 PM |#7  
Junior Member
Thanks Meter: 1
 
More
Error while signing file. Details:

jar signed.

Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date(2040-04-01) or after and future revocation date.

End of line

No signed apk is created. Any ideas?
19th April 2015, 06:14 PM |#8  
munnibhai's Avatar
OP Senior Member
Flag Gujranwala
Thanks Meter: 74
 
More
Quote:
Originally Posted by bwarrington85

Error while signing file. Details:

jar signed.

Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date(2040-04-01) or after and future revocation date.

End of line

No signed apk is created. Any ideas?

Its because you need to create a key first, before signing the apk

Sent from my TURBO DG2014 using XDA Free mobile app
19th April 2015, 06:36 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by munnibhai

Its because you need to create a key first, before signing the apk

Sent from my TURBO DG2014 using XDA Free mobile app

Well I followed the directions above.. Hmm
19th April 2015, 07:41 PM |#10  
munnibhai's Avatar
OP Senior Member
Flag Gujranwala
Thanks Meter: 74
 
More
Quote:
Originally Posted by bwar85

Well I followed the directions above.. Hmm

Were you able to resolve the issue? Or else please attach your apk and i have a look on it

Sent from my TURBO DG2014 using XDA Free mobile app
21st April 2015, 12:31 AM |#11  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by munnibhai

Were you able to resolve the issue? Or else please attach your apk and i have a look on it

Sent from my TURBO DG2014 using XDA Free mobile app

No, I am trying to mod a cm12 theme from the playstore. I am simply trying to replace images in the apk. I am NOT trying to release the modded apk, it is for my enjoyment only. Isnt that what your jar does?
Post Reply Subscribe to Thread

Tags
sign apk

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes