Script Commands for Android Classic Devices
Use the options and examples below to help you create your own powerful script commands.
Legend
| Format | Meaning | 
|---|---|
| text | Enter the command exactly as shown. | 
| text | Replace with the requested information. | 
| [text] | Information contained within square brackets is optional to the command. | 
| text|text | Choose one of the options separated by the vertical pipe. | 
Commands
| Command | Syntax | 
|---|---|
| abortpkgHalts the installation of a package and forces the installation status in the SOTI MobiControl console to report "Failed" when used in a SOTI MobiControl pre-install script. See Using Package Studio for more information. | abortpkg | 
| agent_modeRetrieves the current agent mode (user or administrator) of a device with lockdown mode applied and displays it in the Logs section of the Device Information panel. | agent_mode | 
| appcontrolApplies blacklist rules. This command supports a limited set of parameters. | appcontrol [-s|-b|-w] containerIDWhere 
 Example To add the Facebook app to the blacklist: 
 | 
| app_upgrade disable <package-list>Allows the administrator to disable automatic Android Enterprise agent updates to latest versions from the Google Play Store, remotely on Android devices through MobiControl. Minimum device agent version: 15.1.5 Android OS: Samsung: API Level 11 and MDM v 5.0+ and above Zebra: API Level 26 and MXMF v10.3 and above OEMs supported: Samsung and Zebra | app_upgrade disable
										<package-list>Example 
 | 
| app_upgrade enable <package-list>Allows the administrator to enable automatic Android Enterprise agent updates to latest versions from the Google Play Store, remotely on Android devices through MobiControl. Minimum device agent version: 15.1.5 Android OS: Samsung: API Level 11 and MDM v 5.0+ and above Zebra: API Level 26 and MXMF v10.3 and above OEMs supported: Samsung and Zebra | app_upgrade enable
										<package-list>Example 
 Note:  <package-list>can be skipped for Samsung devices. | 
| batteryoptimizeSpecifies if an application should adhere to the battery optimization restrictions. Note: Supported on Samsung Android devices with Samsung MDM 5.7 or later, that are enrolled with either a 13.6 Samsung ELM agent or a 13.6 Android Enterprise with Samsung ELM license enabled agent. | batteryoptimize allow | disable packageExample To add an application to the Battery Optimization whitelist (the app ignores battery optimization restrictions): 
 To remove an application from the Battery Optimization whitelist (the app follows battery optimization restrictions): 
 | 
| certdeleteDeletes a certificate on the device. Note: You can only use  certdeleteto remove certificates that were installed by SOTI MobiControl unless the device has a Samsung ELM agent installed, in which casecertdeletewill remove any specified certificates. | certdelete -issuer "IssuerName" -sn "SerialNumber" -storage "storage"Where 
 Example To delete a certificate issued by apache.org: 
 | 
| certimportImports a user-specified certificate of X.509 type, which could be either DER or Base64 encoded. | certimport -cert "filepath" -ctype certificate_type -pwd "password" -itype "install_type" -storage "storage_type"Where 
 Example To import a certificate test.cer into current user storage: 
 | 
| clearappcacheClears the cache memory of the specified application. Devices supported: Supported on
									Android Classic and Work Managed devices.  Note: 
										 
 Minimum Android agent version: 15.3.3 |  clearappcache
										packageNameExample To clear the cache memory of the Business App application: clearappcache
								com.businessapp | 
| connectPrompts the device agent to attempt to connect to the deployment server. | connect [-f]Where  Example To connect to the deployment server regardless of configuration or setup settings: 
 | 
| copyCopies one or more files to another location. On Windows Mobile/CE and Desktop Classic devices, you can copy files between desktop computers and mobile devices. On Android devices, you can only copy files locally. | copy source
									destinationExample To copy all files with the extension .txt from the C:\ to the temp directory on the device: C:\tempt\*.txt 1:\temp | 
| delDeletes one or more files. | del filenameExample To delete example.txt in the current directory: 
 To delete all files with the extension .tmp in the current directory and its subfolders: 
 | 
