Version: Smart Feature Phone 2.6

Architecture

KaiOS is a WEB based mobile phone operating system which includes mobile device side, and cloud service side.

Device side Architecture

Below is the device side overall architecture diagram. It is divided into 3 components : Low layer BSP , Framework and APPs.

KaiOS Architecture

Low layer BSP

Linux kernel, drivers and other supporting native service.

Framework

It provides standard web API, leverage Mozilla Gecko engine and also customize API vs Daemon.

APPs

A collection of web apps, which represents the user interfacing functions of KaiOS for a given device form factor. Apps in KaiOS can be 2 different types:

  • Pure web apps which are fully coded in Javascript/H5, relying on Framework/Gecko web APIs
  • Combined one (Web + Native). Web layer part is fully coded in Javascript/H5 and Native part is coded in Rust/C language.
    • These two parts are running in different process and had memory isolation and different selinux protection.
    • If apps need strict performance or security requirements, developer can put sensitive functions inside native part. KaiOS involvement and agreement is must for this type of apps development.

Cloud/Backend Architecture

KaiOS has private Cloud/Backend services to support device side functionalities.

  • Kai FOTA: Provide FOTA backend service for KaiOS phone
  • Kai Store: Provide app signing and app store backend service
  • Kai Push: Provide in time push notification

KaiOS backend service is deployed in AWS.

Connection between device and backend is based on HTTPS (TLS v1.2 and above).

KaiOS device can only download applications from Kai store.

Technologies

KaiOS apps are based on web technologies โ€“ HTML, CSS, and JavaScript and are run by Gecko runtime. If you have written a web page you already know the basics.

Rendering is done by parsing HTML/CSS and painted using graphic APIs. JavaScript are executed by the JS engine SpiderMonkey and connected to C++ components by XPConnect and WebIDL bindings. Applications and the core process communicate only through IPC protocols defined by IPDL.

Additionally a set of core components including file and memory management, threads and data structures etc. are provided through the XPCOM component object model.