Parameters for Android offline instrumentation

Learn more about the parameters you can use when instrumenting Android apps offline, including required parameters, instrumentation flags, and optional parameters.

Required parameters

The following table lists the available required parameters.

Parameter Description

-f

The path to the input .aab or .apk file. Make sure the file path does not include any white spaces.

-o

The path to the output folder of the .aab or .apk file. Ideally, this is a different location than the input file.

When instrumenting an.aab file, the instrumented output file is unbundled and has an .apks extension. Ignore the .aab file in the output folder.

-pmlib

The path to the pmlib.zip file. Make sure the file path does not include any white spaces.

Important: This parameter is deprecated. It will be removed in the next version of the offline instrumentation tool.

Instrumentation parameters

The following table lists the available instrumentation parameters. At least one instrumentation parameter must be set to true. If a parameter is not included, its value defaults to false. If none of the parameters is included, the default is -spy "true".

Parameter Description

-spy

true/false

where true initializes object instrumentation (also called hybrid instrumentation)

-camera

true/false

The value true initializes camera instrumentation for image injection. Works in mutual exclusion with the cameraX parameter. If set to true, the cameraX parameter is ignored.

-cameraX

true/false

The value true initializes CameraX (based on androidx) instrumentation for image injection. Works in mutual exclusion with the camera parameter. If set to true, the camera parameter is ignored.

-finger

true/false

The value true initializes fingerprint instrumentation for fingerprint injection.

-securedscreen

true/false

The value true removes the secured screen flag from the app.

Parameters for signing your app with your organization's certificate

The following table lists the parameters to be used to re-sign your app with your organization's certificate. Re-signing your application is optional.

Parameter Description

-keypath

The full path to the keystore file. If this information is not provided, the app is signed with Perfecto's certificate.

-keystorepass

The secure password for the keystore file.

-keyalias

The identifying name for your key.

-keypassword

The secure password for your key.

Optional parameters

The following table lists the available optional parameters.

Parameter Description

-below5

true/false

A value of true builds an instrumented version of an application for Android versions earlier than 5.0. The default is false.

Important: This parameter is deprecated. It will be removed in the next version of the offline instrumentation tool.

-sign

true/false

Indicates whether to sign the app. The default is true.

Important: This parameter is deprecated. It will be removed in the next version of the offline instrumentation tool.

-androidsdk

The path to the Android SDK.

-h, --help

Bring up a help message and exits.

-V, --version

Print version information and exits.