The Android-ADB Transform controls an Android device attached to your PC using the ADB. This Transform was formerly named MonkeyRunner.
Prerequisites
The Monkeyrunner Transform has been tested with the following:
•ADT Bundle for Windows 64-bit: adt-bundle-windows-x86_64-20140321.zip – Download
•Python 3.8.1 or newer – Download
•Java - Download
To run the Monkeyrunner demo, use the following steps:
![]() | 1. Install Android SDK Tools |
1.Download Android SDK tools for Windows from https://developer.android.com/studio/#downloads 2.Use the downloaded installer to install the tools. 3.Select C:\Program Files\Android\Android Studio for the Destination Folder: 4.Open a Command Prompt window and enter adb as shown below:
If the following error is displayed, set the PATH environment variable: 'adb' is not recognized as an internal or external command, operable program or batch file.
|
1.Download Python 3.8.1 (or newer version). 2.Install python-3.8.1-amd64.exe (or newer version) on your machine. 3.Enter Python to confirm that Python is working as shown below: If an error message is displayed, update the PATH variable to include the python folder. |
You can connect to the Android device using a USB cable or Bluetooth: USB: 1.Connect the Android device to your PC using a USB cable. 2.Enable the USB debug mode on the Android device. See: https://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/ (Step Two) Bluetooth: 1.Enable Bluetooth on the Android device. See: https://tileteam.zendesk.com/hc/en-us/articles/217069448-How-to-Turn-Bluetooth-On-or-Off-with-your-phone-or-tablet- 2.Use the adb devices command to confirm the device is attached. |
1.Run MxVDev. 2.Create a new project or open the MonkeyRunner sample project. 3.Open MxTransIt. 4.If necessary, create the MonkeyRunner Transform. If you are using multiple devices, create a Transform for each device. 5.Do the following for each MonkeyRunner Transform: a.Be sure the Monkey Runner Batch Path is set. If it is not, review the installation steps. b.Set the Device Connection Timeout to the value for your device. (The Galaxy Tab takes as many as 20,000 ms to connect.) c.Set the Selected Device property to the Device Id for the corresponding device. To determine the Device Id for all connected devices, enter the adb devices command into a command prompt: |
The top 4 inports on the MonkeyRunner Transform are event ports. MKREnable is a Boolean numeric port. Snapshot is a message port. ScriptComplete is an event port. Busy is a discrete numeric port.
|
|||||
The following TestCases are included in the Monkeyrunner sample project. The VolumeDemo TestCase adjusts the volume on the Galaxy tablet up and down.
The TouchDemo TestCase saves the contacts on the Galaxy device.
The ScriptExecute TestCase runs the sample.sh script file.
|
Issue: Batch Path and Jar Path are not displayed in the Transform's Properties This is usually indicates that Android Studio was incorrectly installed in a local user directory. There are two ways to fix this: •Set an environment variable named MXVANDROIDSDKROOT and set its value to the installation directory C:\Users\demouser\AppData\Local\Android\Sdk\ •Uninstall Android Studio and then reinstall it for all users. (should be an option during the installation process). Then restart the PC and open the project. |