com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Upgrading Firmware of an Android Device

This feature is applicable only for COPE devices where the organization has devices that are manufactured specifically for them (OEM scenarios) and you need to have a battery level of 50% or higher to upgrade the firmware of an Android Device.

Many organizations manufacture devices to suit their business requirement and to improve the efficiency and effectiveness of work carried out by their employees. For example, if it's an organization related to media, they require mobile devices that have a good voice and video recording capabilities so that employees can use it in their day to day work. These devices may include a firmware and you are able to upgrade the firmware to a newer version over-the-air (OTA) with WSO2 IoT Server. For more information on OTA firmware upgrading, see OTA updates.

Configuring WSO2 IoT Server to handle firmware upgrades

Prerequisite

Enable the Android system service application. For more information, see Integrating the Android System Service Application.

Follow the configuration steps given below to upgrade the firmware of your device.

  1. Configure the build.prop file (click here for a sample build.prop file) by updating the release version. The version you provide has to be greater than the previous version of the firmware, for the upgrade to take place.

    ro.build.version.release=<VERSION>
  2. Host the files mentioned below in your OTA server, under the subdirectory with your device name.
    • build.prop file.
    • <DEVICE_NAME>.ota.zip file, which is the firmware upgrade package file.

      The value defined for the android.os.Build.PRODUCT parameter needs to given as the <DEVICE_NAME>. This information is available on most Android devices or you can get it by running a sample application that will print the android.os.Build.PRODUCT parameter value in the log.

    Example: If the device name is c1ktt, the hosted file URLs will be of the following format:
    • http://<HOST>:<PORT>/<SUB_DIRECTORY>/build.prop
      Example:  http://10.10.10.227:8000/c1ktt/build.prop
    • http://<HOST>:<PORT>/<SUB_DIRECTORY>/<DEVICE_NAME>.ota.zip
      Example: http://10.10.10.227:8000/c1ktt/c1ktt.ota.zip
  3. Configure the following fields in the org.wso2.emm.system.service.utils.Constants class.

    public static final String DEFAULT_OTA_SERVER_ADDRESS = "<OTA_SERVER_ADDRESS>";
    public static final String DEFAULT_OTA_SERVER_PROTOCOL = "http";
    public static final int DEFAULT_OTA_SERVER_PORT = <PORT>;
    public static final String DEFAULT_OTA_SERVER_SUB_DIRECTORY = "<SUB_DIRECTORY>"; 
    public static final int REQUIRED_BATTERY_LEVEL_TO_FIRMWARE_UPGRADE = <REQUIRED_BATTERY_LEVEL>;

    To safely complete the upgrade, the device needs to have a battery level of 50% or more. If it's below 50% the upgrade will not continue until the device is charged.

    Example:

    public static final String DEFAULT_OTA_SERVER_ADDRESS = "10.10.10.227";
    public static final String DEFAULT_OTA_SERVER_PROTOCOL = "http";
    public static final int DEFAULT_OTA_SERVER_PORT = 8000;
    public static final String DEFAULT_OTA_SERVER_SUB_DIRECTORY = "c1kt"; 
    public static final int REQUIRED_BATTERY_LEVEL_TO_FIRMWARE_UPGRADE = 50;
  4. Configure the following fields in the org.wso2.emm.agent.utils.Constants class.

    public static final int FIRMWARE_UPGRADE_RETRY_COUNT = <NUMBER_OF_RETRIES_ON_FAILURE>;

    Example:

    public static final int FIRMWARE_UPGRADE_RETRY_COUNT = 5;

Scheduling firmware upgrades

Android firmware upgrades can be scheduled via the device management console or using the REST API.

Follow the steps given below to schedule the firmware upgrade via the device management console.

  1. Navigate to the device page of the device you wish to schedule the firmware upgrade. 

  2. Click Upgrade Firmware.
  3. Scheduling the firmware upgrade.
    • Scheduling the firmware upgrade for a future date.
      1. Enter the date and time.
      2. If you want to set a different server URL than the URL given under Android system service constants, enter the server URL in one of the following formats. 
        Example:
      3. Click YES to schedule the operation.
    • Scheduling the firmware upgrade instantly.
      1. Select Instant Upgrade. 
      2. If you want to set a different server URL than the URL given under the Android system service constants, enter the server URL in one of the following formats. 
        Example:
      3. Click YES to schedule the operation instantly. 
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.