Offline instrumentation for Android apps

With Perfecto, you can instrument Android applications even if you are subjected to network and security restrictions that do not allow you to connect through the internet to Perfecto servers. Any of the following reasons may prevent you from leveraging Perfecto's online instrumentation service:

  • Your build environment is not connected to the internet

  • Your organization's security team does not permit online app transfer

  • Performance considerations prevent you from connecting to the online instrumentation service

  • You have to sign your app with your organization's certificate and this prevents you from performing instrumentation during Perfecto's online app installation process

If any of these restrictions apply to you, contact Perfecto Support about Perfecto's offline instrumentation option for Android applications, a CLI instrumentation tool.

The tool instruments .apk, .apks, and .aab files on your own machine before you upload them for testing. It supports object (hybrid) instrumentation, camera injection, fingerprint injection, and secure-screen removal. You can combine instrumentation types in a single run.

Prerequisites

Perfecto's offline instrumentation tool for Android requires the following:

  • Access to the application file to be instrumented

  • Java 17 or later

  • The latest offline instrumentation bundle, available from Perfecto Support

  • An installation path that contains only English letters, digits, hyphens, underscores, dots, and parentheses

  • On Windows, an Administrator terminal for installation. Elevation is required to create symbolic links for the bundled Android build tools.

Limitations

Perfecto only supports the latest version of the offline instrumentation tool. Make sure you always run the latest version of this tool. To request the latest version, contact Perfecto Support .

If you are not sure which version you use, run the tool with the optional parameter -V to display the current version.

If you are not sure which version is the latest version, see our Release highlights.

An .aab input produces an instrumented .apks file, not an .aab file. An .apk or .apks input retains its file type on output.

Do not instrument an app that has already been instrumented. Instrumenting the output file again can corrupt it.

  • If the output folder already contains a file with the same name as the result, the tool overwrites it.

What's next?

Run offline instrumentation on Android apps