| devrenameRenames a device. | devrename newDeviceNameIf the name contains spaces, use quotation marks Example To change the name of a device to Apricot Candy: 
 | 
| disconnectDisconnects the device from the SOTI MobiControl deployment server. | disconnect | 
| elm_awakenAdds or removes the Samsung ELM agent to/from Android Doze Mode whitelist, enabling the agent to circumvent battery optimizations that limit connectivity between the agent and the deployment server. Available on Samsung devices running Android 6.0 or later and Knox Standard SDK 5.7 or later. | elm_awaken 0|1Example To add ELM agent to whitelist: 
 To remove ELM agent from whitelist: 
 | 
| enable_system_appAllows a system application on the device to be used in the Android Enterprise container. Note: Only applications that are included in the device's firmware can be used in this command. | enable_system_app appBundleIDExample To add Google Chrome to the Android Enterprise container: 
 | 
| finishpkgFinishes the current script without processing the rest of the package and reports package installation as successful to the deployment server. This is useful particularly in packages that involve wiping a device. This script command can be used to skip reinstalling the package but still report back as successfully installed to the deployment server. If a hard reset is initiated from a package's post-install script, the entire package will reinstall after the reset. A check can be included in the pre-install script that determines whether the package's files have already been installed. Note: This command is not useful as a script command in and of itself but in the event of a package that involves a cold boot. | "path\to\package"finishpkgExample 
 For platforms that support the  
 then the pre-install script could contain a check to prevent the package from reinstalling endlessly: 
 | 
| foregroundmodeSwitches the SOTI MobiControl service between foreground and background modes. While running in foreground mode the SOTI MobiControl process receives high priority and is not killed by the system. While the service is running in foreground mode, a SOTI MobiControl icon is displayed in the notification area of the device. | foregroundmode enable|disableExample To enable  
 | 
| ftpCopies a file or directory from an ftp server to a device. | ftp [wget] [-o,-r] source
									destinationWhere 
 Example To copy a file from ftp to local storage on the device: 
 | 
| httpgetDownloads files using the HTTP protocol. | httpget URL localPath | 
| identify_activityIdentifies the current top activity on the device. | identify_activity | 
| identify_package_certificateIdentifies the signature of a package and displays it in the device ADB logs. | identify_package_certificate packageNameExample 
 | 
| ifconfigDisplays the configuration of the network interfaces on the SOTI MobiControl console. | ifconfig interfaceNameWhere if no interfaceName is provided, then  Use  Example To list all interface names: 
 To show the configuration of eth0 interface 
 | 
| import_contacts_vcfThis feature allows the
									administrator to add Collation/Unicode in
										 Minimum Agent: 15.2.4 Limitations/Constraints/Pre-requisites: This is generic implementation, there is no OS or OEM limitation | import_contacts_vcf <filePath>
									1/0
									<charsetName>Where: 
 Example 
 | 
| installInstalls an application on the device. | install appInstallerPathWhere appInstallerPath is the full path to the application installer file on the device Example To install the Gmail app located on an sd card: 
 | 
| install_system_updateInstalls a system update from the specified file. This command is
									supported for the following OEMs: 
 Note: This command cannot be used on encrypted devices. Use the
										 sendintentcommand instead. | install_system_update filenameExample To install a system update from a file on an SD card: 
 Note: If  /sdcard/Downloaddoes not work, use/storage/sdcard0/Downloadinstead, as
									in:
 | 
| installpackageInstalls a SOTI MobiControl package built using Package Studio. Note: This command is not recursive and can only be used through the console or an API call to install a previously sideloaded package. It is not intended for use within one package to install another package. | installpackage pathToPackageExample To install a package from the %tmp% folder: 
 | 
| ipaddrLists the IP addresses of the device. | ipaddr | 
| kill_applicationTerminates a process that is currently running on the device. Requires 
 | kill_application packageNameExample To terminate the Angry Birds game process on the device 
 | 
