How to Sign an Already Compiled APK

How to Sign an Already Compiled Apk

create a key using

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

then sign the apk using :

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name

check here for more info

how to sign a already compiled apk?

Use haibision apk signer from github

How to correctly re-compile an apk file?

The following is for your reference


Compile, decompile and sign APK using apktool utility.

  1. Download latest apktool version.

  2. Download the batch file and aapt.exe.

  3. Create a folder anywhere in the PC and put all the apktool.jar, aapt.exe and the batch script in that folder.

  4. Open command prompt.

  5. Navigate to the folder where you placed apktool.jar, batch script and the aapt.exe.

  6. Now, you need to install the file using the " IF " command.

  7. Type the following command.

    apktool if name-of-the-app.apk

  8. For decompiling use the command "d". The "d" stands for decompile.

    apktool d name-of-the-app.apk

  9. After the app is correctly decompiled, a new folder will be created in the same folder where you placed your app. This contains all the xml's and smali files which can be edited for different mode's.

  10. To recompile the app use the following command " B ". The "b" simply means recompile.

    apktool b name-of-the-app-folder

  11. The final modded app will be in the "dist" folder located inside the original app folder created by apktool.

Signing the apk

  1. open a new command prompt and change into the sign-apk directory using cmd

  2. move the modified-unsigned apk into this folder

  3. then type the following command -

    java -jar signapk.jar certificate.pem key.pk8 path-of-the-folder-contaning-the-apk.apk path-of-the-new-signed-apk.apk

  4. Once compiled, the signed apk will be found in the same folder.

Can I re-sign an .apk with a different certificate than what it came with?

try this

1) Change the extension of your .apk to .zip


2) Open and remove the folder META-INF


3) Change the extension to .apk


4) Use the jarsigner and zipalign with your new keystore.

hope it helps

How to sign an android apk file

The manual is clear enough. Please specify what part you get stuck with after you work through it, I'd suggest:

https://developer.android.com/studio/publish/app-signing.html

Okay, a small overview without reference or eclipse around, so leave some space for errors, but it works like this

  • Open your project in eclipse
  • Press right-mouse - > tools (android tools?) - > export signed application (apk?)
  • Go through the wizard:
  • Make a new key-store. remember that password
  • Sign your app
  • Save it etc.

Also, from the link:

Compile and sign with Eclipse ADT

If you are using Eclipse with the ADT
plugin, you can use the Export Wizard
to export a signed .apk (and even
create a new keystore, if necessary).
The Export Wizard performs all the
interaction with the Keytool and
Jarsigner for you, which allows you to
sign the package using a GUI instead
of performing the manual procedures to
compile, sign, and align, as discussed
above. Once the wizard has compiled
and signed your package, it will also
perform package alignment with
zip align. Because the Export Wizard
uses both Keytool and Jarsigner, you
should ensure that they are accessible
on your computer, as described above
in the Basic Setup for Signing.

To create a signed and aligned .apk in
Eclipse:

  1. Select the project in the Package Explorer and select File >
    Export.
  2. Open the Android folder, select Export Android Application, and click
    Next.

    The Export Android Application wizard now starts, which will guide
    you through the process of signing
    your application, including steps for
    selecting the private key with which
    to sign the .apk (or creating a new
    keystore and private key).

  3. Complete the Export Wizard and your application will be compiled,
    signed, aligned, and ready for
    distribution.

How to sign a modded apk on mac with apktool

Got my solution- I use keytool, Jarsigner and zipalign from JDK by using following commands in terminal

To generate keystore

keytool -genkey -v -keystore my-keystore.keystore -alias name_alias -keyalg RSA -validity 10000

To sign an apk

jarsigner -verbose -keystore <path of my-keystore.keystore> <path of apk>  name_alias

To zip align an apk

zipalign -f -v 4 <your.apk >  <your_aligned.apk>

Cannot install an already COMPILED & SIGNED Apk file

On some emulators, release build does not work. Don't worry, go ahead and upload on PlayStore. Btw you can test it on real device though.

For your new question:
It should work on on devices with api levels from 16 to 27. Release builds should always be tested on real devices.
Release the app as alpha on PlayStore and ask your people to test it.



Related Topics



Leave a reply



Submit