Skip to content

Volla Phone X23 & Plinius

Introduction

Oniro runs natively on two MediaTek-based Volla phones, the Volla Phone X23 and the Volla Phone Plinius. The phone boots straight into Oniro.

Both phones use the same build target, hybris_generic, and share one set of system images. Oniro detects the phone at boot, so there is no build-time switch between devices. Only the kernel and boot images are built per device.

Oniro reuses the phone's existing Android hardware drivers (Halium) through libhybris. That is how the phones get graphics, audio and modem support.

Specification

Volla Phone X23 Volla Phone Plinius
Codename vidofnir ansuz
SoC MediaTek MT6789 (Helio G99) MediaTek MT6878 (Dimensity 7300)
Halium / kernel Halium 12, 5.10 vendor kernel Halium 14, android14-6.1 GKI kernel
Device name used by the scripts x23 ansuz

The Plinius Plus (12 GB RAM, 256 GB storage, pogo connector) uses the same ansuz image.

Feature Status

Feature X23 Plinius
Boot, USB hdc, display, touch, Wi-Fi, audio Yes Yes
Sensors, vibrator, camera Yes Yes
GNSS No fix confirmed yet Yes
Hardware keys Not yet Yes
Cellular (dual SIM, mobile data, SMS, voice calls) Not yet Yes
Bluetooth (including A2DP audio) Not yet Yes
Wi-Fi hotspot, USB tethering, MTP file transfer Not yet Yes
Video recording and hardware video playback Not yet Yes
NFC, fingerprint, VoLTE Not yet Not yet

Most active development happens on the Plinius.

Prerequisites

  • A Volla Phone X23 or Plinius with an unlocked bootloader. On a Plinius running VollaOS, enable OEM unlocking in Developer options first, then run fastboot flashing unlock and press Volume Up on the phone within about 5 seconds.
  • A Linux host with Docker and about 180 GB of free disk space.
  • git-lfs and repo installed on the host.
  • fastboot, from Android SDK Platform-Tools, on the host that the phone is plugged into.

Warning

Flashing Oniro replaces the operating system that is currently on the phone, such as Ubuntu Touch. Back up any data you want to keep before you start.

Building

The Volla phones use the OpenHarmony-7.0-Release branch. Some steps run inside the build container (the docker exec commands) and the rest run on the host, from the root of the source tree.

Step 1: Get the Source Code

repo init -u https://github.com/eclipse-oniro4openharmony/manifest.git \
     -b OpenHarmony-7.0-Release -m oniro.xml --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'

Step 2: Set Up the Build Container

Oniro provides its own build image. It is the upstream OpenHarmony image plus a few tools that a clean build needs. Build it once, then start a container with the source tree mounted:

sudo docker build -t oniro-oh-standard:3.2 device/board/oniro/docker

sudo docker run -d -it --name oniro-build \
     -w /home/openharmony \
     -v "$PWD":/home/openharmony/workdir \
     -v "$HOME/.ccache":/root/.ccache \
     -v "$(dirname "$PWD")/openharmony_prebuilts":/home/openharmony/openharmony_prebuilts \
     oniro-oh-standard:3.2 /bin/bash

The ccache and prebuilts mounts are optional. They make rebuilds faster and let a new container reuse the toolchains you have already downloaded.

Step 3: Download Prebuilts and Apply Patches

Download the prebuilt toolchains inside the container. Then apply the Oniro patch series on the host:

sudo docker exec -u root -w /home/openharmony/workdir oniro-build \
     ./build/prebuilts_download.sh

bash device/board/oniro/system_patch/do_patch.sh

Note

do_patch.sh applies the patches with git am, so set your git identity first (git config --global user.name and user.email). The patches also register the hybris_generic product. If they are not applied, the build fails with an unknown product error.

Step 4: Build the Oniro System Images

sudo docker exec -u root -w /home/openharmony/workdir oniro-build \
     ./build.sh --product-name hybris_generic --ccache

# The container builds as root. Take back the output folder for the host-side steps.
sudo chown "$USER" out out/hybris_generic
Optional: include the Oniro apps (app store, keyboard, camera)

By default, the image contains the standard OpenHarmony apps. To add the Oniro distribution apps, build them once on the host before Step 4:

bash vendor/oniro/oniro-haps/build-oniro-haps.sh

