Android app wrapping parameters

MaaS360® allows you to define custom app wrapping configuration parameters for enterprise apps.

Follow these steps to add app wrapping parameters:

  1. From the MaaS360 Portal Home page, select Apps > Catalog. The App Catalog page is displayed.
  2. Click Add, expand the Android section, and then select Enterprise App for Android. The Enterprise App for Android window is displayed.
  3. Click the Configuration tab and then provide advanced parameters in the form of key-value pairs.
The following table lists the app wrapping parameters:
Parameter Possible values Description
overrideNetworkParams true, false

Default value: true

If this setting is true, MaaS360 overrides the SSL Socket Factory and the Trust Handler in URL Connection if the Gateway is enabled. If this setting is false, you can use your own implementation, but the Gateway will not work.
packagesToRemove comma-separated package names MaaS360 throws an exception if the app contains numerous libraries. MaaS360 supports features such as split dex and multidex to overcome such scenarios, but an exception is triggered when the number of libraries in the DEX files exceed the allowed limit despite partitioning the DEX files. You can overcome this exception by removing certain packages from the final APK file such as support libraries and unnecessary play services.

Example: packagesToRemove=com.sun,com.apple

packagesToSkipCodeInjection comma-separated package names MaaS360 throws an exception when certain packages in the application are manipulated. You can use the following configuration parameter to exempt such packages from code injection or manipulation.

Example: packagesToSkipCodeInjection=com.bing,com.you

ignoreNotificationRestrictions true, false

Default value: false

If this setting is true, MaaS360 does not extend Android's Notification Manager and ignores notification restrictions. This parameter is supported only on Android OS version 5.0 and later.
httpClientLibVersion 1.1.1, 1.1.2, 1.2.0

Default value: 1.2.0

The httpClientLibrary version that must be included in the wrapped APK file. There are three versions of the ch-boye httpClient Library that are incompatible with each other.
disableD8Check true, false MaaS360 does not currently support decompiling apps that are compiled with the D8 dex compiler. For the MaaS360 10.71 platform release, MaaS360 displays an error message if apps are compiled with D8. To overcome this error, do one of the following:
  • Navigate to the gradle.properties file and set the android.enableD8 to false and compile the app again.
  • Set the disableD8Check to false, which disables the D8 check during wrapping.
protectRetrofitMethod true, false When the Retrofit library is used, the responseBodyConverter method in the library throws the following exceptions:
  • ClassNotFoundException
  • NoClassDefFoundError
Set the protectRetrofitMethod to true to avoid the exception.
continueSplitDex true, false

Default value: true

When a large number of methods are detected in the app, MaaS360 automatically retains important classes in the primary dex file and moves other classes to a secondary dex file in the background. If this setting is false, MaaS360 displays a user interface to allow classes to be manually moved to primary dex file.
enableAAPT2 true, false

Default value: true

To avoid compilation failures when wrapping the apps built with AAPT2 (the latest resource packaging tool), enableAAPT2 is set to true by default.
coreLibraryRequired true, false When developing the app, if the additionalParameters =["--core-library"] library is used in dexOptions in the build.gradle file, app compilation will fail and the trouble processing "javax/xml/bind/Binder.class error message is displayed. To avoid a compilation failure during app wrapping, the coreLibraryRequired parameter must be set to true.
enableExtractNativeLib true, false

Default value: false

Set this parameter to true to avoid the following error message:

Failure [INSTALL_FAILED_INVALID_APK: INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2]