diff options
author | Dave Arter <davea@mysociety.org> | 2017-04-10 12:37:23 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-06-22 16:29:37 +0100 |
commit | f19ac095f0c589bff68d4629576bc958ecdab1b3 (patch) | |
tree | 78e6f307e8ddc11cffaba349371c9a3315f1a3a0 | |
parent | 3f41fa63b5604e7a64a09e2f3bb391dc7486867c (diff) |
Update Android build instructions to automatically sign/align APK
-rw-r--r-- | README.md | 22 |
1 files changed, 4 insertions, 18 deletions
@@ -155,24 +155,10 @@ Releasing ### Android To release the app on Android, you need to do the following: -1. Change your config.js to include production settings -2. Bump the version code in config.xml, both the main one and the android specific one -2. Build a release version of the app: `cordova build android --release` -3. Sign that `.apk` (the cordova command tells you where it put it): - 1. Clone the mySociety keys repository - 2. `cd` into the folder containing your new release `.apk` - 3. Sign the .apk with our key: `jarsigner -verbose -keystore <path-to-keys-repo>keys/android/android_keystore -sigalg SHA1withRSA -digestalg SHA1 ZuriWieNeu-release-unsigned.apk fixmyzurich` Double check that you're signing the right .apk here as there - will be debug ones too. - - This will ask first for a password for the keystore (it's in the usual place - if you're a mysociety developer), then a password for the app specific key, - (`fixmyzurich` in the command above is a special shortname for the app that - identifies which key to use.) -4. Verify that the signing was ok: `jarsigner -verify -verbose -certs ZuriWieNeu-release-unsigned.apk` (The signing doesn't change the name of your `.apk`). You should -see `sm` next to every file. -5. Align the `.apk` using `zipalign` (Note, you might have to manually find `zipalign` in `build-tools` inside the sdk-folder): `zipalign -v 4 ZuriWieNeu-release-unsigned.apk ZuriWieNeu.apk` - -Note: most of this comes from: http://developer.android.com/tools/publishing/app-signing.html#signing-manually, you can also do it via Eclipse or Android Studio if you wish. + 1. Change your `config.js` to include production settings + 1. Bump the version code in `config.xml`, both the main one and the android specific one + 1. Clone the mySociety keys repository + 1. Build a release version of the app: `cordova build android --release -- --keystore="/path/to/keys_repo/android/android_keystore" --alias=<fixmystreet|cuidomiciudad|etc>` ### iOS |