This step needs network access and the command-line tools (hvigorw, ohpm). See Oniro IDE & App Builder setup to install them with oniro-app cmdtools install.

The camera needs the full API 26 SDK, which prebuilts_download.sh puts in prebuilts/ohos-sdk/linux/26.0.0. The current command-line tools reject its metaVersion, so copy it and relabel the copy:

cp -a prebuilts/ohos-sdk/linux/26.0.0 ~/setup-ohos-sdk/linux/26
ln -s . ~/setup-ohos-sdk/linux/26/openharmony
sed -i 's/"metaVersion": "3.0.2"/"metaVersion": "3.0.1"/' \
    ~/setup-ohos-sdk/linux/26/*/oh-uni-package.json

Then add --gn-args "oniro_install_custom_haps=true" to the build.sh command in Step 4. See the oniro-haps README for details.

Step 5: Build the Device Images

These commands run on the host. They build the kernel and pack the super and boot images for your phone. pull-halium-blobs.sh downloads about 1 GB of Halium files from Volla and UBports. You only need to run it once per source tree, because it keeps the downloads.

D=device/board/oniro/hybris_generic

bash $D/kernel/x23/build_kernel.sh
bash $D/utils/host/pull-halium-blobs.sh -d x23
bash $D/kernel/x23/build_super_img.sh
bash $D/kernel/x23/build_boot_img_chainload.sh

Output images:

  • out/hybris_generic/super.img
  • out/hybris_generic/boot-chainload.img
  • kernel/linux/volla-vidofnir/out/vendor_boot.img
D=device/board/oniro/hybris_generic

bash $D/kernel/ansuz/build_kernel.sh
bash $D/utils/host/pull-halium-blobs.sh -d ansuz
bash $D/kernel/ansuz/build_super_img.sh
bash $D/kernel/ansuz/build_init_boot_chainload.sh

Output images:

  • out/hybris_generic/super.img
  • out/hybris_generic/init_boot-chainload.img
  • out/hybris_generic/vendor_boot-ohos.img
  • kernel/linux/volla-ansuz/out/boot.img

Note

pull-halium-blobs.sh also downloads the Plinius firmware set. Flash it once per phone (see Flashing).

Flashing

  1. Put the phone into fastboot mode. Power it off, then hold Volume Down + Power and select fastboot. If the phone is already running Oniro, you can use this command instead:

    hdc shell "param set ohos.startup.powerctrl reboot,bootloader"
    
  2. Connect the phone over USB and flash all the images in one pass:

    bash device/board/oniro/hybris_generic/utils/host/flash-native.sh -d x23
    
    bash device/board/oniro/hybris_generic/utils/host/flash-native.sh -d ansuz
    

The script writes every partition to slot _a and reboots the phone. Run it with --help to see more options.

First install on a Plinius. If the phone comes from VollaOS or Ubuntu Touch, add --firmware and --wipe once:

bash device/board/oniro/hybris_generic/utils/host/flash-native.sh -d ansuz --firmware --wipe
  • --firmware flashes the firmware that matches the kernel modules in super. You need it again only when the pinned firmware changes.
  • --wipe erases /data (all data on the phone is lost), because Oniro cannot mount the other system's /data.

Note

Always flash the kernel together with the vendor_boot image from the same build, which flash-native.sh does for you. If they don't match, the vendor kernel modules fail to load.

Connecting with HDC

About 60–70 seconds after the reboot, the Oniro lock screen appears and the phone shows up over USB:

hdc list targets
hdc shell "uname -a"

Note

hdc is included in the OpenHarmony SDK toolchain. Ensure it is in your PATH.

How It Works

  1. The phone's bootloader loads a small chainload image (boot_a on the X23, init_boot_a on the Plinius).
  2. Its ramdisk loads the vendor kernel modules, mounts the Oniro and Halium partitions, and then starts Oniro's init as PID 1.
  3. Oniro starts androidd, which runs the Android (Halium) hardware services in an isolated namespace.
  4. Oniro's graphics and hardware services reach those Android HALs through libhybris, over a binder connection that both sides share.

A single super partition holds both the Oniro partitions (system, vendor, sys_prod, chip_prod) and the Halium ones.

Reference

For more details, see the hybris_generic target in the Oniro Board Support Packages repository.