Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Arm Community blogs
Arm Community blogs
Mobile, Graphics, and Gaming blog Android from scratch on Google Nexus 10 with ARM® Mali™ GPU
  • Blogs
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
More blogs in Arm Community blogs
  • AI blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded and Microcontrollers blog

  • Internet of Things (IoT) blog

  • Laptops and Desktops blog

  • Mobile, Graphics, and Gaming blog

  • Operating Systems blog

  • Servers and Cloud Computing blog

  • SoC Design and Simulation blog

  • Tools, Software and IDEs blog

Tags
  • Android
  • Mali-T600
  • ds-5
  • Mali
  • build
  • gpu
  • nexus
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

Android from scratch on Google Nexus 10 with ARM® Mali™ GPU

Guillaume Tucker
Guillaume Tucker
November 9, 2016
6 minute read time.

Disclaimer

The step-by-step guidelines below provided by ARM for your convenience contain information about downloading and installing files, licensed by third parties, which are subject to their own licence terms and conditions.  Your use of such downloads are expressly subject to those third party terms. You hereby agree to comply with all the terms and conditions imposed on you by the relevant third party terms. You acknowledge that ARM shall have no liability to you in respect of those third party files and that your use of the step-by-step guidelines is at your own risk.

 

WARNING: Use at your own risk.

Following the steps below will void the warranty of your Nexus 10 device and all user data on the device will be deleted.

Only follow this guide if you understand the risks and if you are interested in doing Android development.

1. Introduction

This guide provides instructions to build Android AOSP from source with the latest ARM Mali-T60x GPU binary drivers and install it on a Google Nexus 10.  It is primarily targeted at developers who wish to have complete control over an engineering build of Android on a production-quality device, with all graphics development features enabled.

If you only want to develop applications then Factory Images for Nexus Devices - Nexus Files for Developers — Google Developers may be just what you need to get the latest stock Android version on your device.

 

If you want to profile your application on a standard system then you may want to look at  Using DS-5 Streamline with Mali on Google Nexus 10.

 

If you want to do any of the above and also modify or debug Android itself or use the very latest Mali GPU drivers, then this may help you.  Please note that you will end up with a plain AOSP engineering system without Google Play or any other Google proprietary application installed on your Nexus 10 device.

2. Preparation

2.1 Prerequisites

In addition to having a Nexus 10 device, please take a look at Downloading and Building | Android Developers to find out you what you'll need.

Once you have a capable system at hand, please follow the instructions about Initializing a Build Environment | Android Developer.  The steps below summarise what this involves and should work in most cases and have been tested on Ubuntu 12.04 and 14.04 as well as Debian 7.5.

2.2 Install development packages

You'll need to install the Java 7 JDK and packages as explained on this page:

https://source.android.com/source/initializing.html#installing-the-jdk

https://source.android.com/source/initializing.html#installing-required-packages-ubuntu-1404

On Debian, you'll need to run the following commands first and then install the Ubuntu 12.04 packages listed on the page mentioned above:

sudo dpkg --add-architecture i386
sudo apt-get update
                         

2.3 Install repo

Install Google's repo command following the instructions at the top of the following page:

https://source.android.com/source/downloading.html#installing-repo

Only install repo but do not follow the other instructions to manually get the source code and build it.  There is a script attached to this page which will get the correct source code version and build it with the correct options for Nexus 10 as described in the next steps.

2.4 Create the set-up directory

Download the attached mali_nexus10-setup_001.tar.gz set-up archive which contains the set-up script, kernel patches and configuration files and extract it on your disk.  This is where all the build commands will be run from.

tar xzf mali_nexus10-setup_???.tar.gz
cd mali_nexus10-setup_???
                            

2.5 Download the Mali user-side driver

The set-up script will replace the ARM Mali GPU driver binary found in stock Nexus 10 AOSP firmware with the latest version available from ARM.  You will need to download the driver manually for Mali-T60x on Android 5.0 after accepting the terms of the End User License Agreement:

http://malideveloper.arm.com/resources/drivers/arm-mali-midgard-gpu-user-space-drivers/

The downloaded binary archive mali-t60x_r5p0-06rel0_android-5.0_1.tar.gz needs to be placed in the current set-up directory.

2.6 Optional: install DS-5 Streamline, Gator and the Android NDK

If you want to be able to profile your system and capture the CPU and GPU activity then you will need DS-5 Downloads | ARM DS-5 Development Studio

Then you'll need to extract the source code for the Gator kernel driver and user-side daemon in order to use DS-5 Streamline with your Nexus 10 device.  This is necessary to let it connect to your device and capture the activity data.  Still within the set-up directory, run these commands after adjusting the paths to the DS-5 installation directory:

