All Products
Search
Document Center

Mobile Platform as a Service:Use the mPaaS plugin

Last Updated:May 27, 2026

The mPaaS plugin provides a graphical interface that helps you quickly integrate mPaaS into your Android project and use its features.

The mPaaS plugin includes features such as Native AAR integration, Component-based integration, Basic tools, Help, and Build.

  • Native AAR integration and Component-based integration: step-by-step panels for adding mPaaS to your project. After integration, you can upgrade baselines and manage components from the same panel.

  • Basic tools: includes Hotpatching, Generate encrypted image (Apsara Stack configuration file), Generate UC Key signature information, and Generate Blue Shield image. Use these tools to prepare the assets required by mPaaS features.

  • Basic tools also includes Generate signed APK for console. Use this to generate a minimal signed APK from signature parameters before a full project build is available.

  • Help: includes Log diagnosis tool, FAQ, and View documents. Use these tools to get support when you encounter problems.

  • Build: builds the project after integration.

Add a configuration file

Adding a configuration file is the primary integration task. The mPaaS plugin supports manual import: download the configuration file from the console, then import it into your project through the plugin.

Manual import

Prerequisites

Before you begin, ensure that you have:

  • An Ant Group or Alibaba Cloud account with the mPaaS service activated

  • An application created in the mPaaS console. For more information, see Create an mPaaS application in the console

  • An Android project open in Android Studio

Procedure

  1. In Android Studio, open your project and choose mPaaS > Native AAR integration or Component-based integration. In the integration panel, click Start import under Import App Config.

  2. Select I have downloaded the configuration file (Ant-mPaaS-xxxx.config) from the console and am ready to import it into the project, and then click Next.

  3. Select the configuration file and click Finish. A success message appears after the import completes.

Native AAR integration

Procedure

  1. In Android Studio, open your project and choose mPaaS > Native AAR integration.

  2. Import the app configuration: in the integration panel, click Start import and use the manual import method to add the configuration file.

What to do next

  1. Integrate/Upgrade a baseline

  2. Configure/Update components

Component-based integration

Procedure

  1. In Android Studio, open your project and choose mPaaS > Component-based integration.

  2. Import the app configuration: in the integration panel, click Start import and use the manual import method to add the configuration file.

  3. Transform the project. If your project is a native Android project, click Install mPaaS Portal in the integration panel. In the Install mPaaS Portal window, select the original project location and the configuration file, then click OK.

What to do next

  1. Integrate/Upgrade a baseline

  2. Configure/Update components

Integrate/Upgrade a baseline

Upgrade to a regular baseline

Procedure

  1. Choose mPaaS > Native AAR integration or Component-based integration. In the integration panel, click Start configuration under Integrate/Upgrade baseline.

  2. Select the target baseline version and click OK. A success message confirms the upgrade.

What to do next

Click Upgrade baseline in the integration panel to confirm the new baseline version number.

Upgrade to a custom baseline

The standard baselines (such as 10.1.32, 10.1.60, and 10.1.68) are shared across all customers. To customize mPaaS features, submit your requirements to your mPaaS contact. The mPaaS team will create a custom baseline and provide you with a custom baseline ID. Enter this ID in the plugin to pull the custom baseline.

Prerequisites

Your Android Studio mPaaS plugin must be V2.19111217 or later. To check the current version and upgrade the plugin, see Update the mPaaS plugin.

Procedure

  1. Delete the mpaas_package.json file from your Android Studio project.

  2. Choose mPaaS > Native AAR integration or Component-based integration. In the integration panel, click Start configuration under Integrate/Upgrade baseline.

  3. In the Baseline Upgrade dialog box, select the Custom baseline checkbox and enter the custom baseline ID you received.

  4. Click OK to import the custom baseline.

Configure/Update components

mPaaS component management (AAR)

Prerequisites

You have completed the baseline upgrade.

Procedure

  1. Choose mPaaS > Native AAR integration. In the integration panel, click Start configuration under Configure/Update components.

  2. In the management window, click mPaaS Component Management. Select the module to manage, select the components to add, and click OK. For projects with multiple modules, configure each module separately.

  3. After adding the components, click OK.

Component management

Procedure

  1. Choose mPaaS > Component-based integration. In the integration panel, click Start configuration under Configure/Update components.

  2. In the Component Management window, click the buttons to install the required components.

Basic tools

The Basic tools menu includes Hotpatching, Generate encrypted image (Apsara Stack configuration file), Generate signed APK for console, Generate UC Key signature information, and Generate Blue Shield image.

