Android Build and Flash
This page summarizes the development environment, source installation, build process, and flashing flow for X3566 Android.
Development Environment
Full Android source compilation requires a high-performance PC. The manual recommends installing Linux directly rather than relying on a virtual machine. Ubuntu 14.04 / Ubuntu 16.04 64-bit are used as examples.
Common tools:
sudo apt-get install meld
sudo apt-get install minicom
sudo apt-get install picocom
sudo apt-get install ckermit
Common serial command:
sudo picocom -b 115200 /dev/ttyUSB0
Exit picocom with Ctrl+a followed by Ctrl+q.
Dependencies and JDK
The manual recommends Ubuntu 16.04 64-bit. Common dependencies include git-core, gnupg, flex, bison, gperf, build-essential, zip, curl, gcc-multilib, g++-multilib, libncurses5-dev, ccache, libxml2-utils, xsltproc, unzip, lzop, liblz4-tool, genext2fs, device-tree-compiler, u-boot-tools, libssl-dev, repo, p7zip, Android-tools-fastboot, and Android-tools-adb.
X3566 Android 11 commonly uses Java 8 in the build script:
export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH
Toolchain
The cross-compilation toolchains are included in the source package:
prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-Android-4.9/bin/aarch64-linux-Android-
Key Paths
The X3566 Android PDF manual lists:
# Device tree
kernel/arch/arm64/boot/dts/rockchip/rk3566-rk817-tablet.dts
# Partition file
rockdev/Image-rk3566_rgo/parameter.txt
The uploaded Word version contains an obvious inherited path from another platform: rk3568-evb1-ddr4-v10.dts. This template uses the X3566 PDF path rk3566-rk817-tablet.dts by default.
Install Source Package
The source package is obtained from the cloud-disk path:
DVD_X3566&I3566/source/x3566_Android_new
Example:
tar -jxvf x3566_Android 11.tar.bz2
cd x3566_Android 11
git checkout .
If the source is split into volumes, extract prebuilts.tar.bz2 in the x3566_Android 11 directory.
Build
Build as a normal user. Generated images are placed under:
rockdev/Image-rk3566_rgo
One-step build:
./build.sh -UKAup
Option summary:
| Option | Description |
|---|---|
| -U | Build U-Boot |
| -C | Build kernel with Clang |
| -K | Build kernel |
| -A | Build Android |
| -p | Package into IMAGE |
| -o | Build OTA package |
| -u | Build update.img |
| -v | Choose user or userdebug |
| -d | Specify kernel DTS name |
| -V | Specify version |
| -J | Set build job count |
Build example:
source build/envsetup.sh
lunch rk3566_rgo-userdebug
./build.sh -UKAu
Help:
./build.sh -h
Output Images
Common output files:
MiniLoaderAll.bin
uboot.img
trust.img
resource.img
boot.img
misc.img
recovery.img
boot-debug.img
dtbo.img
pcba_small_misc.img
pcba_whole_misc.img
super.img
vbmeta.img
update.img
Windows Flashing
- Install the Rockchip USB driver, commonly
DriverAssitant_v5.x. - Open Rockchip AndroidTool.
- Select the single upgrade firmware
update.img, or use multi-device upgrade mode. - Put the board into Loader / Maskrom / Recovery mode as required.
- Start upgrade and wait for completion.
TF Card Upgrade
The Android manual also includes TF-card firmware upgrade. Typical steps are preparing the TF-card upgrade tool, selecting firmware, creating the upgrade card, inserting it into the board, and waiting for the upgrade to complete.