USB Manager

To display only the features present on a particular device, select one or more filters from the SmartDocs bar below.

Input fields accept ENGLISH ONLY.

Queries from MX are not supported on Zebra devices running Android 11 or later. See alternative method.

StageNow - 5.5

Overview

The USB Manager (UsbMgr) controls which USB functions can be used on the device.

Android devices generally have one or more Universal Serial Bus (USB) ports that can be used for various purposes. A given USB port could implement "Host" mode, which is used to connect various USB peripherals (e.g. mice, keyboards, USB storage devices) to the Android device. A given USB port could implement "Peripheral" mode, which is used to connect the Android device to a Host, such as a PC. A given USB port could implement On The Go (OTG) support, which can act in either "Host" or "Peripheral" mode, based on the cable connected.

Main Functionality

  • Set the default operating mode of the USB port when connecting with a host PC
  • Limit peripherals usable in USB Host Mode (see below)
  • Allow or prevent use of the following:
    • All modes and functions of USB
    • External USB storage devices
    • Connection to a PC via ADB (Android Debug Bridge)
    • All access by a PC to device storage via USB
    • Access by a PC to device storage using USB Mass Storage (UMS) via USB
    • Access by a PC to device storage using Media Transfer Protocol (MTP) via USB
    • Access by a PC to device storage using Picture Transfer Protocol (PTP) via USB
    • Access by a device to designated USB peripherals only (See USB Host Mode)
    • Automatic launching of a designated app upon connection of a specific USB peripheral or type

Controls whether to allow all USB peripherals to be used when the device is in USB Host Mode or to restrict usage to peripherals as defined in Rules created by the administrator. Works with Control Rules parameter.

USB Host Mode

On devices with MX 11.5 and later, MX allows an administrator to control which USB peripherals can be used by the mobile device when in Host Mode. Allowed peripherals can be categorized by device class, vendor ID (VID), product ID (PID) as described in an XML-based list of rules created by the administrator. See Host Mode Peripherals for more information.


USB Module Usage

Controls whether the device is allowed to use the USB module, which controls USB peripherals in and connected to the device.

Parm Name: UsbModuleUsage

Option Name Description Note Status Requires
0 Do not change This value (or the absence of this parm from the XML) causes no change to settings on the device; any previous setting is retained.

OSX: 1.3+

MX: 4.2+

1 Enable Allows usage of the USB module.

OSX: 1.3+

MX: 4.2+

2 Disable Prevents usage of the USB module.

OSX: 1.3+

MX: 4.2+

USB Client Mode Default

Used to select the default operating mode of the USB port each time the device establishes a client-mode USB connection with a host PC. NOTE: File Transfer mode (option 4) is bi-directional; it allows files to be copied from the host PC to the device and/or from the device to the host PC.

Note: This parameter is not applicable to devices connected through the Zebra Workstation Connect cradle; previously configured USB Client Mode settings are ignored while the device is docked.

Shown if: USB All Access Device Storage Usage is NOT "Disable"

Parm Name: UsbClientModeDefault

Option Name Description Note Status Requires
86 Do not change This value (or the absence of this parm from the XML) causes no change to settings on the device; any previous setting is retained.

MX: 10.4+

Android API: 29+

0 Charging only (no data transfer) Sets USB port for battery charging only.

MX: 10.4+

Android API: 29+

4 File Transfer Sets USB port for bi-directional copying of files between the the mobile device and the host PC.

MX: 10.4+

Android API: 29+

8 MIDI Sets USB port for use with Musical Instrument Digital Interface (MIDI) apps.

MX: 10.4+

Android API: 29+

16 PTP Sets USB port for use with Picture Transfer Protocol (PTP) apps.

MX: 10.4+

Android API: 29+

32 USB tethering Sets USB port for tethering the device for sharing its internet connection with the host PC.

MX: 10.4+

Android API: 29+

Host Mode Peripherals

Controls whether to allow all USB peripherals to be used when the device is in USB Host Mode or to restrict usage to peripherals as defined in Rules created by the administrator using the Control Rules parameter. Allowed USB peripherals connect "silently" to the device, displaying no pop-up message to the user upon connection. Optionally, such rules also can permit an app to launch on connection and/or grant an app permission to access the peripheral.

