How to Sign an Android APK File

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 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.

What is the easiest way to sign an Android apk file in Android Studio?

You can create a keystore from Android Studio itself.

Just go to Build -> Generate Signed APK -> Select your module. You will be able to select an existing keystore or to create one. To create it, you will need to enter a few informations about yourself, and two passphrases, one for the keystore and one for the alias. Then you will be able to sign your apk. Later, you will have to reuse the same keystore.

Make sure to save the keystore, because only the apps signed with it will be allowed to be uploaded to the Play Store, and to update on devices.

For more informations, as always, Android documentation

Generate signed apk android studio

Use Keytool binary or exe to generate a private keystore. Instructions here. You can then sign your app using this keystore. Keytool gets installed when you install Java.

NOTE: Save/backup this keystore because once you publish an app on play by signing it with this keystore, you will have to use the same keystore for any future updates. So, it's important that you back it up.

HTH.



Related Topics



Leave a reply



Submit