The Power Manager (PowerMgr) allows an app to perform certain OS- and power-related actions on the device. These include rebooting or performing an OS update, resetting the device to a factory-fresh state or putting the device into Sleep mode. On some devices, such as the VC8x vehicle-mounted computer and similarly equipped Zebra devices, PowerMgr also can control device heaters and perform actions based on ignition status of the vehicle. PowerMgr performs only actions; it currently supports no queries other than to determine the version of the CSP that implements PowerMgr itself.

It's important to note that PowerMgr actions such as Reboot and Reset, once executed, prevent the execution of subsequent actions submitted by the Request XML document, including the submission of a Result XML to the application sending the original Request. Zebra therefore recommends using Condition Manager in conjunction with PowerMgr to ensure that appropriate conditions exist on a device before attempting to perform "risky" operations such as OS updates, the failure of which can render a device unusable, severely limited or otherwise in need of service.

Main Functionality

Sleep Mode

On Android devices, Sleep mode turns off the device display screen and places some subsystems into low-power states. Depending on device configuration settings, certain apps and/or subsystems such as Wi-Fi and Cellular might remain active.

Reboot

Rebooting an Android device generally causes only volatile information such as application state and transient data to be lost. Non-volatile data such as device settings and stored apps and data are preserved. A Reboot is sometimes referred to as a "Reset" or "Normal Reset," but is not to be confused with an Enterprise Reset or Factory Reset (explained below).

IMPORTANT: The Reboot Action causes the device to immediately restart, which prevents any subsequent Actions from executing, including the submission of a Result XML to the application sending the original request.

Enterprise Reset

Enterprise Reset is intended to return the device to an enterprise-defined default state, generally as determined by the contents of the /enterprise partition. On Zebra devices running Android, an Enterprise Reset is the same as a Factory Reset except that the /enterprise partition is preserved. This action is supported only on Zebra devices running Android 4.4 KitKat and later. On Zebra Android devices running Android Jelly Bean or earlier, the same action could be performed using the "OS Update" action if a suitable OS Update .zip file was used.

Note: The Enterprise Reset Action causes the device to Reboot (into Recovery Mode), preventing any subsequent Actions from executing, including the submission of a Result XML to the application sending the original request.

BEST PRACTICE: Enterprise Reset should be triggered only through Power Manager and only with the Setup Wizard Bypass flag set to "true." Manually triggering Enterprise Reset without setting the bypass flag could leave the device in an unexpected state.

Setup Wizard Bypass is discontinued on devices running Android 13 and later.

Factory Reset

The Factory Reset is intended to return the device to its factory-fresh condition with the exception of certain conditions related to its internal storage card(s) (see below). On Zebra devices running Android, a Factory Reset erases all key partitions and storage cards containing /data, /cache, and /enterprise partitions. This action is supported only on Zebra devices running Android 4.4 KitKat and later. On Zebra Android devices running Android Jelly Bean or earlier, the same action could be performed using the "OS Update" Action if a suitable OS Update .zip file was used.

The Factory Reset Action causes the device to Reboot into Recovery Mode, which prevents any subsequent Actions from executing, including the submission of a Result XML to the application sending the original request.

Resetting Storage Cards

A Factory Reset will erase a storage card if:

A Factory Reset will NOT erase a storage card if:

Full Device Wipe

The Full Device Wipe is intended to return the device to its condition as it would have shipped from the factory with its current OS plus any subsequent OS update(s). On Zebra Android devices, a Full Device Wipe is the same as a Factory Reset plus the unconditional erasure of all storage cards. This action is supported only on Zebra devices running Android 4.4 KitKat and later. On Zebra Android devices running Android Jelly Bean or lower, the same action could be performed using the "OS Update" Action if a suitable OS Update .zip file was used.

Note: This Action causes the device to Reboot (into Recovery Mode), which prevents any subsequent Actions from executing, including the submission of a Result XML to the application sending the original request.

OS Update

The OS Update allows the device operating system to be replaced or patched using a specified OS Update Zip File or a text file containing a list of OS updates and/or patches. Depending on the contents of the file(s), this process also can be used to perform an OS Downgrade (on devices some), Enterprise Reset, Factory Reset or Full Device Wipe to facilitate the installation of the update or patch contained in the file(s).

Devices running Android 7.x Nougat and below support OS Update only. Devices with Android 8.x Oreo and later support Upgrade and Downgrade Actions and the Suppress Reboot parameter.

NOTES:

OS Upgrade/Downgrade

OS Upgrade (Android 8.0+ only)

Use the following basic steps to perform an OS Upgrade on devices running Android 8.x Oreo or later. Steps might vary slightly depending on the device(s), the environment or other factors.

To perform an OS Upgrade:

  1. Create a StageNow Profile with PowerMgr settings.
  2. Push upgrade .zip file to internal storage (/storage/sdcard0) of the unit under test (UUT).
  3. Set PowerMgr ResetAction as "10" (OS Upgrade) to perform an update of the UUT.
  4. Enter "file-details" characteristic with location of the .zip file in UUT (see sample XML below).
  5. Optionally, set SuppressReboot as False (unchecked).
    This step is optional because the OS Update Action automatically triggers a device reboot.
  6. StageNow only: Generate a barcode that contains the Profile with these settings.
  7. StageNow only: Launch StageNow and scan the barcode.
  8. Verify that the UUT starts an update process and reboots after a successful OS Update (and Enterprise Reset if security patch is different).

XML for Upgrade


<wap-provisioningdoc>
    <characteristic type="PowerMgr" version="8.1" >
            <parm name="ResetAction" value="10"/>
        <characteristic type="file-details">
            <parm name="ZipFile" value="/storage/sdcard0/name_of_upgrade_file.zip"/> // <-- upgrade .zip file
        </characteristic>
            <parm name="SuppressReboot" value="2"/>
    </characteristic>
</wap-provisioningdoc>

OS Downgrade (Android 8.0+ only)

Use the following basic steps to perform an OS Downgrade on devices running Android 8.x Oreo or later. Steps might vary slightly depending on the device(s), the environment or other factors.

NOTE: Downgrades are supported ONLY when moving from one Android version to another. Downgrades within the same Android version (for example to move to an earlier patch level) are NOT supported using this function.

To perform an OS Downgrade:

  1. StageNow only: Create a StageNow Profile with PowerMgr Settings.
  2. Push downgrade .zip file to internal storage (/storage/sdcard0) of the UUT.
  3. Set PowerMgr ResetAction as "11" (OS Downgrade) to perform a downgrade of the UUT.
  4. Enter the "file-details" characteristic with the location of the .zip file in UUT (see sample XML below).
  5. StageNow only: Generate a barcode that contains the Profile with these settings.
  6. StageNow only: Launch StageNow and scan the barcode.
  7. Verify that the UUT starts an update process and reboots after a successful OS Downgrade (and Enterprise Reset if security patch is different).

XML for Downgrade


<wap-provisioningdoc>
    <characteristic type="PowerMgr" version="8.1" >
            <parm name="ResetAction" value="11"/>
        <characteristic type="file-details">
            <parm name="ZipFile" value="/storage/sdcard0/name_of_downgrade_file.zip"/> // <-- downgrade .zip file
        </characteristic>
    </characteristic>
</wap-provisioningdoc>