Parm Name: HostModePeripherals

Option Name Description Note Status Requires
0 Do not change This value (or the absence of this parm from the XML) causes no change to settings on the device; any previous setting is retained.

MX: 11.6+

Android API: 30+

1 Controlled (rules list) Restricts USB peripheral usage and pop-ups to a set of admin-defined rules while device is in USB Host Mode.

MX: 11.6+

Android API: 30+

2 Uncontrolled (default) Allows connections and pop-ups of all USB periherals when device is in USB Host Mode (default).

MX: 11.6+

Android API: 30+

Control Rules

Used to enter one or more rules by which to limit USB connections to specific peripherals, automatically launch an app when a particular peripheral or peripheral type is connected, and/or to suppress USB-related pop-up messages. Rules are applicable when a device is in USB Host Mode. Allowed peripherals can be categorized by device class (sometimes referred to as device "type"), vendor ID (VID) and/or product ID (PID).

When a device is in USB Host Mode and a Control Rules file is deployed, a given USB peripheral is usable only if there is at least one rule that allows it, and unusable if there are NO rules that allow it. Rules also can be used to "pre-grant" app(s) permission to use the peripheral(s) without a pop-up message seeking permission from the device user.

It's important to understand that more than one rule can apply to the same peripheral. For example, if a rule allowing all printers existed with a rule to allow all devices from Zebra (VID = 0A5F), Zebra printers would remain usable if either of those rules were deleted.

All connected USB peripherals NOT explicitly allowed are rendered unusable by apps. Such peripherals continue to receive power (via USB) and in some cases could appear to be enabled, but are effectively prevented from communicating with apps.

Auto-launching Apps

USB Manager allows an app to be designated to automatically launch when a particular USB peripheral or peripheral type is connected. For example, this feature can be used to run a payment processing app whenever connection of a credit card reader is detected, all without prompting the user.

Zebra USB Host Manager is an Android app that examines peripherals connected to a device and reports their device class, vendor ID and product ID and can be used to create and export USB Control Rules. Learn more about UHM.

Parm value input rules:

  • String of 10–5120 characters in XML format (see examples, below)
  • Use only text-based codes for USB device classes (aka "types")
  • Use only numeric codes for VIDs and PIDs

Example Control Rules

For educational purposes only.

To use the Control Rules parameter, create an XML file to specify the device class(es), vendor(s) and/or product(s) to be allowed. Then paste the file's contents into the Control Rules field in the relevant StageNow or EMM device-configuration Profile.

Zebra strongly recommends using USB Host Manager to create rules files; XML files should not be created by hand.


Set an app to auto-launch with a specific vendor's peripheral:


<?xml version="1.0" encoding="UTF-8"?>
<popupsuppress>
 <rule>
   <pkg>com.example.appPackageName</pkg>
   <cert>appSigningCertificateFileName</cert> 
   <vid vendorid="1008">
   <pid>842</pid>
   </vid>
   <autoLaunch>true</autoLaunch>
 </rule>
</popupsuppress>

<usbconfig mode="whitelist">
  <class>USB_CLASS_MASS_STORAGE</class>
</usbconfig>


Enable digital pads, joysticks and one vendor's audio device:


<?xml version="1.0" encoding="UTF-8"?>
<usbconfig mode="whitelist">
  <class>AINPUT_SOURCE_DPAD</class>
  <class>AINPUT_SOURCE_JOYSTICK</class>
  <class>USB_CLASS_AUDIO</class>
    <vid vendorid="1504">
    <pid>5889</pid>
    </vid> 
</usbconfig>


Grant permission for one app to access one vendor's peripheral plus mass storage:


<?xml version="1.0" encoding="UTF-8"?>
<popupsuppress>
 <rule>
   <pkg>com.example.usbpopup</pkg>
   <cert>appsigningcertificate</cert> 
   <vid vendorid="1008">
   <pid>842</pid></vid>
 </rule>
</popupsuppress>

<usbconfig mode="whitelist">
  <class>USB_CLASS_MASS_STORAGE</class>
</usbconfig>

