Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Child pages (Children Display)

Signing your APK’s

APK signatures allow developers to identify the author of the application and to update their application without creating complicated interfaces and permissions. Every APK that is run on the Android platform must be signed by the developer. Applications that attempt to install without being signed will be rejected by the package installer on the Android device.

Multiple APK’s can share the same signature.

Signing your APK’s

A Keystore file contains collections of keys, a specified key from a keystore is used to sign an APK. Please ensure your Keystore file is stored somewhere secure and can be retrieved when needing to build APK’s.

Android Studio

Launch Service and Launch Client both belong under the Motive.Android project.

Launch Service is an APK that houses the service-config.json used to configure Motive App communication endpoints and credentials.

Launch Client is an .aar module that is imported into Motive App’s during development, this Launch Client communicates with Launch Service to pull configurations should the Launch Service be present.

  1. From the LaunchService project. Navigate to BuildGenerate Signed Bundle / APK…

...

2. Choose APK

...

3. Choose Create new… if going through first time setup, otherwise Choose existing… and re-use the key.

Note

The first password field refers to the Keystore’s password. The second field refers to the intial Key’s password.

The fields shown filled out are the necessary fields. Ensure these passwords are logged somewhere secure as you’ll require them during each APK build on either Android Studio, Unity, or through CLI.

...

Note

Android Studio defaults to creating “keystore” files with extension .jks, rename this extension to .keystore. This is necessary as Unity does not recognize .jks files.

.jks and .keystore have no differences and operate the same.

4. With the Generate Signed Bundle or APK window now being populated with your new keystore’s values. Select Next.

...

5. Choose the Build Variant that you desire and select ONLY the V2 (Full APK Signature) checkbox

...

6. Singed APK is now built! Use the toast notification to easily navigate to its output location.

...

Note

If a signed build already exists, the build will not overwrite the previous build. You must manually delete/rename/move the previous build.

Unity

Unity follows a similar process as Android Studio but is slightly less user friendly.

Keystore Manager… provides an interface to create a new keystore OR to add a new key to an existing keystore.

Custom Keystore must be checked.

...

...

and secure Android applications.

Keystore Management

Android Studio

Android studio offers a nice UI for managing keystore files.

Under Build → Generate Signed Bundle / APK → APK

...

Unity

Under Project Settings Player → Publishing Settings

...

Select your .keystore file

  1. If none exists, you can create one using the Keystore Manager…

...

Input your keystore password, when complete press Tab.

  1. Incorrect password’s throw a Unity console error. A correct password input will enable the Project Key section.

...

Input your key’s password, when complete press Tab.

...

...

It is worth noting that Unity’s UI does not provide much feedback during keystore management and usage. If you input a password incorrectly, only the Unity console will throw an error.