Hotpatching

Enable hotpatching for your app before using this feature. For setup instructions, see Hotpatching Management: Android Integration—Hotpatching.

Generate a hotpatch

Use the Generate hotpatch feature to build a hotpatch package. The steps depend on your integration method.

  1. Select the package inputs based on your integration method.

    • For a native AAR project, provide the online APK package containing the bug and the fixed APK package. The plugin generates the hotpatch package from the code differences between the two.

      Note:

      • In the New bundle field, enter the local path of the fixed APK package.

      • In the Old bundle field, enter the local path of the buggy APK package.

      • In the Whitelist field, enter the whitelist.

    • For a component-based (Portal & Bundle) project, provide the buggy bundle package that is in use and the fixed bundle package.

      Note:

      • The bundle output path is build/intermediates/bundle/xxxx-raw.jar in the main module directory. For a release package, the path does not include -raw.

      • New bundle: Select the path of the package that contains the bug fix.

      • Old bundle: Select the path of the buggy package.

      • Whitelist: Select the .txt configuration file that specifies the classes to fix. For the file format rules, see Whitelist configuration file rules. This option is strongly recommended for native AAR projects.

      • Patch file dir: The output path for the patch package.

      • Use dexPatch: Select whether to use the dexPatch hotpatching method. The plugin supports both Andfix and dexPatch. Verify that any hotpatch package is effective before releasing the version.

        • Unselected: generates an Andfix hotpatch package, which takes effect immediately without restarting the app. Andfix has more restrictions on fixable scenarios due to device model compatibility.

        • Selected: generates a dexPatch hotpatch package, which requires killing the process to take effect. dexPatch covers more fix scenarios and has fewer device compatibility issues than Andfix.

  2. Enter the signature information to generate the hotpatch package.

    Important

    The signature file used to generate the hotpatch package must match the signature file of the running APK and the APK selected for image generation. Place the generated image in the res/drawable folder of the Portal project and name it yw_1222.jpg.

Whitelist configuration file rules

The whitelist configuration file (.txt format) specifies the classes to patch when building a hotpatch package. Include the following fields in order:

  1. The classes to be patched. Start with L, followed by the obfuscated class name. List one class per line. For example, Lxxx.xxx.clazzX.

  2. Set the patch type to dexpatch. For example, PatchType: dexpatch.

  3. Set whether it is a static bundle. The default value is true. For example, HostDex: true.

  4. Adapt to Android 11. For example, android-phone-mobilesdk-quinox-Configs: ForceEnableQSecondDex-true. Here, android-phone-mobilesdk-quinox is the bundle name. For component-based Portal & Bundle projects, replace this with the actual bundle name. For AAR integration (no bundle project), use android-phone-mobilesdk-quinox as is.

Merge patches

Only one hotpatch package can run on a given app version at a time. If a client version has two bugs, use Merge patches to combine the two hotpatch packages into one before releasing.

For example: if you have already released hotpatch package A for a specific version and then find another bug, generate hotpatch package B locally, merge A and B, then release the merged package.

Note

This section applies only to component-based (Portal & Bundle) projects. For native AAR projects, create a new patch that includes the fix on top of the original unfixed package.

Procedure
  1. Set the hotpatch package paths.

    • Merge dir: Select the directory containing all hotpatch packages to merge. Package names must end with .jar or .apk.

    • Patch file dir: Select the output directory for the merged package.

  2. Configure the signature information.

A success message appears after the merge completes.

Generate an encrypted image (Apsara Stack configuration file)

For security purposes, some mPaaS components need to encrypt content when they access the network.

  • An image with the special name yw_1222.jpg provides the key for encryption and decryption. mPaaS components automatically use this image for encryption and decryption without requiring extra operations.

  • This encrypted image is deprecated in the public cloud environment. Public cloud users can skip this section.

Prerequisites

The encrypted image is bound to the APK signature. Prepare a signed APK for the Portal project before proceeding. For signing steps, see Sign your app on the Android developer site.

Note
  • The APK must use the same signature file as the Published Version APK.

  • The generated encrypted image works only with that APK project.

Procedure

