Using debug apks with hockeyapp

Hi all,

I have a legacy app that I built in Ionic 1 and deployed in-house via HockeyApp. I had to do an update recently (after about 6 months) and ran into what I believe is inconsistent signatures of the APK.

Here’s the rub: originally, I was not so knowledgeable about keystores, so I never generated a keystore and was building my APK using ‘cordova build android --debug’ and then just uploading the build to HockeyApp. Everything was fine, but I noticed that now that I have two machines, only the APK from the machine I originally used to develop the app will successfully install over top of an existing deployed app on a device. The other returns ‘install failed’, and I’m assuming it’s because the debug certificate on the new machine doesn’t match the original.

So – given that I already have these APKs deployed in the wild, what should be my approach to guaranteeing that I can build future updates that have the correct signature, even if my original machine goes kaput or is otherwise not available?

Thanks,
Marc

For release you should generate a self signed release certificate

keytool -genkey -v -keystore my-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Store this in a secure location and use this single key store for future app signing.

As for the already uploaded apps you can’t do much about it now.
Some of the ideas:

  1. Create a new APK with changed package name and sign it with release keystore
  2. Unplublish the older version and use the new
    Although this will be treated as a whole new application rather than an update over previous version this will prevent user’s from installing the older version.

You can push an update/push notification on the older app which redirects user to install the new version or you can wait for unpublished app to expire if that happens

Hm. Ok. So there’s no way to export the debug keystore from one computer and use it on the other?

Marc

You can export your debug keystore from one machine to another
It will typically present at:

Windows: C:\User\YourUser\.android\debug.keystore
Mac: ~/.android/debug.keystore

Default names/passwords:

Keystore name: "debug.keystore"
Keystore password: "android"
Key alias: "androiddebugkey"
Key password: "android"
CN: "CN=Android Debug,O=Android,C=US"

Although its not advisable to use debug keystore for releasing app as updating sdk / build tools might regenerate the debug key. Also these apps won’t upload on playstore

That’s fine, this is for an internal deployment only and won’t be released on Play store. Thanks for the tips, I will see what I can do!

Marc