Google is committed to advancing racial equity for Black communities. See how.

You can create builds for Nexus and Pixel devices using Android Open Source Project (AOSP) builds and the relevant hardware-specific binaries. For available Android builds and targeted devices, see Source code tags and builds.

You can also create builds for DragonBoard 845c and HiKey 960 Android reference boards, which are designed to help nonmobile component vendors develop and port drivers to Android releases. Using a reference board can ease upgrade efforts, reduce time to market for new Android devices, lower device costs by enabling ODM/OEMs to choose from a wider range of compatible components, and increase the speed of innovation among component suppliers.

Google supports DragonBoard 845c and HiKey 960 Android reference boards. AOSP provides kernel source and board support for these boards, so developers can easily create and debug peripheral drivers, do kernel development, and perform other tasks with fewer OEM encumbrances.

DragonBoard 845c

The DragonBoard 845c is part of the RB3 platform and is available from 96boards.org.

Figure 1. DragonBoard 845c

Note: The 96boards wiki provides supporting documentation for 96Boards.

Compiling userspace

Use the following commands to download and build Android on the DragonBoard 845c.

Download the Android source tree: repo init -u https://android.googlesource.com/platform/manifest -b master repo sync -j8 Build: . ./build/envsetup.sh lunch db845c-userdebug make -j24

Installing local images

Boot db845c into fastboot mode (see DragonBoard Recovery). Run following command: ./device/linaro/dragonboard/installer/db845c/flash-all-aosp.sh

Alternately, you can perform QDL board recovery by running the following script after booting db845c in USB flashing mode:

./device/linaro/dragonboard/installer/db845c/recovery.sh

Flashing images from ci.android.com

You can use flash.android.com to easily test the latest AOSP build artifacts from ci.android.com. You don't need to build, but you need to have a DragonBoard 845c already flashed with the latest bootloader in AOSP before you begin.

In a web browser, go to flash.android.com. Click Get Started then skip step 1 (as your device is already in developer mode). In available, locate DragonBoard 845c (db845c). If you don't see it, click + Add new device then select either Android gadget or Android device from the list. Select DragonBoard 845c (db845c). Click Select a build ID and choose the most recent build. Click Install. Note: Occasionally, the first time you use a device with flash.android.com, it may lose the board when transitioning to fastboot. If this happens, re-select the device from a list and the install process should proceed normally. Follow the remaining instructions and wait while the board is flashed.

Congratulations, your DragonBoard 845c is now running the very latest AOSP build!

Building the kernel

To build the DragonBoard db845c Android Generic Kernel Image (GKI) kernel artifacts:

Run following commands to clone the kernel source and prebuilt Android toolchains and build scripts. mkdir repo-common cd repo-common repo init -u https://android.googlesource.com/kernel/manifest -b common-android-mainline repo sync -j8 -c rm -rf out BUILD_CONFIG=common/build.config.db845c ./build/build.sh Delete all objects in ${AOSP_TOPDIR}device/linaro/dragonboard-kernel/android-mainline/ then copy build artifacts from out/android-mainline/dist/ to ${AOSP_TOPDIR}/device/linaro/dragonboard-kernel/android-mainline/ then rebuild userspace with: make TARGET_KERNEL_USE=mainline -j24 and flash the device with the new kernel (see Compiling userspace) Test the GKI kernel: View the latest kernel_aarch64 build. In artifacts, download Image.gz and copy it to ${AOSP_TOPDIR}/device/linaro/dragonboard-kernel/android-mainline/ . Build and flash the device with the new kernel (see Compiling userspace).

HiKey 960 boards

The HiKey 960 board is available from Amazon and Lenovator.

Figure 2. HiKey 960 board by Lenovator

Note: The 96boards wiki provides supporting documentation for 96Boards.

Compiling userspace

Use the following commands to download and build Android on the HiKey 960 board.

Download the Android source tree: repo init -u https://android.googlesource.com/platform/manifest -b master repo sync -j8 Build: . ./build/envsetup.sh lunch hikey960-userdebug make -j24

Installing initial images

Select fastboot mode by turning ON switch 3 (for details, refer to the HiKey 960 Getting Started guide). Power the board. Flash initial images: cd device/linaro/hikey/installer/hikey960 Turn OFF switch 3 and power cycle the board.

Flashing images

Enter fastboot mode by turning ON switch 3. Flash images by running the following commands: fastboot flash boot out/target/product/hikey960/boot.img Turn OFF switch 3 and power cycle the board.

Building the kernel

To build the HiKey960 Android GKI kernel artifacts:

Run the following commands: mkdir repo-common cd repo-common repo init -u https://android.googlesource.com/kernel/manifest -b common-android12-5.4 repo sync -j8 -c rm -rf out BUILD_CONFIG=common/build.config.hikey960 build/build.sh Delete all objects in ${AOSP_TOPDIR}device/linaro/hikey-kernel/hikey960/5.4/ then copy build artifacts from the kernel build in out/android12-5.4/dist/ to ${AOSP_TOPDIR}/device/linaro/hikey-kernel/hikey960/5.4/ Concatenate the DTB: cat device/linaro/hikey-kernel/hikey960/5.4/Image.gz device/linaro/hikey-kernel/hikey960/5.4/hi3660-hikey960.dtb > device/linaro/hikey-kernel/hikey960/5.4/Image.gz-dtb Build Android Userspace lunch hikey960-userdebug make TARGET_KERNEL_USE=5.4 HIKEY_USES_GKI=true -j24 and flash the device with the new kernel (see Compiling userspace) Test the Generic Kernel Image (GKI) kernel View the latest kernel_aarch64 build.

In artifacts , download Image file and copy it to ${AOSP_TOPDIR}/device/linaro/hikey-kernel/hikey960/5.4/ .

Compress the image and concatentate the DTB gzip ${AOSP_TOPDIR}/device/linaro/hikey-kernel/hikey960/5.4/Image cat ${AOSP_TOPDIR}/device/linaro/hikey-kernel/hikey960/5.4/Image.gz ${AOSP_TOPDIR}/device/linaro/hikey-kernel/hikey960/5.4/hi3660-hikey960.dtb > ${AOSP_TOPDIR}/device/linaro/hikey-kernel/hikey960/5.4/Image.gz-dtb Build and flash the device with the new kernel (see Compiling userspace).

Setting the serial number

To set the random serial number, run:

fastboot getvar nve:SN@16\_DIGIT\_NUMBER

Bootloader exports the generated serial number to the kernel using androidboot.serialno= .

Setting monitor resolution