Supported Device Classes

  • AINPUT_SOURCE_DPAD
  • AINPUT_SOURCE_GAMEPAD
  • AINPUT_SOURCE_KEYBOARD
  • AINPUT_SOURCE_MOUSE
  • AINPUT_SOURCE_MOUSE_RELATIVE
  • AINPUT_SOURCE_JOYSTICK
  • AINPUT_SOURCE_ROTARY_ENCODER
  • AINPUT_SOURCE_STYLUS
  • AINPUT_SOURCE_TOUCH_NAVIGATION
  • AINPUT_SOURCE_TOUCHPAD
  • AINPUT_SOURCE_TOUCHSCREEN
  • AINPUT_SOURCE_TRACKBALL
  • USB_CLASS_APP_SPEC*
  • USB_CLASS_AUDIO
  • USB_CLASS_CDC_DATA
  • USB_CLASS_COMM
  • USB_CLASS_CONTENT_SEC
  • USB_CLASS_CSCID
  • USB_CLASS_HID*
  • USB_CLASS_HUB*
  • USB_CLASS_MASS_STORAGE
  • USB_CLASS_MISC*
  • USB_CLASS_PER_INTERFACE*
  • USB_CLASS_PHYSICA
  • USB_CLASS_PRINTER
  • USB_CLASS_STILL_IMAGE
  • USB_CLASS_VENDOR_SPEC*
  • USB_CLASS_VIDEO
  • USB_CLASS_WIRELESS_CONTROLLER

* Restricted class; NOT effective as a device rule.

Shown if: Host Mode Peripherals is set to "Control (rules list)"

Parm Name: ControlRules

Requires:

  • MX: 11.6+
  • Android API: 30+

External Storage Enable/Disable

Controls whether the use of USB External Storage devices will be allowed. When allowed, a USB External Storage device could have to be connected via a USB port that supports Host mode or via an OTG USB port with an OTG adapter cable or OTG compliant storage device. Use of USB External Storage could represent a security risk since it could be used as a path to extract sensitive data from a device or to inject unwanted data or applications into a device.

Shown if: The "USB Module Usage" value is not "Disable"

Parm Name: UsbExternalStorageUsage

Option Name Description Note Status Requires
0 Do not change This value (or the absence of this parm from the XML) causes no change to settings on the device; any previous setting is retained.

OSX: 4.1+

MX: 4.2+

1 Enable This value will cause use of USB External Storage to be allowed.

OSX: 4.1+

MX: 4.2+

2 Disable This value will cause use of USB External Storage to be prevented.

OSX: 4.1+

MX: 4.2+

ADB Enable/Disable

Controls whether Android Debug Bridge (ADB) mode can be enabled on the device. When allowed, a PC could be connected to the device through a USB port that supports Peripheral mode or by using a USB "on the go" cable. Once connected, an ADB command line tool could allow communication between the PC and the Android device for copying files, installing apps, running shell commands, etc. Use of ADB could represent a security risk since it could be used as a path to extract sensitive data from a device, to inject unwanted data or applications into a device, or to remove or modify the operation of important applications on a device.

Status: In devices running Android 13 and later, this feature can be accessed through StageNow and compatible EMM systems, or using Android Device Policy Manager (DPM) APIs.

Shown if: The "USB Module Usage" value is not "Disable"

Parm Name: UsbADBUsage

Option Name Description Note Status Requires
0 Do not change This value (or the absence of this parm from the XML) causes no change to settings on the device; any previous setting is retained.

OSX: 1.3+

MX: 4.2+

1 Enable Allows ADB mode to be enabled on the device.

OSX: 1.3+

MX: 4.2+

2 Disable Prevents ADB mode from being enabled on the device.

OSX: 1.3+

MX: 4.2+

USB Storage Enable/Disable

Controls whether the use of any direct method of accessing device storage from a PC via USB is allowed. This controls the use of USB Mass Storage (UMS), Media Transfer Protocol (MTP) and Picture Transfer Protocol (PTP). Does not control the use of ADB mode, which is controlled separately.

When these modes are allowed, a PC could be connected to the device via a USB port that supports Peripheral mode or using an "on-the-go" (OTG) USB port. Once connected, such a PC could browse exposed portions of the device file system, copy files to or from the device, delete files, etc. Use of these modes could represent a security risk since it could be used as a path to extract sensitive data from a device, to inject unwanted data or applications into a device, or to delete important information from a device.

