With every Mattermost mobile app release, we publish the Android unsigned apk in in the GitHub Releases page. This guide describes the steps needed to modify and sign the app, so it can be distributed and installed on Android devices.
join, etc., commands.
greplet you work with text.
sign-androidscript to sign the Android app.
Usage: sign-android <unsigned apk file> [-e|--extract path] [-p|--package-id packageID] [-g|--google-services path] [-d|--display-name displayName] outputApk Usage: sign-android -h|--help Options: -e, --extract path (Optional) Path to extract the unsigned APK file. By default the path of the unsigned APK is used. -p, --package-id packageID (Optional) Specify the unique Android application ID. -g, --google-services path (Optional) Path to the google-services.json file. Will setup the Firebase to receive Push Notifications. Warning: will apply only if packageID is set. -d, --display-name displayName (Optional) Specify new application display name. By default "Mattermost" is used. -h, --help Display help message.
Now that all requirements are met, it’s time to sign the Mattermost app for Android. Most of the options of the signing tool are optional but you should really be using your own
google services settings and maybe change the
sign-androidscript it is executable.
$ ls -la total 49756 drwxr-xr-x 4 user staff 128 Oct 2 08:12 . drwx------@ 59 user staff 1888 Oct 1 14:12 .. -rw-r--r-- 1 user staff 50685064 Sep 29 10:58 Mattermost-unsigned.apk -rw-r--r-- 1 user staff 2597 Oct 2 08:19 google-services.json -rwxr-xr-x 1 user staff 7005 Sep 30 12:47 sign-android
$ ./sign-android Mattermost-unsigned.apk -p com.example.test -g google-services.json -d "My App" MyApp-signed.apk
Once the code sign is complete you should have a signed APK in the working directory with the name MyApp-signed.apk.
The app name can be anything but be sure to use double quotes if the name includes white spaces. If you are using a
Google Services JSON file, you need to specify a
package identifier that has a corresponding client in the JSON configuration file.