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

Search This thread

munnibhai

Senior Member
Nov 14, 2012
188
72
Gujranwala
Thank you, your method works well good for all app.

But for this application "Advanced Permission Manager" by steelworks on google playstore.

Signed process working well, app initially runs good but app main function not working after repacking apk and signed.

It will throw exception "FileNotFoundException: .x509.pem"

What is that exception? I tried every method, I searched whole internet no single solution.:(
The purpose of attached APK signer is that you can build your very own personal keystore and save it somewhere for future use in case you require to upload your updated APK to google playstore,

Playstore will not let you upload updated APK if APK was signed using different keystores for each
 

alibaba42

New member
Mar 22, 2016
1
0
keystore issue?

hi there i have used the tool to sign a zip file which is a firmware. However, i still get the E:footer wrong error when trying to flash the update.

I suspect that the keystore in the original files is not matching with the keystore i made up and used with your tool.

is there anyway i can make them match?

is this even the problem or am i completely stupid? :(

thank you very much
 

xpmule

Senior Member
Oct 14, 2015
329
155
Great job worked great for me on Windows 7 x64 with..
C:\Program Files\Java\jdk1.8.0_92\bin
 

munnibhai

Senior Member
Nov 14, 2012
188
72
Gujranwala
is there anyway i can make them match?
is this even the problem or am i completely stupid? :(
thank you very much

I am sorry to hear that but there is no way you can match two different keystores. If keystore file is lost, there is no way to either extract it from apk.

java.io filenotfoundexception
I have a problem with it help me plz

You do not have either Java Development Kit installed or you have not specified its path in the signer program
 

btb55

Senior Member
Jan 18, 2013
309
110
Thank you for this guide, it worked perfectly for me.

I decompiled an apk (using APK-Studio from XDA), made the changes I wanted (removed root detection), built the modified apk, then followed your guide here to sign and align the new apk. The modded apk installs and runs now, whereas before it wouldn't.

Thank you for the easy to follow guide and links to required files.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    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

    i6xi.jpg

    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.

    u5ak.jpg


    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
    1
    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
    1
    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?

    I used apktool. I give up on trying to edit apks. There are no tutorials that work.

    I am sorry to hear about that, well, apk editing isnt diffictult, apart from decoding java files and then actually coding them again (lets leave it to java programmers)

    About editing graphics and XMLs in apk, its easy, ask me anything you want.
    1
    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?

    ok, I got to the root of error.
    The problem is JDK8 and 7 too probably. The jarsigner provided with these 2 versions, is timestamped now and while we try to sign an apk using the sign.jar, jarsogner isnt finding any timestamp on it.

    So you will either need to downgrade to JDK6 (just install as additional and give path to it in sign.jar) and it will work
    1
    Well your sign.jar completed all tasks with no errors and the app installs but is then rejected by the cm12 theme engine and automatically uninstalls.

    So I took the original cm12 theme apk, removed the Meta-inf folder, used sign.jar, and it works.

    My error must be in editing the .pngs images within the theme I'm guessing. Im using photoshop 7 to invert colors on the .pngs and saving. Why does changing the .pngs affect the apk from installing I wonder?

    So I'll give thanks, your sign.jar does infact work with JDK 6

    *edit: Cant give thanks? Hmm no thanks button...

    I am glad that it worked afterall.

    1. About the PNGs, there are some with .9 extension in them, if you noticed, they have those black lines around them which must not be touched, they have to be with #000 color. This could be one of problems while you just changed colors.

    2. Another issue maybe RGB profile (I am not sure if this setting is available in Ph.7) of photoshop, so goto Edit : Color Settings : RGB : <select "Monitor RGB">. Save and Restart.

    Let me know if it worked.