Installing an application with the Android command line tool
This example demonstrates the steps involved in running the Android command line tool with the Install command.
- The Android command line tool is only applicable when one or more devices are connected to the host PC via USB cable.
Ensure that the following requirements are met:
TestArchitect Agent is installed on the targeted Android device (refer to Installing TestArchitect Agent).
The Android command line tool ast.exe (Windows) can be found at the following location when TestArchitect is installed:
- Windows platform: TA_INSTALL_DIR/device/android.
The source .apk file which you would like to install on the Android device is available on the host PC.
At the host PC’s command prompt, change the current working directory to TA_INSTALL_DIR/device/android.
Type ast.exe install “D:\APK files\CarRental.apk” -s “2c4401c15d52” to install the Car Rental.apk file residing under D:\APK files into the targeted Android device whose unique ID is 2c4401c15d52.
Review Install command to understand the Install command’s syntax.
Tip:If there is only one Android device connected to the host PC via USB cable, the unique ID parameter is optional.
To obtain the unique ID of an Android device:
- Open the Android Instrumentation Tool dialog box.
- Select the device whose unique ID you wish to obtain.
- Click on the Android Instrumentation Tool’s toolbar to copy the unique ID to the clipboard.
- Paste the copied content into the unique ID parameter in the Install command.
Press Enter on your keyboard to execute the Install command.
The selected application is installed on the target Android device, and the <Application Name> is installed successfully message appears in the command line window.