Skip to main content

Build System

This document provides a complete guide to compiling the Android system for Radxa Cubie A7Z.

System Requirements

  • Memory: 32GB RAM recommended, minimum 16GB RAM
  • OS: Ubuntu 22.04 or later recommended
Adding Swap Space

If using 16GB RAM, you need to enable swap space before compiling the Android system.

Ubuntu$
sudo fallocate -l 16G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Install Dependencies

Ubuntu$
sudo apt update -y
sudo apt install libelf-dev libssl-dev bc flex bison dwarves repo git-lfs libncurses5 gawk lib32z1 lib32z1-dev -y

Download Source Code

Ubuntu$
mkdir -p ~/android
cd ~/android
repo init -u https://github.com/radxa/allwinner-android-manifests -b Android13_A733_v1.0 -m aw-a733-release.xml
repo sync
repo forall -c 'git lfs pull'

System Build

Compile Android system from source code.

Configure Model

Navigate to the downloaded source code's longan directory and use ./build.sh config for model configuration.

Ubuntu$
cd ~/android/longan
./build.sh config

In the interactive terminal configuration, select the following options in order:

  1. System Platform -> Android
  2. Main Control -> a733
  3. Board Model -> radxa_a7z
  4. Flash -> default

Compile Kernel

Ubuntu$
cd ~/android/longan
./build.sh

After compilation is complete, the terminal will display a message similar to sun60iw2p1 compile all(Kernel+modules+boot.img) successful.

The generated kernel files will be located in the out directory of the current folder.

Compile Android System

Set Up Build Environment

Ubuntu$
cd ~/android
source build/envsetup.sh

Select Build Model

Ubuntu$
lunch <board-model>

Replace <board-model> with a733_radxa_a7z-userdebug, for example: lunch a733_radxa_a7z-userdebug

Compile Android System

Ubuntu$
make -j$(nproc)

After successful compilation, the terminal will display a message similar to #### build completed successfully (06:06 (mm:ss)) ####.

Generate Flashable Image

Ubuntu$
pack

After the image packaging is complete, the terminal will output the size and file path of the generated image.

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0