| list_volumesLists storage volume information of remote managed device. The results are displayed using a custom event on the console. | list_volumes | 
| lockTurns the device screen off and locks device until device user enters the correct password. | lock | 
| lockdownorientationSets the orientation of the device screen while its in lockdown or kiosk mode. | lockdownorientation orientationWhere orientation is either  Note: Setting any parameter other than landscape or portrait causes the kiosk screen to default to landscape for Android Honeycomb (3.0) and later, and to portrait for Android Gingerbread (2.3). Example To set the orientation of the lockdown screen to landscape: 
 To set the orientation of the lockdown screen to portrait: 
 | 
| logSends a customs message to the SOTI MobiControl deployment server from the device. This message appears in the Logs tab of the Device Information panel in the SOTI MobiControl console. | log type messageWhere  
 Example To send a notification to the SOTI MobiControl console at certain intervals during a software push: Note: Put the command in the pre-install script 
 | 
| malwarescanInitiates a Webroot scan for malware on the device. | malwarescan | 
| mkdirormdCreates a new directory. | mkdir [drive:] pathExample To create a directory named "test" from the current directory: 
 To create  
 | 
| mxconfigSubmits XML configuration instructions to the MX layer of the device. Note: This script command is only applicable on Zebra Android devices.  mxconfiguses the StageNow XML format (MXMS) | mxconfig xmlFilepathExample 
 | 
| mxxmlconfigExecutes an xml command from the  Note: This command is only supported on devices that support the older XML format (MX Legacy). | mxxmlconfig inputPath outputPathWhere 
 | 
| notify kioskEnables or disables lockdown mode on the device. | notify kiosk on | off | 
| notifySends a script that notifies other SOTI applications about data sync. You can use it to notify lockdown applications that lockdown view synchronized. Added in v9 to support re-enrolling a device on another SOTI MobiControl system | notify aliasornotify package receiverWhere  Example To notify kiosk about data sync: 
 
 | 
| promptpasswordchangePrompts user to change or set a password on their device by displaying a "Password Policy Pending" notification in the device agent. | promptpasswordchange | 
| remInserts a comment line in a script/batch file. | rem [comment]Example To add a comment about pumpkins: 
 | 
| removemanagedinfoRemoves Samsung managed information for specified applications. Note: This command is only available on Samsung devices. | removemanagedinfo packageName | 
| request_appops_permissionSends a request to the device prompting the device user to grant the specified permissions. | request_appops_permission permissionNamewhere the permissionName can be one of:
 Where possible, the permissions are granted silently. | 
| request_appops_permission android.permission.SYSTEM_ALERT_WINDOW allow
									<Package_ID>Note: This command is supported in
									Android Enterprise Work Managed, Android Classic, and external
									agent (i.e. COPE Work Managed) insideagent
									request_appops_permission android.permission.SYSTEM_ALERT_WINDOW
									allow <Package_ID>Note: This command is supported in
									internal agent (i.e. COPE Work Profile). Enables the ability to silently allow any third-party application (this applies to the SOTI MobiControl agent as well) to display over other applications across all Android devices. Minimum Agent: 15.1.5 Plugin Versions: 1.15.1.102 (recommended for silent granting) Devices supported: Android Enterprise with plugins (DO, COPE) and Android Classic devices Android OS: 6 and later OEMs Supported: Samsung, Zebra, Google, Honeywell (This feature is not OEM specific) | 
 
 Example: 
 
 | 
| request_appops_permission android.permission.SYSTEM_ALERT_WINDOW disallow
									<Package_ID>Note: This command is supported in
									Android Enterprise Work Managed, Android Classic, and external
									agent (i.e. COPE Work Managed) insideagent
									request_appops_permission android.permission.SYSTEM_ALERT_WINDOW
									disallow <Package_ID>Note: This command is supported
									in internal agent (i.e. COPE Work Profile). Disables the ability to silently allow any third-party application (this applies to the SOTI MobiControl agent as well) to display over other applications across all Android devices. Minimum Agent: 15.1.5 Plugin Versions: 1.15.1.102 (recommended for silent granting) Devices supported: Android Enterprise with plugins (DO, COPE) and Android Classic devices Android OS: 6 and later OEMs Supported: Samsung, Zebra, Google, Honeywell (This feature is not OEM specific) | 
 
 Examples: 
 
 | 
