Overview
If you need to execute a more advanced command or a script or even apply commands that are not currently available on the Radix Mobile Device Management (=MDM) interface, using the Commands & Scripts (or “Remote Execute”) command is the best answer. (This is intended for devices running Android and Windows OS).
Accessing the Remote Command Option
Note! You can run these command-line commands if you have high-level local device privileges. Use these commands only if you are familiar with writing batch commands and scripts, and you know what happens as a result.
There are several ways to access the Remote Command option in the Radix Device Management Platform.
Method One: Via the Sidebar Menu
To create and store a Remote Command in the Commands & Scripts Repository:
1. In the sidebar menu on the left side of the Overview Dashboard, click on Deployment>Commands & Scripts.

A new window will open, showing a list of existing commands and bundles.

Figure 1: Remote Execute commands and bundles
Method Two: From the Device’s Three-Dot Menu
To access the Remote Execute command from the device’s kebab menu:
1. On the left side main menu in the Overview Dashboard, click the Devices icon.

The Devices Table opens, with a list of available devices.

2. Select the device to which you wish to apply the command or script, and click on the device’s three-dot menu in the far-right column.

3. Click on Deploy>Commands & Scripts.

The Commands & Scripts window opens, displaying all stored remote execute scripts.

Method Three: From the Device Dashboard
To access the Remote Execute command from the device’s Device Dashboard:
1. In the sidebar menu, click the Devices to open the Devices Table, with a list of available devices.

2. Click on the row of the device to which you wish to apply the remote script.

The device’s Device Dashboard opens:

3. In the right-hand section, click on the Repositories Actions >Commands & Scripts.

The Commands & Scripts window will open.

Method Four: From the Bulk Actions menu
To access the Commands & Scripts option from the Bulk Actions menu:
1. Click on the Devices icon in the sidebar menu to open the Devices Table.

2. Select the device(s) on which you would like to execute a remote command or script by clicking on the checkbox in the far left.

The Bulk Actions button becomes active.
3. Click on Bulk Actions>Deploy>Commands & Scripts to open the Commands & Scripts repository.

This opens the Commands & Scripts repository.

Creating a New Remote Execute Command
To create a new Remote Execute command:
1. Click on the Add New button in the lower left of the Commands & Scripts repository to add a new command.

The New Remote Execution window opens.

2. Apply a name to the new Remote Execution command. You will have to provide the following parameters:
- - Command – This is where you write the main command.
- - Arguments – This is where you write the command arguments.
3. Select Command line or Script. Use Command line if you need to execute a command consisting of a single line. Use Script if you want to execute a script of several lines.
4. There are also three options for running the command:
- - Wait for Exit – This will indicate if the command result should be sent after the command finishes, to run on the remote device.
- - Collect output – This will indicate if the process standard result output is collected back as part of the command result.
- - Run with high privileges – Select this to run the command with higher local device privileges.
5. Click on the Set as private sliding button to make the command private so that it is visible only to you.
6. Click on the Hide content from others sliding button if you want other users to be able to use this command, without being able to edit its content.
7. Click on the Set as read-only sliding button to limit editing of the command only to you and others with admin privileges.
8. Click Confirm. The Repository Remote Command will be saved and will appear in the Commands & Scripts repository window.
Examples
Here are some examples of Android commands that you can employ in the Remote Execute command:
Function | CMD | Arguments | Wait for Exit | Collect Output | Run with High Privileges | |
| 1 | Disable Google Play store | pm | disable com.android.vending |
|
| X |
| 2 | Get a list of running apps and display result | top | -n 1 | X | X | X |
| 3 | Open a website using a default browser | am | start -a android.intent.action.VIEW -d https://www.radix-int.com |
|
|
|
| 4 | Run using Monkey command | monkey | -p org.chromium.webview_shell -c android.intent.category.LAUNCHER 1 |
|
| X |
| 5 | Clear app data | am | clear com.android.browser | X |
Example of Remote Execution of a Command
Let us perform a simple example of a command that we send to a device remotely.
1. Click on Devices in the sidebar menu to open the Devices Table.
2. Find the device to which you would like to execute the command. Use the Search Bar at the top to narrow down the selection.

3. Click on the device’s three-dot menu>Deploy>Commands & Scripts.

4. In the Search bar at the top of the window, enter “top”, to find the “top” command.

This is what the “top” command looks like “under the hood” when we click on the Edit icon on the Remote Execute tile:

5. Click on the tile “top” and click Apply.

You will get an alert in the lower left-hand corner, indicating that the command has been sent to the device.

6. If you click on the Command Status bar at the bottom of the display, you will see whether the “top” command was executed successfully, is in pending status, or failed to execute:

7. Clicking on More info gives the following information.

Executing a Command to Several Devices
The Bulk Actions button will allow you to execute a command-line command on several devices.
To execute a command on several devices:
1. Click on the Devices icon in the sidebar menu to open the Devices Table.
2. Select the devices to which you would like to execute the remote command by clicking on their checkboxes.

3. Click on Bulk Actions>Deploy>Commands & Scripts.

4. In the Commands & Scripts repository window, select the command that you want to apply to the selected devices, and click Apply.

The command will be sent to the selected devices.

Figure 2: Result of the Remote Command Execution