Android devices#

Commands that manage Android devices: install and launch the app, set up port forwarding, and work with native elements.

Every command also takes the global options, such as --host and --port.

android devices / android install / android launch / android uninstall#

Parameters

Name

Required

Description

--device

No

Serial number of the target device. Requires adb on your PATH.

Returns

  • List of connected devices (devices). Confirmation for install, launch, and uninstall.

Examples

alttester android devices                     # List connected devices
alttester android install path/to/game.apk    # Install an APK
alttester android launch com.example.game     # Launch an app
alttester android uninstall com.example.game  # Uninstall an app

android forward / android clear-forward#

Required when testing on a physical Android device so the CLI can reach the AltTester® server running inside the game.

Parameters

Name

Required

Description

--port

No

The port to forward. The default value is: 13000

--device

No

Serial number of the target device.

Returns

  • Confirmation.

Examples

alttester android forward --port 13000
alttester android clear-forward

android find / android tap / android source#

Parameters

Name

Required

Description

value

Yes (find, tap)

The element to find or tap.

--by

No

Locator strategy for find and tap. One of text (default), resource-id, class, or content-desc.

--device

No

Serial number of the target device.

Returns

  • AltObject for find. Confirmation for tap. Native UI hierarchy XML for source.

Examples

alttester android find Allow
alttester android tap Allow --by resource-id
alttester android source

android run#

Installs, launches, and sets up an app for testing in one command.

Parameters

Name

Required

Description

path

Yes

Path to the .apk file to install.

--package

No

The application package name (e.g. com.example.game). Auto-detected from the APK when omitted.

--forward

No

Set up ADB reverse port forwarding automatically. The default value is: true

--port

No

The port to forward. The default value is: 13000

--connect

No

Connect the AltTester® driver after launch. The default value is: false. Currently a no-op placeholder; run alttester connect separately after the app starts.

--device

No

Serial number of the target device.

Returns

  • Confirmation that the app is installed, launched, and ready for testing.

Examples

alttester android run path/to/game.apk
alttester android run path/to/game.apk --package com.example.game --port 13000