How to sign an android APK, a simplest way

Hello all..

This post is also about how to sign an android apk to publish it to the android market.
I have already shown another method to sign the apk, which is through the command line.

How to sign an android APK ? – a simplest way

Here is another simple method without using the command line options to create a keystore file and then sign your apk to upload to the android or any other markets such as amazon markets.

1. OK we will start by creating a sample project named “Test”.

Look at the screenshot 1.

2. Now double click on the AndroidManifest.xml file.
Set the appropriate version number and version code for your project.

3. Now below this there is a link called “use the export wizard”. Click on that.

then another window will open, there select your desired project.

4. click Next, then you will be asked for a keystore, if you have a keystore file then browse and locate the file.
OR
Create a new one.
If you have a keystore file the after locating the file you have to give the password.

Click on Finish and your APK file will be created in the destination directory.

If you are creating a new one then…

Go through these steps by filling in the details that appear in the dialog.

Clicking on Finish will create your signed APK.

5. Now Give a location for you signed apk file.- Click finish -> Your signed APK is ready for upload to the market.

Please leave your valuable comments on this post. PLease share it if you like this post, so that it will be helpful to others also.

How to install an APK into your device or emulator through command prompt or shell.

In this post I will show you how to install an apk on to the emulator or the device through the shell or command prompt.
Before experimenting with this post I assume that you have these done

1. Installed the Android SDK.
2. Added the adb path to the environment path.

This is how you add the path to the environment variable.

On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to your $SDK_ROOT/tools to it. If you don’t see a line setting the path, you can add one:

export PATH=${PATH}: On a Mac, look in your home directory for .bash_profile and proceed as for Linux. You can create the .bash_profile, if you haven’t already set one up on your machine.
On Windows, right click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path under System Variables, and add the full path to the tools/ directory under $SDK_ROOT to it.

Now In windows Go to command prompt and type

C: adb devices

if you have correctly set your path then your android devices will be listed here.

then copy your apk to the C: directory and issue this command

C:adb install your_apk.apk

Take a look at the screenshot. Here I am installing CreateTable.apk that is located in the C: directory.

Install the APK onto emulator.

Install the APK onto emulator or device