tar xzf $HOME/DS-5/arm/gator/driver-src/gator-driver.tar.gz
tar xzf $HOME/DS-5/arm/gator/daemon-src/gator-daemon.tar.gz
                            

The script will look for the gator-driver and gator-daemon directories.  If they are present, it will build and install Gator on the Android file system.  Otherwise, it will ignore Gator and proceed without it.  It is always possible to build Gator later and install it manually; see 5. Manual mode for mode details.

In order to build the user-side Gator daemon mentioned in the previous step, download the Android NDK for Linux and install it somewhere on your computer:

https://developer.android.com/tools/sdk/ndk/index.html

Add the Android NDK to your PATH variable.  This should typically look like this but you'll need to adjust it to match your installation paths:

PATH=$HOME/android-ndk-rX:$PATH

3. Build everything in one go

You should now have all these files in your set-up directory (Gator is optional):

$ ls
data  gator-daemon  gator-driver  mali-t60x_r5p0-06rel0_android-5.0_1.tar.gz  nexus10-setup.sh
                            

To automatically download all the code for the Linux kernel and Android and build it, run this command:

./nexus10-setup.sh do_everything
                            

As well as downloading the source code, it will also download proprietary firmware files distributed by Google that are not part of AOSP.  They are necessary in order to get sound, wireless network and graphics to work.  You will need to accept the licensing terms when the script will extract them in the set-up directory.

Getting the Android source code takes a long time and may sometimes fail due to network errors, so it may be necessary to run the command again to resume.  In case you're experiencing problems, you may want to only rerun certain steps of the process manually; see 5. Manual mode for more details.

Please note that if you have less than 8GB of RAM then you'll probably need to create an extra swap partition as some libraries take a huge amount of RAM to link during the build.  Of course using swap will be slower than having enough RAM but it will work.  You can create a temporary swap of 4GB with the following commands:

dd if=/dev/zero of=swap-file bs=4096 count=1048576
sudo losetup /dev/loop0 swap-file
sudo mkswap /dev/loop0
sudo swapon /dev/loop0
                            

4. Install on the device

If all went well in step 3, the script should have printed this information at the end of the process:

To flash your device, reboot it in bootloader mode by pressing
Volume-Up + Volume-Down + Power or running this command:
  adb reboot bootloader
Then run:
  cd nexus10-mali-r5p0-06rel0
  sudo ./nexus10-setup.sh flashall
                         

The adb command should have been built as part of the AOSP build and can be found here:

aosp/out/host/linux-x86/bin/adb
                         

Alternatively, Download Android Studio and SDK Tools | Android Developers contains adb and other standard Android tools.

 

If you follow these instructions and run the flashall command then your fresh Android build should be flashed on the device and it should reboot automatically at the end of the process.

5. Manual mode: one step at a time

The manual mode can be used to diagnose issues or to do more advanced things, for example to modify the source code and rebuild only a part of it.  When run with no argument, the script produces a detailed help message.  A summary of that is available below:

Usage:

  ./nexus10-setup.sh COMMAND [OPTIONS...]

 

  • do_everything

          Run all the commands to build everything from scratch.

  • get_aosp

          Get the AOSP source code and pre-built binaries.

  • get_kernel

          Get the Linux kernel source code.

  • build_kernel

          Build the Linux kernel.

  • build_gator

          Build the Gator driver and daemon if directories are present.

  • build_aosp

          Build AOSP and create the Android file systems.

  • package

          Create a tarball with files ready to be flashed on a Nexus 10 device.

mali_nexus10-setup_001.tar.gz
Anonymous
  • Jerome Decamps - 杜尚杰
    Jerome Decamps - 杜尚杰 over 10 years ago

    Thank you for this tutorial, good work

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Mobile, Graphics, and Gaming blog
  • Unlock the power of SVE and SME with SIMD Loops

    Vidya Praveen
    Vidya Praveen
    SIMD Loops is an open-source project designed to help developers learn SVE and SME through hands-on experimentation. It offers a clear, practical pathway to mastering Arm’s most advanced SIMD technologies…
    • September 19, 2025
  • What is Arm Performance Studio?

    Jai Schrem
    Jai Schrem
    Arm Performance Studio gives developers free tools to analyze performance, debug graphics, and optimize apps on Arm platforms.
    • August 27, 2025
  • How Neural Super Sampling works: Architecture, training, and inference

    Liam O'Neil
    Liam O'Neil
    A deep dive into a practical, ML-powered approach to temporal super sampling.
    • August 12, 2025