| resetPerforms a soft or hard reset of the device. | reset [/s | /H | /W | /E] [/delaysec]Where 
 On Android Plus devices it is possible to specify a
										 If  Example To soft reset a device: 
 To reset an Android Plus device to its factory settings in 30 seconds: 
 | 
| resetpasswordResets device password to new password. | resetpassword  newPassword Example To reset current password to password12345 
 | 
| resetwifiproxyClears proxy configuration settings for the specified SSID (which should exist on the device before sending the command). Note: Supported on devices running Android 4.0 or later. | resetwifiproxy ssidExample To reset a proxy configuration for SSID 105: 
 | 
| restartagentRestarts the device agent. | restartagentAs of Android agent v14.3.1, the agent waits until it's idle before it restarts (generally less than 10 seconds). Add  | 
| rmdirorrdDeletes a directory. | rmdir [/S] pathWhere  On Android Plus and Linux devices, this command requires the
										 Example To remove an empty directory named "test" from the current directory: 
 To remove a directory named "test" and all of its contents from the current directory: 
 To provide location: 
 | 
| sendinfo net.soti.action.hub ENABLESCREENCAPTUREControls whether device users can take screen captures within the SOTI Hub app. Note: If screen capture is disabled, you may see a blank screen if you remote control a device and then open a file in SOTI Hub. | sendinfo net.soti.action.hub ENABLESCREENCAPTURE 0 | 1 Where 
 Example To block device user from taking screenshots within the SOTI Hub app: 
 | 
| sendinfo net.soti.action.surf BROWSERZOOMLEVELSets the zoom level in the SOTI Surf app. | sendinfo net.soti.action.surf BROWSERZOOMLEVEL valueWhere value is a percentage that represents the level of zoom. Example To set the zoom level of the SOTI Surf app to 400%: 
 | 
| sendinfo net.soti.action.surf DISABLEBROWSERZOOMGESTUREControls whether device users can use gestures (like pinch to zoom) to magnify web pages opened in the SOTI Surf app. | sendinfo net.soti.action.surf DISABLEBROWSERZOOMGESTURE 0|1Where 
 Example To disable zoom gestures in the SOTI Surf app: 
 | 
| sendinfo net.soti.action.surf DISABLEMEDIAAUTOPLAYTurns on or off media auto-play and controls SOTI Surf access to the device camera. | sendinfo net.soti.action.surf DISABLEMEDIAAUTOPLAY 0 | 1 Where  Example To turn on media auto-play and grant SOTI Surf access to the device camera: 
 | 
| sendinfo net.soti.action.surf DISABLEPULLTOREFRESHControls whether device users can swipe downwards on their screen to refresh the current webpage in the SOTI Surf app. | sendinfo net.soti.action.surf DISABLEPULLTOREFRESH 0|1Where 
 Example To disable the pull to refresh gesture in the SOTI Surf app: 
 | 
| sendinfo net.soti.action.surf ENABLETHIRDPARTYCOOKIES Controls whether cookies from third-party domains (that is, domains beyond the site the user is currently visiting) are blocked on SOTI Surf. | sendinfo net.soti.action.surf ENABLETHIRDPARTYCOOKIES  0|1Where 
 Example To allow third-party cookies in the SOTI Surf app: 
 | 
| sendintentSends intent to devices. See The sendintent Command for more information | |
| sendreportSends a debug report from the device agent to the SOTI ftp server. | sendreport | 
| setfirewallproxySets proxy configuration on device level (iptables based). Note: Supported on devices with Samsung MDM v2 and later only. | setfirewallproxy  host port containerIDExample 
 | 