Generate the encrypted image using the mPaaS plugin:

  1. In Android Studio, choose mPaaS > Basic tools > Generate encrypted image (Apsara Stack configuration file).

  2. In the Release Apk field, select the signed APK file of the Portal project. The RSA field is populated automatically.

  3. In the mPaaS Config File field, select the .config file of the Portal project. The workSpaceId, appId, and packageName fields are populated automatically. If not, fill them in from the project's .config file.

  4. Enter the appsecret.

    Note: As a server-side administrator, query the appsecret corresponding to the appid from the console.

  5. In the jpg Version field, enter the Security Guard image version number.

    Note

    Check the securityguard version in the build.gradle file of the Portal project's main module. If the version is earlier than 5.4, enter 4. For example, if the baseline provides securityguard-build:5.1.38.180402194514, enter 4. Otherwise, enter 5.

  6. In the outPath field, select the local output path for yw_1222.jpg.

  7. Click OK to generate the encrypted image.

Usage

  1. Save yw_1222.jpg to the res/drawable folder of the Portal project.

  2. If you use ProGuard, prevent the encrypted image from being obfuscated.

    1. Check whether the following is configured in build.gradle:

      minifyEnabled true
      shrinkResources true
    2. If this configuration exists, create a keep.xml file in the res/raw directory to exempt the encrypted image from obfuscation:

      <?xml version="1.0" encoding="utf-8"?>
      <resources xmlns:tools="http://schemas.android.com/tools"
      tools:keep="@drawable/yw_1222*" /><!--tools:discard="@layout/unused2"-->

Generate a Blue Shield image

If the absBase64Code value in the .config file downloaded from the mPaaS console is empty, run the Generate Blue Shield image operation. This applies to Apsara Stack scenarios.

Important

If you are in a public cloud environment and the absBase64Code value is empty, upload a correctly signed APK first, then download the .config file again. For details, see Fill in configuration information and upload the signed APK.

Choose mPaaS > Basic tools > Generate Blue Shield encrypted image, enter the required information, and generate the image.

Key parameters:

  • Release Apk: The signed release APK from the mPaaS-integrated project.

  • MD5: Populated automatically after you upload the release APK. This is the public md5 key of the APK package.

  • mPaaS config File: Click Download Config in the mPaaS console to download the .config file, then provide it here.

  • appSecret: View this value in the mPaaS console.

  • appId, packageName, and outPath are detected and populated automatically after you provide the preceding inputs.

Add the generated image to the assets directory of the project.

Generate a signed APK for the console

When obtaining a configuration file from the mPaaS console, you must upload a signed APK. If you have not yet created a project or compiled a signed APK, this requirement blocks the process. The Generate signed APK for console feature resolves this by generating a signed APK using only signature-related parameters.

Generation

  1. Choose mPaaS > Basic tools > Generate signed APK for console to open the Construct Signed APK page.

  2. Enter the required configuration information.

  3. Click OK to generate the signed APK file.

  4. Click Reveal in Finder to locate the generated file, named mpaas-signed.apk.

    This APK file is small and already signed.

Generate UC Key signature information

Integrating the UC software development kit (SDK) resolves compatibility issues with various vendor browsers. Before adding the UC SDK, apply for UC SDK authorization. This feature helps you quickly obtain the authorization. The following section describes the end-to-end procedure for applying for UC SDK authorization.

Note

This feature has been available since V2.20062211. For more information, see V2.20062211 Release Notes.

Procedure

  1. Add the UC Kernel (UCCORE) dependency to your project.

  2. Provide the application's Android native package name.

  3. Choose mPaaS > Basic tools > Generate UC Key signature information to open the Query Signature Information page.

  4. Enter the required configuration information and click Next.

  5. Copy the retrieved SHA1 information.

  6. Fill out and submit the UC key application form.

    Note

    Due to a change in product strategy, UC no longer accepts public applications. Since December 1, 2022, public applications for UC Keys are not supported. Fill out the form with the relevant information — the mPaaS team will review your application and provide feedback.

  7. Add the obtained key to the AndroidManifest.xml file of the Portal project: <meta-data android:name="UCSDKAppKey" android:value="the key you applied for"/>.

    Note

    UC SDK authorization is bound to the APK's package name and signature. If UCWebView does not work, verify that the signature and package name match those used during the application.

Help

Log diagnosis tool

  1. Choose mPaaS > Help > Log diagnosis tool.

  2. Paste the log content into the input box and click Next.

  3. Wait for the analysis to complete.

  4. Review the results. Each result includes the cause and solution. Update your code based on the specific information provided.

  5. After making the changes, click Finish to close the window.

FAQ

Choose mPaaS > Help > FAQ to open the Android Integration FAQ, which lists common issues encountered during integration.

View documents

Choose mPaaS > Help > View documents to open the mPaaS Documentation Center and browse documentation for each component.

Build

In Android Studio, choose mPaaS > Build to build the project.