DEVELOPMENT

Get to know KaiOS and all the tools and guides to tame it!

KaiOS (by Kaios Technologies) is a lightweight operating system forked from Firefox OS (by Mozilla), born to improves feature phones with simple functions making them smarter, with cutting-edge and up-to-date functionality. The simplicity and great variability of its products make it a potential alternative to smartphones, exploiting digital detoxification as one of its main objectives.

Structure and functioning of KaiOS

KaiOS is practically a single program, Firefox (37 on KaiOS 1.0 and 48 until KaiOS 2.5.2). The structure of KaiOS is the same as Firefox OS, whose lightness is based only on three levels:

  1. Gonk, which is the lowest level and which mainly contains the linux kernel;

  2. Gecko, which manages boot processes (b2g) and system-level permissions (such as installing applications), is sufficiently powerful and autonomous to be able to manage perfectly and safely all the authorizations necessary to make the operating system work;

  3. Gaia, the user interface, is mainly made up of web contents (webapps), written essentially in HTML, JavaScript and CSS.

Having said that we can assume that the applications we are using are nothing more than the tabs of the navigation of a normal browser. This also makes us understand that any website can become a webapp. So being able to move a website offline on your device makes it a full-fledged webapp. That's why the structure requires at least 256 MB of RAM.

Basic requirements for developing applications:

1) Debug Mode *

Your device must be debuggable. Normally it is sufficient to dial the debug code *#*#33284#*#* (on Qualcomm), or in addition *#*#0574#*#* (Spreadtrum) to enable the USB debugging. Learn more here:

2) ADB and Fastboot

Android Debug Bridge, aka ADB, is a command line with which you can explore, perform actions and make changes to an Android or a KaiOS device. Fastboot is a diagnostic protocol primarily used to modify the flash filesystem via USB connection from the host computer. Learn more here:

3) WebIDE, or other DevTools

WEBIDE is the most common and complete of development tools. For KaiOS 2.5 and lower, choose an old version of Firefox (59 or earlier) or Pale Moon (28.6.1 or earlier), or use the official Kaios emulator (KaiOSRT). Learn more here:

*NOTE: Alternatively, there must be at least the Developer menu, which can be activated when the device is in Privileged Mode, and this is possible with the jailbreak:

Or by using the internal browser, thanks to our W2D (Web To Dev) utility. Try it yourself:

How to use Android for KaiOS development

This discovery was born from Luxferre on September 2020, while him faced a need to be able to connect to different KaiOS devices from its Lenovo TB-X606X tablet without any "normal" PC nearby, by using a known web context vulnerability in KaiOS that allows us to manipulate Android property set directly from the browser. So, here's the guide:

Resources for KaiOS developers

Flashing tools for locked phones

EDL tools and Cross-platform EDL mode usage (Qualcomm)

Firehose/Sahara Client fork for MSM890x development and other clients:

SPD flash tool for Windows (Spreadtrum)

SPD client to flash the Stock Firmware (.pac or .p5c based) on your Spreadtrum Chipset: