MDM API

MDM API

This project shows the use of the MDM API, including locking the device and locking several separate functions of the device, as well as getting the location of the device.

Mdm Api Example

Aurora OS application to demonstrate the MDM API.

Terms of Use and Participation

The source code of the project is provided under the license, which allows its use in third-party applications.

The contributor agreement documents the rights granted by contributors of the Open Mobile Platform.

Information about the contributors is specified in the AUTHORS file.

Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.

Project Structure

The project has a standard structure of an application based on C++ and QML for Aurora OS.

Compatibility

The project is compatible with all the supported versions of the Aurora OS.

Architecture schema

                                              ┌──────────────────┐
                                              │    Aurora OS     │
          ┌───────────────────┐               └────────▲─────────┘
          │    RPM-package    │                        │
User      ├───────────────────┴────────────────────────┼──────────────────────┐
          │                                            │MDM API               │
│ @ │     │    ┌────────────────┐           ┌──────────┴──────────┐           │
└─┬─┘     │    │     GUI        │    DBus   │   systemd-service   │           │
  │  ◄────┼───►│  MdmApiExample │◄─────────►│ MdmApiExampleDaemon │           │
┌─┴─┐     │    └────────────────┘           └──────────▲──────────┘           │
│   │     │                                            │                      │
          └────────────────────────────────────────────┼──────────────────────┘

                                                 ┌─────▼─────┐
                                                 │    TCP    │
                                                 └─────▲─────┘


                                                ┌──────▼───────┐
                                                │  MDM Server  │
                                                └──────────────┘

Features

The application has been tested for the following features:

  • The application allows to lock and unlock the device features (Camera, Microphone and WLAN).
  • The application allows to download a file from via the network.
  • The application allows to start and stop retrieving the location info.

Notes

Unfortunately, it is impossible to implement the launch of the systemd-service immediately after installing the RPM-package: the validator will print an error about the impossibility of describing scripts in the spec file. Therefore, to start it needs to either reboot the device or connect to it via SSH and run the following commands:

devel-su systemctl daemon-reload
devel-su systemctl restart ru.auroraos.MdmApiExampleDaemon

In order to make an interaction via DBus between the UI application and the systemd-service possible, it was necessary to name the DBus-service and the DBus-interface same as the executable file of the UI application, i.e. ru.auroraos.MdmApiExample. Otherwise, the application could not access the DBus-service with the ServiceUnknown error.

Issues

File downloading. There is a problem of downloading files within the background MDM-service. The downloaded file cannot be written to the file system with an error "Permission denied". Now, only one path is found where the MDM-service can write a file: /var/lib/sailfish-mdm.

Screenshots

screenshots

This document in Russian / Перевод этого документа на русский язык