android gcs signing the apk to be able to use google maps.

jhitesma edited this page Oct 14, 2014 · 9 revisions
  • Create your key keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
  • List your keys keytool -list -v -keystore my-release-key.keystore it will output something like:
Alias name: mykey
Creation date: Sep 8, 2013
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=XXX, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Issuer: CN=XXX, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Serial number: XXX
Valid from: Sun Sep 08 20:55:45 WEST 2013 until: Sat Dec 07 19:55:45 WET 2013
Certificate fingerprints:
         MD5:  XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
         SHA1: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
         Signature algorithm name: SHA1withDSA
         Version: 3
  • On your browser navigate to Google API console and click "Create Project"
  • Under "Services" enable Google Maps Android API v2 and accept terms

  • Under "API Access" click "Generate new Android key..."
  • Fill the form with the content of your SHA1 and the name of the package
  • Change the NEW_VALUE on AndroidManifest.xml line <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="NEW_VALUE"/> with the value of your newly created API key (red rectangle below).
  • Build the android gcs in release mode make androidgcs ANDROIDGCS_BUILD_CONF=release
  • Sign the package jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore PATH_TO_APK/androidgcs-release-unsigned.apk mykey replacing the PATH_TO_APK to where your new apk is located
  • Rename the androidgcs-release-unsigned.apk to androidgcs-release.apk and run make androidgcs_install ANDROIDGCS_BUILD_CONF=release

To automatically type the password for your key create a file "ant.properties" in androidgcs

key.alias=taulabs.org
key.store.password=your_password
key.store=/path/to/your/key
key.lias.password=your_password
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.