Uploading an App or System Bundle

Build and update system and App bundles and upload them to AirVantage to deploy on your target.

Create App or System Bundle

Create a System Bundle

System and App updates are uploaded to AirVantage as a special zip file containing the app binary update pack and an XML manifest. mksys builds the system bundle, while mkapp builds the application bundle. To combine the xml and zip files into another zip for AirVantage delivery, use the av-pack tool.

Build a custom system called "custom" for deployment through AirVantage:

$ mksys -t wp85 custom.sdef
$ av-pack -u custom.wp85.update -b _build_custom/wp85 -t WP8548
Note
The -t must match the type set in the application model of your target. The default WP type is "WP8548".

mksys builds the "custom" system for the wp85 target and outputs an .update file and manifest.app (the xml manifest file needed to update your system with AirVantage). The files are generated under the builds working directory (e.g., ./_build_custom/wp85).

av-pack builds the .zip file that can be uploaded to AirVantage.

Create an App Bundle

Build an application for deployment through AirVantage:

$ mkapp -t wp85 helloWorld.adef
$ av-pack -u helloWorld.wp85.update -b _build_helloWorld/wp85 -t abcCo.jsmith.helloWorld

mkapp builds the helloWorld app for the wp85 target. The update pack file helloWorld.wp85.update and the AirVantage manifest file manifest.app are generated.

The manifest.app file is generated under the builds working directory (e.g., ./_build_helloWorld/wp85).

av-pack packs these two files together and sets the apps type to abcCo.jsmith.helloWorld.

Setting an App Type

The Apps type must be a globally-unique app type identifier, unique among all Apps in all companies anywhere on AirVantage.

Best Practices in uniquely naming type identifiers:

  • Include a unique identifier for your company name to prevent naming conflicts with other companies in the world.
  • For developers Apps, include the developer's name to prevent conflicts with other developers in the same company.
Note
If no type is specified the type defaults to: appName-legato-application.

The output for this sample is helloWorld.zip. and is located in the build root.

App Signature Checks

If your target device has been configured for app signature checks or to accept only encrypted apps, you must use your signing/encryption tool to sign the .update file and then pack it with av-pack instead. Don't sign or encrypt the manifest.app file, or the final .zip file, as AirVantage won't be able to read them.

$ mkapp -t wp85 helloWorld.adef
$ cat helloWorld.wp85.update | myAppSigner > helloWorld.wp85.signed
$ av-pack -f helloWorld.wp85.signed abcCo.jsmith.helloWorld _build_helloWorld/wp85

Uploading an App or System Bundle

Create App/System Installation job

Create the app/system install job on the platform:

  • In your system 'Monitor' view
  • "More" menu
  • App Install:
    • Choose "Install Application" and select the zip file created in the previous step.
  • System Install:
    • Choose "Install Bundle" and select the zip file created in the previous step.

Receive App/System on AirVantage Agent

This requires an avc control app using the LWM2M AVC API that accepts the download and installation. See AirVantage Connector API for details.

Check Success Status

If the installation was successful, you should find helloWorld in the installed apps and on the targets' "Monitor" view app list in the AirVantage UI.

Uploading a 17.05 Legato System Bundle

If you have upgraded to 17.05 and wish to sync your Legato System with AirVantage, the target and revision number need to be updated in the app model before it is uploaded to the AirVantage Server.

Once you've built your legato system, you need to extract the model.app from the zip file and update name="<target>_<legatoVersion>" and revision="<legatoVersion>" with the target and version that matches your Legato System. (e.g., if version = "abc" then update model.app to name="WP8548_17.05.0_abc" and revision="17.05.0_abc")

$ cat build/<target>/system/staging/version             # displays the version number

In the legato_model.zip, extract model.app; modify the name="<target>_<legatoVersion>" and revision="<legatoVersion>" to match the version number in the build.

$ unzip -d . legato_model.zip model.app
$ vi model.app                          # edit the two fields
$ zip -ur legato_model.zip model.app

Once legato_model.zip has been updated, upload to the AirVantage server and publish the model.

Sync the AirVantage Server with your target and this will link to your new app model.