Shown if: The "USB Module Usage" value is not "Disable"

Parm Name: UsbAllAccessDeviceStorageUsage

Option Name Description Note Status Requires
0 Do not change This value (or the absence of this parm from the XML) causes no change to settings on the device; any previous setting is retained.

OSX: 4.1+

MX: 4.2+

1 Enable Allows access to device storage from a PC via USB. This value will also prevent other parms from being presented since individual modes cannot be controlled if all modes are being allowed.

OSX: 4.1+

MX: 4.2+

2 Disable Prevents access to device storage from a PC via USB. This value will also prevent other parms from being presented since individual modes cannot be controlled if all modes are being prevented.

OSX: 4.1+

MX: 4.2+

Access Storage via MTP

The is the On/Off switch for the use of Media Transfer Protocol (MTP) on the device. When this mode is enabled, a PC can connect to the device through a USB port that supports Peripheral mode or the "on-the-go" specification. Once connected, such a PC could browse exposed portions of the device file system, copy files to or from the device, or delete files. Use of this mode could represent a security risk since it could be used as a path to extract sensitive data from a device, to inject unwanted data or applications into a device, or to delete important information from a device.

Shown if: The "USB Module Usage" value is not "Disable" *AND* the "Access device storage from PC via USB" value is not "Enable" or "Disable"

Parm Name: UsbMTPAccessDeviceStorageUsage

Option Name Description Note Status Requires
0 Do not change This value (or the absence of this parm from the XML) causes no change to settings on the device; any previous setting is retained.

OSX: 4.1+

MX: 4.2+

1 Enable This value will cause access to the device storage from a PC via USB MTP to be allowed.

OSX: 4.1+

MX: 4.2+

2 Disable This value will cause access to the device storage from a PC via USB MTP to be prevented.

OSX: 4.1+

MX: 4.2+

Access Storage via PTP

This is the On/Off switch for the use of Picture Transfer Protocol (PTP) on the device. When this mode is enabled, a PC can connect to the device through a USB port that supports Peripheral mode or the "on-the-go" specification. Once connected, such a PC could browse exposed portions of the device file system, copy files to or from the device, or delete files. Use of this mode could represent a security risk since it could be used as a path to extract sensitive data from a device, to inject unwanted data or applications into a device, or to delete important information from a device.

Shown if: The "USB Module Usage" value is not "Disable" *AND* the "Access device storage from PC via USB" value is not "Enable" or "Disable"

Parm Name: UsbPTPAccessDeviceStorageUsage

Option Name Description Note Status Requires
0 Do not change This value (or the absence of this parm from the XML) causes no change to settings on the device; any previous setting is retained.

OSX: 4.1+

MX: 4.2+

1 Enable Allows access to the device storage from a PC using USB PTP.

OSX: 4.1+

MX: 4.2+

2 Disable Prevents access to the device storage from a PC using USB PTP.

OSX: 4.1+

MX: 4.2+

Access Storage via UMS

Controls access to the device as USB Mass Storage (UMS). When this mode is allowed, a PC can be connected to the device through a USB port that supports Peripheral mode or using an "on-the-go" (OTG) USB port. Once connected, such a PC could browse exposed portions of the device file system, copy files to or from the device, delete files, or even format an entire storage volume. Use of this mode could represent a security risk since it could be used as a path to extract sensitive data from a device, to inject unwanted data or applications into a device, or to delete important information from a device.

Note: This feature is not supported on devices running Android 5.x Lollipop or later.

Shown if: The "USB Module Usage" value is NOT "Disable" AND the "Access device storage from PC via USB" value is NEITHER "Enable" nor "Disable"

Parm Name: UsbUMSAccessDeviceStorageUsage

Option Name Description Note Status Requires
0 Do not change This value (or the absence of this parm from the XML) causes no change to settings; any previously selected setting is retained.

OSX: 4.1 - 5.4

NOT IN OSX 6.0 OR LATER

MX: 4.2+

1 Enable Enables access to device storage from a PC via USB UMS.

OSX: 4.1 - 5.4

NOT IN OSX 6.0 OR LATER

MX: 4.2+

2 Disable Disables access to device storage from a PC.

OSX: 4.1 - 5.4

NOT IN OSX 6.0 OR LATER

MX: 4.2+