| set_configurable_kiosk_splashThis feature allows the administrator to suppress or change the SOTI agent logo while in kiosk mode. Minimum Agent: 15.2.4, same as lockdown Plugin Versions: Not required Devices supported: Android Classic and Android Enterprise DO Android OS: same as lockdown | 
 
 Where: 
 Examples 
 
 Note: The script will fail if you do not supply an argument.  | 
| setlocaleSets the device's default locale. Note: Supported on Motorola Android Plus devices with a signed agent only. | setlocale locale | 
| setmobiledataEnables or disables mobile data on a device. Note: These settings may conflict with device feature control, and settings are non-restrictive and non-persistent. | setmobiledata 0|1Where  Example To disable mobile data: 
 To enable mobile data 
 | 
| setradioenableEnables or disables WiFi, Bluetooth, or cellular networks for the device. If the phone radio is disabled, no telephony functionalities in terms of both audio and data can occur. A phone reboot will typically re-enable the radio again. Note: These settings may conflict with device feature control, and settings are non-restrictive and non-persistent. | setradioenable wifi|bt|phone 0|1Where 
 Example To disable Bluetooth radio 
 To enable WiFi 
 | 
| setwifiproxySets WiFi proxy settings using a provided host and port for the specified SSID. The access point ID should exist on the device before sending this command. Note: Supported on devices running Android 4.0. | setwifiproxy ssid host portExample To set up a WiFi proxy: 
 | 
| setwifipacurlSets WiFi proxy settings using a provided PAC file. The access point ID should exist on the device before sending this command. Note: Supported on devices running Android 4.0. | setwifipacurl ssid PACfileURLExample To set up a WiFi proxy using a PAC file: 
 | 
| showmessageboxDisplays a message box on the device screen. Note: The Android Plus agent has the following limitations:
									 
 | showmessagebox message [timer] [type] [default button] [action]Where 
 The return values for the  Example To show a simple message: 
 To provide device information using a macro: 
 To set a 3 second timer to your message: 
 To add YES and NO buttons to your message box with no timer 
 To provide followup actions to a user response to message box:  | 
| sleepInitiates sleep mode on the device for a set period. Only use this command in scripts. | sleep [length]Where length is in seconds Example To set the device to sleep for 5 seconds: 
 | 
| sleepexInitiates sleep mode on the device for a set period. Only use this command in scripts. | sleep [length]Where length is in milliseconds Example To set the device to sleep for 3.5 seconds: 
 | 
| startStarts a program on the device. When the  | start [/wait] programNote: On Windows devices, program must be enclosed in quotation marks. Example To start Pocket Word and wait until it is terminated: 
 | 
| turnoffTurns off the device. | turnoff [delay]Where  Example To turn off the device: 
 To turn off the device in 25 seconds: 
 | 
| uninstallRemoves the specified program from the device. | uninstall program [force]Where 
 Example To remove the program Google Maps: 
 | 
| uninstall_agentRemoves the agent from the device and clears any previously applied policies. This process can take up to 30 seconds. Note: This command cannot uninstall a Samsung ELM agent due to permission limitations. Additionally, some feature modules do not handle wipe/rollback properly and can hamper a clean uninstall. | uninstall_agent | 
| unlockUnlocks the device and dismisses the password lock screen. | unlock | 
| updatedefinitionsPrompts Webroot to update its malware definitions. | updatedefinitions | 
| wifiapenableEnables or disables WiFi mobile access point. Note: Supported on devices running Android 4.0 to 8.0. | wifiapenable 0|1Where  Example To disable WiFi: 
 | 
| wifireconnectForces the device to drop a WiFi connection and reconnect. Note: Supported on devices running Android 4.0 or later with Android Plus capabilities. | wifireconnect | 
| wipeapplicationWipes application data for the specified application from the device. | wipeapplication packageName | 
| writeprivateprofstringSaves or deletes specified settings on a device. See The writeprivateprofstring Command for more information. | |
| writesecureprofstringThis command has the same functionality as  See The writeprivateprofstring Command for more information. |