03-Android_SDK_Compilation

SDK Overview

Version Information

  • Kernel version: 5.4

  • Android OS version: 12.0


Obtaining the SDK Source Code

  • Network Disk Download Directory:

1-SDK\Android12.0\
	h618-android12.0-xxxxxxxxxx.tar.gz
# Download the latest dated version.
  • Copy the source code archive to the compilation host:

    Notes:

    1. Do not compile the source code in a shared directory.

    2. Do not use the ROOT account to log in to the compilation host.

  • Verify file integrity with MD5:

$ md5sum -c *.md5
  • Extract the source code archive:

After extraction, only the .git folder will be visible. Proceed to the next step to fully restore the source code.

  • Restore the source code using Git:


Initial Compilation Environment Setup

First-time compilation requires environment configuration. Skip this step if the SDK location remains unchanged.

Select the following configurations:

Return to the previous directory:

Select the Target Board:

Note: BoardConfig-kickpi-'board'-'desktop'

  • board: Options include k2b / k2c

  • desktop: Options include tv / tablet


Compile the Full Image

Output directory: longan/out/h618_android12_p2_uart0.img

Troubleshooting: If the Android compilation fails without clear errors, reduce the parallel build processes in build.sh (e.g., change make -j32 to make -j8 based on your hardware).


Compile Partition Images Separately

Compile U-Boot Only:

Output directory: longan/out/h618_android12_p2_uart0.img

Compile Kernel Only:

Output directory: longan/out/h618_android12_p2_uart0.img

Compile Android Only:

Output directory: longan/out/h618_android12_p2_uart0.img


Configure the Kernel


Notes

  • Ensure the compilation environment has sufficient disk space and memory.

  • Use git pull regularly to update the SDK source code.

  • Generated images can be flashed to the target device using tools like PhoenixSuit or Fastboot.

Last updated