Modifying the K2 Mobile app for Android

  • 16 February 2021
  • 0 replies

Userlevel 4
Badge +16


Modifying the K2 Mobile app for Android


This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.


The following article is ONLY  for the K2 Mobile for Android app. If you are using the K2 Workspace for Android, see the following MDM topic.


This article describes how to make changes to the K2 Mobile for Android app so that a modified version can be distributed through any MDM or enterprise store. Please see the Distributing K2 Mobile with Mobile Device Management (MDM) software article for an overview of deploying the mobile app with MDM software.

See the K2 Mobile Support Policy for questions related to support of MDM software.
MDM software provides security management for mobile devices. MDM software is used to manage user devices. For example, you can enforce a connection to a particular server on the specified port. You can also change the K2 Mobile app branding and distribute the app without using MDM software.





To distribute an app using an MDM platform, you need the unsigned K2 Mobile for Android app. K2 provides this app to customers with a current maintenance agreement; contact your K2 representative for details. You can then make changes to the configuration file, such as the default server value and other settings. Not every setting is exposed in the configuration file. For instance, the user name and password are stored on the device following Android’s security guidelines.

To change the application icon and title, you have to use the APK Icon Editor. Note that the APK Icon Editor is recommended but not supported by K2.


The configuration file is packaged within the app. By changing the app file extension from .apk to .zip, you will find the configuration file (inside the assets folder) and can edit it using a standard text editor. Once you’re done editing it, you can change the app file extension back to .apk. Then sign the app using your own signing key (not provided by K2) in order to distribute the app.

Many MDM software platforms do the signing automatically for you. As K2 does not test with any specific MDM software, if you have any questions about signing and distributing your customized app, contact your MDM software vendor.

Steps for Installing & Using the APK Icon Editor

If you do not have the APK Icon Editor, download it here.

Note for Mac users: When you open the APK Icon Editor App, you may get a security warning. If you do, close the notification and open your System Preferences. Navigate to Security and Privacy, located at the top of the window. Click the General tab, and then click the lock icon at the bottom of the window to allow changes. Enter your password when prompted. Under the bottom section, you will find Allow apps downloaded from: and you will see the APK Icon was blocked from opening. Click Open anyway and a new window will open asking for confirmation Click Open and then you can open the APK Icon Editor app.

Once you have the APK Icon Editor application open, perform these steps:

  1. Drag the K2 Mobile app for Android APK into the window.

  2. Click the Properties tab.

  3. Click the Repacking button.

  4. In the repacking options window, select the second radio button: Use Apktool repacking.

  5. Click OK, a confirmation Dialogue will appear, click Yes.

You now have access to change the icon and application name. When changing the application name, be sure to click Apply to All before packing the APK.

Once complete, pack and save the APK file – it is now ready for distribution.

Steps for Modifying the K2 Mobile for Android app

There are a number of items you can modify in the app before distributing it within your organization. Follow these steps to modify the default appearance and settings:

  1. Download the unsigned version of the K2 Mobile app (the .apk file) from the K2 customer portal.

  2. Rename the file extension from .apk to .zip.

  3. Extract the K2 file.

  4. Browse to the assets folder and open the file in a text editor.

  5. Make changes to the file as needed (described in the examples below).

  6. Zip the extracted files then rename the file to something of your choice with a file extension of .apk, such as K2_Mobile.apk.

Changing the Values

Change the values in the file but use only true or false values and, when changing text color, use the hex color code of the color you choose (you can find converters online). Note that images must be the same pixel size as those in the APK.

# Copyright (c) 2015. K2 Workflow. All rights reserved
# NOTE : All colors must have a full hex of #RRGGBB or the application will not run

# Values for the startup screen of the application and the login screen

# Values for the menu

#default input values

Changing the Default Server Value

In the file, you can include a key for DEFAULT_SERVER_VALUE.

Should you leave the DEFAULT_SERVER_VALUE empty, no default will be set.

DEFAULT_SEVER_VALUE will change the default value when the app is added to your device. The user can change this setting using the app.


Branding the K2 Mobile app

You can customizethe K2 Mobile app to include your company's name and branded images.

  1. To update icons, use the APK Icon Editor, as described earlier. Be sure to match your icons to the K2 Mobile app default sizes.

  2. To customize the K2 logos used on the splash screen of the application, set the REPLACE_K2_LOGO and the USE_CUSTOM_COMPANY_LOGO values to true. Copy your own logo into the assets folder and replace the value of CUSTOM_COMPANY_LOGO_FILENAME with your file name as illustrated in example above.

  3. To change the banner inside the menu of the application, set the value of USE_CUSTOM_COMAPANY_LOGO to true. Copy your image into the assets folder and set the value of CUSTOM_COMPANY_BANNER_FILENAME to the full file name of your image. Set the username and email text color with the USERNAME_AND_EMAIL_TEXT_COLOR field, and the background color around the custom banner with the CUSTOM_COMPANY_BANNER_BACKGROUND_COLOR field.


0 replies

Be the first to reply!