to top
public class


extends Object
implements ITargetPreparer @OptionClass(alias = "install-apk")

Class Overview

A ITargetPreparer that installs one or more apks located on the filesystem.

This class should only be used for installing apks from the filesystem when all versions of the test rely on the apk being on the filesystem. For tests which use TestAppInstallSetup to install apks from the tests zip file, use --alt-dir to specify an alternate directory on the filesystem containing the apk for other test configurations (for example, local runs where the tests zip file is not present).


private Collection<File> mApkPaths @Option(name = "apk-path", description = "the filesystem path of the apk to install. Can be repeated.", importance =
private String mForceAbi @Option(name = "force-abi", description = "The abi to use, can be either 32 or 64.", importance =
private Collection<String> mInstallArgs @Option(name = "install-arg", description = "Additional arguments to be passed to install command, including leading dash, e.g. \"-d\"")
private List<String> mPostInstallCmds @Option(name = "post-install-cmd", description = "optional post-install adb shell commands; can be repeated.")
Public Constructors
Public Methods
void setUp(ITestDevice device, IBuildInfo buildInfo)
Perform the target setup for testing.
Inherited Methods
From class java.lang.Object
From interface


private Collection<File> mApkPaths

private String mForceAbi

private Collection<String> mInstallArgs

private List<String> mPostInstallCmds

Public Constructors

public InstallApkSetup ()

Public Methods

public void setUp (ITestDevice device, IBuildInfo buildInfo)

Perform the target setup for testing.

device the ITestDevice to prepare.
buildInfo data about the build under test.