Android Tech Help – How to Digitally Sign an Android App Before Publishing to Android Market
17 Aug. 2015 Mobile App
Before installing an Android app on your mobile device or uploading on Google Play store, you need to first digitally sign your app with a digital certificate. Android uses this certificate for identifying the author of the app and the certificate can be signed by using developer’s private key. This article explains you – How to digitally sign your app using your developer keys. We’ll be using Eclipse ADT for signing in this example.
How to Sign Your Android App?
I am trying to sign my apk file, but I can’t figure out how to do it. I require in-depth directions for digitally signing my Android mobile app before uploading it to Google Play store.
We ‘ll use a standard JDK tool called jarsigner for creating keys for a standard APK file as it is coded with standard Java Archive (JAR) format.
You can also sign your app using Map API keys if required, but first you need to create an unsigned version for attaching a digital certificate to your app. To do that, in the Package Explorer window of Eclipse, right-click on your project name. (Please refer to the screenshot below)
Creating Unsigned Version in Eclipse for Android APK
You’ll get a long pop-up menu; toward the bottom, click on Android Tools.
You’ll see another set of menu list that includes the item you want: “Export Unsigned Application Package…“.
By clicking on this option, it will take you to a File Save dialog box, where you can pick the location to save the unsigned version of your apk file on your workstation.
After finishing unsigned operation, you can now go ahead and sign your apk file using jarsigner.
How to Digitally Sign APK File using jarsigner
Open a terminal or command window in the directory where you stored the unsigned apk file. For example: If you want to sign your app titled “MyApp”, use this key with the below code (BROKEN XREF TO RECIPE -1 ‘Creating a Signing Certificate|generated earlier’):
$ jarsigner -verbose -keystore myapp.keystore MyApp.apk mykey
After hitting the command above, you will now have a signed version of your application that can be loaded and run on any Android device. But before you send it to the Google Play store, there’s one more step.You have to re-build your application, so you must test it again, on real devices.
If you don’t have a real device, get one. Or you can save costs by outsourcing the testing to an independent testing company like ours.
We’ve helped many organizations tackle major challenges faced during mobile application development and testing. Our team of Android developers deliver quality results in a budgeted time frame.
Are you looking for a testing company to help independantly verify the android app you’ve developed?
Feel free to check our blog explaining Best practicies for Mobile Application Testing.
You can also see more information on our Android App Development capabilities and Mobile Testing capabilities here.