Create a custom Mason OS configuration
This guide will walk you through the definition of a Mason OS configuration file, and walk you through the key attributes defined in a Mason OS configuration.
What is a Mason OS configuration?
Mason OS configuration files are defined using the YAML file format -
.yml. You can create a Mason OS configuration using any text editor you like.
YAML files are easy to validate using linting and parsing techniques. For more information about YAML formatting, visit the YAML wiki page
Mason OS configuration specification
Mason OS configs can vary by device on the Mason Platform. To visit a Mason OS configuration specification, visit the documentation on our devices page, select the device you want, and then you can view the device's Configuration glossary from there.
Example Mason OS configuration
This is an example Mason OS configuration for a dedicated device used by a logistics company.
os: name: warehouse-distribution version: latest configurations: mason-management: disable_keyguard: true disable_status_bar: false mason-fota: config_allow_download_over_metered: false config_update_check_frequency: 6 config_update_install_time: 12:30 config_update_install_battery_threshold: 20 config_update_prompt_prior_to_install: true mason-app-updater: config_allow_download_over_metered: true config_update_check_frequency: 12 config_update_install_time: 01:00 config_update_install_battery_threshold: 20 apps: - name: Test App package_name: com.warehouses.distribution version_code: 12 media: bootanimation: name: warehouse-distro-boot version: latest
The following section of this guide will walk you through the definitions in the given example Mason OS configuration, shown above.
os tag is the metadata declaration of the project config. Only two fields are required;
configuration section is where you define the exact behavior and details of the Mason OS specified by this file.
This field should reference an existing project identifier in the Mason platform.
In this case, the project
warehouse-distributionwas created in step 2 of the "Manage Projects" series
os version is a numeric and monotonically incremented field that represents the "version" of a Mason OS config.
In all places where you must specify a version, the
latest keyword can be used instead for a more hands-off approach to versioning, as the Mason Platform will increment Mason OS configuration versions for you.
Together, Mason OS
versioncombinations must be unique. If you try to add a Mason OS config to the Mason Platform that includes a
versioncombination that already exists in the Platform, the duplicate config will be rejected.
The Mason OS
configurations refer to a set of rules and attributes that, when built and deployed to a Mason device, will result in some specific behavior or state of the resulting Mason OS.
Mason OS configurations determine the expression of Mason OS on a Mason device. Think about the Mason OS configurations defined in this section as the electrical wiring and floorplan of a house. The Mason OS is the foundation and structural frame of the house, and the Mason Device is the finishing, roofing, and paint.
The Mason Platform provides Mason OS configurations that dictate everything and everything our customers need, from update policy, UI behavior, and even hardware behavior for a specific mason device.
apps object enumerates all the registered Android applications that are to be included into the software build. Only the
version_code properties are required.
nameattribute defines an arbitrary name (for your own record keeping)
package_nameattribute comes from the package name in your APK's
version_codeattribute comes from the version code in your APK's
For more details on registering an Android application to the Mason Platform, see our Mason CLI documentation for the command
mason register apk
media object enumerates all the media configurations for the software distribution.
Supported types are:
- Boot animations
- Splash screens
For more details on registering a boot animation to the Mason Platform, see our Mason CLI documentation for the command
mason register media
- Contact us at firstname.lastname@example.org